public SearchResult Search_by_keyword(String keyword) { CustomFinding service = new CustomFinding(); service.Url = "http://svcs.ebay.com/services/search/FindingService/v1"; // Creating request object for FindBestMatchItemDetailsByKeywords API FindItemsByKeywordsRequest request = new FindItemsByKeywordsRequest(); // Setting the required property values request.keywords = keyword; // Setting the pagination PaginationInput pagination = new PaginationInput(); pagination.entriesPerPageSpecified = true; pagination.entriesPerPage = 25; pagination.pageNumberSpecified = true; pagination.pageNumber = 1; request.paginationInput = pagination; // Creating response object FindItemsByKeywordsResponse response = service.findItemsByKeywords(request); SearchResult result = response.searchResult; return result; }
/// <remarks/> public void findItemsByKeywordsAsync(FindItemsByKeywordsRequest findItemsByKeywordsRequest, object userState) { if ((this.findItemsByKeywordsOperationCompleted == null)) { this.findItemsByKeywordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnfindItemsByKeywordsOperationCompleted); } this.InvokeAsync("findItemsByKeywords", new object[] { findItemsByKeywordsRequest}, this.findItemsByKeywordsOperationCompleted, userState); }
/// <remarks/> public void findItemsByKeywordsAsync(FindItemsByKeywordsRequest findItemsByKeywordsRequest) { this.findItemsByKeywordsAsync(findItemsByKeywordsRequest, null); }