我希望你能帮助我。
此问题涉及大型商户服务eBay API。我正在使用Visual Studio在C#中编写程序。
我正在尝试使用StartDownloadJob的BulkDataExchangeService API调用来创建一个ActiveInventoryReport。
我通过定义“eBayAPIInterfaceService service = new eBayAPIInterfaceService();”使用Trading API进行了成功的调用。 class作为服务,然后使用该类发送请求。例如:
GetSellingManagerInventoryRequestType request = new GetSellingManagerInventoryRequestType();
request.ErrorLanguage = errorLanguage;
request.Version = "915";
request.WarningLevel = WarningLevelCodeType.High;
request.Pagination = paginatorType;
GetSellingManagerInventoryResponseType response = service.GetSellingManagerInventory(request);
下面是我试图编写的代码来进行StartDownloadJob调用。但是,我发现“eBayAPIInterfaceService”类不包含StartDownloadJobResponse的定义,因此我无法使用“service.StartDownloadJobResponse(request);”言。
我知道“eBayAPIInterfaceService”可能不是我需要的课程。
我的问题是:我想用什么课?我找不到任何告诉我的文件!
`string endpoint = "https://webservices.ebay.com/BulkDataExchangeService";
string callName = "StartDownJob";
string siteId = "0";
string appId = "MyId"; // use your app ID
string devId = "MyId"; // use your dev ID
string certId = "MyId"; // use your cert ID
string version = "467";
// Build the request URL
string requestURL = endpoint
+ "?callname=" + callName
+ "&siteid=" + siteId
+ "&appid=" + appId
+ "&version=" + version
+ "&routing=default";
// Create the service
eBayAPIInterfaceService service = new eBayAPIInterfaceService();
// Assign the request URL to the service locator.
service.Url = requestURL;
// Set credentials
service.RequesterCredentials = new CustomSecurityHeaderType();
service.RequesterCredentials.eBayAuthToken = "[MyTokenHere]"; // use your token
service.RequesterCredentials.Credentials = new UserIdPasswordType();
service.RequesterCredentials.Credentials.AppId = appId;
service.RequesterCredentials.Credentials.DevId = devId;
service.RequesterCredentials.Credentials.AuthCert = certId;
// Make the call to GeteBayOfficialTime
StartDownloadJobRequest request = new StartDownloadJobRequest();
StartDownloadJobResponse response = service.StartDownloadJobResponse(request);`
任何帮助将不胜感激!