Web Page Design and Hosting

April 29, 2007

.ReviseItem Revise an item listed with the AddItemmethod. .SetSellerPaymentAddress Specify

Filed under: professional development with web apis — webmaster @ 8:27 am

Figure 5-94.Add the following procedure to Form1for the click event for the first button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles Button1.ClickDim web As New System.Net.WebClientDim strDevId As StringDim strAppId As StringDim strCertId As String specify credentials required to access APIstrDevId = Your Dev Id Here strAppId = Your App Id Here strCertId = Your Cert Id Here specify the configuration headersweb.Headers.Add( X-EBAY-API-CALL-NAME , GetSearchResults ) web.Headers.Add( X-EBAY-API-SITEID , 0 ) web.Headers.Add( X-EBAY-API-DETAIL-LEVEL , 0 ) web.Headers.Add( X-EBAY-API-COMPATIBILITY-LEVEL , 311 ) web.Headers.Add( Content-Type , text/xml ) add required security headers for all API callsweb.Headers.Add( X-EBAY-API-SESSION-CERTIFICATE , strDevId + ; + _ 128Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Mac Web Hosting services


.ReviseItem Revise an item listed with the AddItemmethod. .SetSellerPaymentAddress Specify

Filed under: professional development with web apis — webmaster @ 8:27 am

.ReviseItem Revise an item listed with the AddItemmethod. .SetSellerPaymentAddress Specify a seller s shipping address. .ValidateTestUserRegistration Activate a test user. .VerifyAddItem Validate the arguments for AddItem. Executing a Query Using HTTP-POSTNow that you have a basic idea of the types of operations supported by the eBay, let s look at some ple code examples to see how they work. eBay API calls can be executed using HTTP-POST operationsor SOAPoperations. In this section, you walk through the basics of executing queries against the eBayAPI using HTTP-POST. Just as with HTTP-GET (REST) style operations, with HTTP-POST operations you have to build thecommand in your code and then submit the HTTPpost operation to execute the command. The differ- ence with HTTP-POST is that you actually submit an XMLfile with various parameters describing to be performed and the values to use in the operation. As you may recall, with REST-styleoperations, the parameters are included as part of a URLand not submitted as a separate XMLfile. In Visual Studio .NET, you can use the System.Net.WebClient.UploadDatamethod to perform POST operation, as illustrated in the following example. Walkthrough Example Calling the eBay API Using HTTP-POST from Visual Studio .NETThis section contains a step-by-step example of using HTTP-POST to call the eBay Web service fromVisual Studio .NET. In this example, you call the GetSearchResultsoperation to look up all eBay tion items in the Sandbox environment that have the word computerand are not priced higher than$1,000. You set up this example so that it can be used later in the chapter for the corresponding SOAPexample as well. 1.Open Visual Studio .NET and select File.New.Project. 2.Select Visual Basic Project as the Project Type and Windows Application as the Template. Fortheproject name, specify eBaySample, and for the path specify the location where you want to be created. Click OK to create the new project. 3.Use the toolbox to drag and drop two command buttons and one text box onto the form. Changethe text property of the first text box to HTTP-POST Example, and change the text property text box to SOAPExample. Change the multiline property of the text box to True the text box so that it is large enough to display XMLresults. An example of how the after these changes is shown in Figure 5-9.127Using

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Mac Web Hosting services


Figure 5-8These materials have been reproduced with the

Filed under: professional development with web apis — webmaster @ 3:42 am

.EndItem End a listing for an item. .GetAccount Retrieve account information for the specified user. This can be requested onlyfor your own account. .GetAdFormatLeads Retrieve sales leads for real estate listings. .GetAPIAccessRules Retrieve the access rules and usage statistics for each API call. .GetBidderList Retrieve a list of all items for a particular bidder. .GetCategories Retrieve a list of the categories that are children of a specified category. .GetCategory2DomainMap Retrieve a list of categories and their domains. .GetCategoryListings Retrieve the items listed in a particular category. .GetDescriptionTemplates Retrieve the theme and layout specifications for an item s description. .GetDomains Retrieve information about item specifics domains. .GeteBayOfficialTime Retrieve the eBay official time. .GetFeedback Retrieve feedback score information for a particular user. .GetHighBidders Retrieve the highest bidders for a Dutch auction. .GetItem Retrieve auction item information for one or more auction items. .GetItemTransactions Retrieve summary information about an item purchase. .GetLogoURL Retrieve the URLfor small, medium, or large eBay Marketplace logo images. .GetSearchResults Retrieve items that match a specified search criteria. .GetSellerEvents Retrieve prices and other information related to a seller s listings. .GetSellerList Retrieve a list of items of a particular seller. .GetSellerTransactions Retrieve transactions for a seller. .GetStoreDetails Retrieve custom categories for a user s eBay stores. .GetUser Retrieve information about a specified user. .GetWatchList Retrieve a list of items for a user s watch list. .LeaveFeedback Leave feedback for a user after an auction ends. .RelistItem Relist an item that was not sold. .ReviseCheckoutStatus Update the status of an item after user has gone through checkout. .ReviseCheckoutTransactionDetails Update transaction before the payment or checkout pro- cess is complete. 126Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services

Figure 5-8These materials have been reproduced with the

Filed under: professional development with web apis — webmaster @ 3:42 am

Figure 5-8These materials have been reproduced with the permission of eBay Inc.Copyright eBay Inc.All rights reserved. Anatomy of an eBay API QueryAt this point, you re ready to explore how an eBay API query is structured. You then take a look at examples of how to execute queries and work with the results. Query SyntaxAs you see in the code examples in the following sections, all calls to the eBay API require certain secu- rity information, such as the developer identifiers that you were provided. Currently, you can call the following methods of the eBay API: .AddItem List an item. .AddToItemDescription Modify an existing item s description, or modify an existing item shit counter.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services


April 28, 2007

Fill in the information on the screen and

Filed under: professional development with web apis — webmaster @ 10:03 pm

Figure 5-7These materials have been reproduced with the permission of eBay Inc.Copyright eBay Inc. All rights reserved. The eBay API DocumentationeBay has an extensive collection of online documentation that you should take advantage of. The onlinedocumentation includes code examples in various languages, as well as comprehensive whitepapers andother articles that illustrate how to use the API. With hundreds of pages of documentation online, it canbe a bit hard to find what you need. As mentioned in a previous section, the documentation can befound at http://developer.ebay.com. The eBay Software Developer s Kit (SDK) In addition to the eBay API, eBay has also released a software development kit (SDK) for .NET thatallows you to work with the API through another layer that does not require you to know as manydetails about the API. You can obtain the SDK from the online documentation, as well as whitepapersthat can help you decide whether to use the API directly, or whether your application will benefit fromyour using the SDK instead. This chapter focuses on the API itself, and not the SDK. 124Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

Fill in the information on the screen and

Filed under: professional development with web apis — webmaster @ 10:03 pm

Fill in the information on the screen and then click the Generate Token button. You are next prompted in to the eBay Sandbox environment. Specify the username and password for the test user accountcreated previously, as shown in Figure 5-7. Figure 5-6These materials have been reproduced with the permission of eBay Inc.Copyright eBay Inc.All rights reserved. You are prompted to accept the terms. Click the Agree button on the screen and continue. You see anotice telling you that the tokens are being generated. Do not close or refresh the browser while thetoken generation is in progress. Finally, a Token Authentication Tool screen is displayed that gives token for the specified user. An example of this is illustrated in Figure 5-8. Copy and paste your tokens from the screen to save them electronically for later use and print a copy file, too. It is very important that you save an electronic version of the token so you do not have the long token later. Now you have all the keys you need to work with the eBay API.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services

Figure 5-3These materials have been reproduced with the

Filed under: professional development with web apis — webmaster @ 4:08 pm

Before you can obtain a user token, you first must create a new user account in the Sandbox environ- ment. To register a test user, go to the Sandbox eBay Web site at http://sandbox.ebay.com. TheSandbox site looks nearly identical to the live eBay site, and it provides a place for you to test your appli- cation to ensure it works before going live. Click the links to register for a new user account and submitthe registration request. You receive an e-mail confirmation after submitting the registration for a new user account on theSandbox site. Follow the instructions in the e-mail you receive to complete the registration. For example, you will be taken to a screen that prompts you to enter your e-mail address and confirmation code fromthe e-mail. Aconfirmation screen, as shown in Figure 5-5, is then displayed to let you know the new useraccount has been created. Figure 5-5These materials have been reproduced with the permission of eBay Inc.Copyright eBay Inc.All rights reserved. Now that you have successfully established a new test user account, you are ready to obtain the usertoken to validate the test user. Navigate to http://developer.ebay.com/tokentool/ Credentials.aspx. An Authentication Token Tool like the one shown in Figure 5-6 is displayed. 122Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services

Figure 5-3These materials have been reproduced with the

Filed under: professional development with web apis — webmaster @ 4:08 pm

Figure 5-3These materials have been reproduced with the permission of eBay Inc.Copyright eBay Inc.All rights reserved. Figure 5-4These materials have been reproduced with the permission of eBay Inc.Copyright eBay Inc.All rights reserved.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services


response. The second way to call the eBay

Filed under: professional development with web apis — webmaster @ 7:43 am

Figure 5-2These materials have been reproduced with the permission of eBay Inc.Copyright eBay Inc.All rights reserved. On this screen, you should specify the developer account username and password that you just created. You are then prompted to specify your eBay user ID, password, and confirmation code as shown inFigure 5-3. Adeveloper account is not the same as an eBay account. You may already have an eBay account forbuying and selling items online, but you need a separate account to use the Web API. After you fill in the required information and click the Submit button, your individual developer codesare generated, as shown in Figure 5-4. Print the screen shown in Figure 5-4, which gives you your keys, and save them in an electronic formatas well. At this point, you have three of the four keys you need in order to use the eBay API. The remaining keyyou need is a token. eBay refers to the step of obtaining the token as the step of validating a test user or obtaining a token specific to a particular user so you can use the Sandbox test environment. 120Chapter

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services

response. The second way to call the eBay

Filed under: professional development with web apis — webmaster @ 7:43 am

response. The second way to call the eBay API is using the SOAPprotocol. These concepts are discussedin Chapter 1. Supported FeaturesThe eBay API allows you to work with the most popular eBay features from your own programs, suchas: .Retrieving auction listings that match a specified criteria .Retrieving customer reviews of a seller .Retrieving the status of a particular auction listing .Adding a new auction listing .Revising an existing auction listing .Retrieving details, such as the winning-bidder information for a particular auction listingMore details about the features supported by the eBay can be found later in this chapter, as well as eBay Web site. Licensing OptionsIn order to use the eBay API, you must first sign up for a developer account. Various tiers of developeraccounts exist. You can obtain a free individual license that allows you to use the eBay API to manageyour own listings or to test the eBay API before deciding to buy a commercial license. The individuallicense allows you to make up to 5,000 calls per day in the Sandbox (test) environment and up to 50 day in the live eBay environment for free. Commercial licenses are available for purchase as well, want to offer your solution to third parties or use the eBay API more than the individual licenseallows. In addition to the limitations on the number of calls, eBay also has a series of requirements that must to have a test application certified so that it can run in the live environment. Please consult the documentation for more information on pricing, certification, and other related information. Joining the Developer s Program and Establishing an AccountSigning up for a free individual account is not overly difficult, but it is a bit tedious. In this section, you through these steps of signing up for an account to get you up and running quickly. First, visit the eBay Web site for the API, which is currently at http://developer.ebay.com. Clickthe link under Membership that says Join. Follow the prompts on the screen to fill in the requested mation and request a developer account. Upon completing the first part of the registration successfully, you receive a confirmation e-mail. Youmust click on the link in the e-mail to go to another page for completing the registration. Upon clickingthe link in the confirmation e-mail, a screen like the one shown Figure 5-2 is then displayed.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services

« Previous PageNext Page »

Powered by Java Web Hosting