最近帮助用户查看ebayUser的注册信息的情况使用到GetUserCall。使用给的该call能只要知道ebayAccountName就可以知道该User的一些信息。
eBay API explains
[quote]
GetUser returns data for a single, registered eBay user.
GetUser takes as input the eBay user ID for the user whose data you want to review, or the item ID of a successfully concluded listing in which the requestor and target user were participants as buyer and seller in the order.
A successful call returns the data for the specified user in a User container. Site-specific information (such as a subscription to SellingManagerPro) and non-site-specific information (such as registration date) is also returned. Site-specific information depends on the site you specify in the request, while non-site-specific information does not depend on the specified site.
After retrieving the user information, you can:
Inspect the properties of the User container to get the needed data values for the eBay user.
As applicable for the application, store the data for later use.
Sellers who engage in cross-border trading on sites that require a recoupment agreement must agree to the recoupment terms before adding items to the site. This agreement allows eBay to reimburse a buyer during a dispute and then recoup the cost from the seller. The list of the sites where a user has agreed to the recoupment terms is returned in the GetUser response.
[/quote]
该Call通常可以在战略上使用下,查看下你的竞争account的一些信息。然后调整你的策略
废话不说,直接贴代码
eBay API explains
[quote]
GetUser returns data for a single, registered eBay user.
GetUser takes as input the eBay user ID for the user whose data you want to review, or the item ID of a successfully concluded listing in which the requestor and target user were participants as buyer and seller in the order.
A successful call returns the data for the specified user in a User container. Site-specific information (such as a subscription to SellingManagerPro) and non-site-specific information (such as registration date) is also returned. Site-specific information depends on the site you specify in the request, while non-site-specific information does not depend on the specified site.
After retrieving the user information, you can:
Inspect the properties of the User container to get the needed data values for the eBay user.
As applicable for the application, store the data for later use.
Sellers who engage in cross-border trading on sites that require a recoupment agreement must agree to the recoupment terms before adding items to the site. This agreement allows eBay to reimburse a buyer during a dispute and then recoup the cost from the seller. The list of the sites where a user has agreed to the recoupment terms is returned in the GetUser response.
[/quote]
该Call通常可以在战略上使用下,查看下你的竞争account的一些信息。然后调整你的策略
废话不说,直接贴代码
public static void getUser() throws ApiException, SdkException, Exception{
ApiContentUtil apiContentUtil = new ApiContentUtil();
GetUserCall call = new GetUserCall();
call.setApiContext(apiContentUtil.getApiContext());
call.setUserID(ebayAccountName);
//"zeus_group"
//motorsporthouse
//dartsracing
//call.setDetailLevel(new DetailLevelCodeType[]{DetailLevelCodeType.RETURN_ALL});
call.setIncludeExpressRequirements(true);
call.setIncludeFeatureEligibility(true);
//call.setEnableCompression(ture);
call.setSite(SiteCodeType.US);
//call.getUser();
UserType user = call.getUser();
AddressType addressType = user.getRegistrationAddress();
if(addressType != null){
System.out.println("AddressID: "+addressType.getAddressID());
System.out.println("CityName"+addressType.getCityName());
System.out.println("Country"+addressType.getCounty());
}
System.out.println(call.getRequestXml());
System.out.println("=------------------------------------------------");
System.out.println(call.getResponseXml());
}