【发布时间】:2019-06-26 11:12:23
【问题描述】:
我想制作与 XERO 联系的 web api。
任何人都可以帮助如何为此创建rest api。
我已经尝试过,但它不起作用 https://github.com/XeroAPI/Xero-Net 但如果不将用户带到浏览器,它就无法工作。
我也尝试过创建关注
var private_app_api = new XeroCoreApi("https://api.xero.com", new
PrivateAuthenticator(@"C:\Dev\your_public_privatekey.pfx"),
new Consumer("your-consumer-key", "your-consumer-secret"),
null,
new DefaultMapper(), new DefaultMapper());
但是从 Xero.Api.Core 我得到了
"Error CS1729 'XeroCoreApi' does not contain a constructor that takes 6 arguments AHFXEROService"
有人可以帮忙吗?
【问题讨论】:
-
Intellisense 应该显示构造函数所需的确切参数数量以及它们的类型。
-
从一些参考资料中我知道我需要确切的参数来创建 xero api,但是在“Xero.api.core”库中没有完全具有这些参数的方法。所以我认为必须有另一个图书馆
-
现在我正在努力使用 oauth2。因为我有 Windows 应用程序,我需要从中进行用户登录。我可以将他们重定向到登录,但他们需要回调 uri 我不知道如何使 xero 重定向到我的 Windows 应用程序。有什么想法吗?