Calling a Web API from Microsoft Office Using NET

Another way you can call Web APIs from Microsoft Office is by calling a .NET program from Office. To call a .NET program from Office, you need Visual Studio .NET 2003, as well as the Visual Studio Tools for the Microsoft Office System program. Both of these are available for purchase from Microsoft, and you can find more information on Microsoft's Web site. Visual Studio Tools for Microsoft Office basically allows you to use the Visual Studio .NET interface to create code that gets called from...

Figure

Add the following code to the btnRetrieve_Click event, inserting your developer code in the appropriate line of code. btnRetrieve_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles btnRetrieve.Click Search As New Google.GoogleSearchService 'set the values to pass to the Google web service strLicense YOUR KEY GOES HERE 'call the doGetCachedPage method and write the results to the Dim bytPage() As Byte Search.doGetCachedPage(strLicense, _ 'convert base 64 byte array...

Using the eBay API

Unless you have been living in a cave, you have heard about eBay, and you probably have used eBay yourself to purchase or sell items. eBay is known for inventing the online global marketplace that brings millions of people all over the world together to sell new and used items. eBay is making it easier than ever before for you to write your own software applications using the eBay API or the eBay SDK to interact with eBay features. You can obtain a free developer account that can be used for...

Alexa Web Information Service API Query Syntax

The Alexa Web Information Service is in beta version at the time of this book's writing. Thus, the format discussed herein could change drastically in the final release. Using AWIS is currently free, but you are limited to 10,000 calls per day. For more information on these limitations, consult the licensing agreement. Amazon indicates that they may charge for using the service in the future. The AWIS API has one service called AWSAlexa that you can use in your applications to execute various...

Anatomy of a Web API

In this chapter, you will learn the basic concepts of Web APIs that I use throughout the rest of the book. Web APIs are application programming interfaces that can be called over standard Internet protocols. Many companies are using Web APIs to expose functionality in their existing systems in a platform-neutral manner. Other companies are building applications from the ground up as Web APIs. Web APIs generally allow remote computers on different platforms to talk to each other using methods...

Walkthrough Example Calling the eBay API Using Httppost from Visual Studio NET

This section contains a step-by-step example of using HTTP-POST to call the eBay Web service from Visual Studio .NET. In this example, you call the GetSearchResults operation to look up all eBay auction items in the Sandbox environment that have the word computer and 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 SOAP example as well. 1. Open Visual Studio .NET and select File O New O Project. 2. Select Visual Basic...

Using the Google API

A lot of attention has surrounded Google and the services it provides, especially with media attention focused on Google as a new publicly held company. Google has made several of its popular features available in an API to developers to use in their own applications. This chapter covers the Google API in great detail and is the first of several API-specific chapters in which I explore a particular API in detail. The following topics will be covered Introduction to Google as a search engine How...

Executing a Query

Now that you have a basic idea of the types of operations supported by the PayPal API, let's look at some simple code examples to see how they work. PayPal API calls can be executed using SOAP operations. As you recall, with SOAP operations, you have to specify the location of the WSDL file that describes the Web API and then create a proxy so that your program knows how to communicate with the Web API. Visual Studio .NET handles the creation of the proxy for you when you add a Web reference....

Walkthrough Example Calling the eBay API Using SOAP from Visual Studio NET

You can extend the prior example to add the functionality to call the eBay API using SOAP. Because you are using SOAP instead of HTTP-POST, the steps to call that same Web service are quite different. 1. Reopen the eBaySample application you created in the prior example if it is not already open. 2. Add a reference to the eBay API by selecting Project O Add Web Reference. For the URL field, specify the location of the WSDL file, for example with this URL http developer.ebay. 3. Click the GO...

SOAP Example

Add the following Example3 procedure to the code section of the existing project. Replace the values where specified with your own eBay credentials. Also replace the User ID value with a valid User ID of a seller for whom you wish to retrieve a list of items. Dim strToken As String Dim strDevId As String Dim strAppId As String Dim strCertId As String 'specify credentials required to access API strToken Your Token Here strDevId Your Dev Id Here strAppId Your App Id Here strCertId Your Cert Id...

Obtain Information on Points of Interests

In this example, you look up all the Fourth Coffee Shops present in a given city. This example uses the FindByProperty method of the Find service and accesses the MapPoint.FourthCoffeeSample data source. You continue to work with the Web project you created in Example 3. 1. Add the following Examples procedure to the Web form, inserting your customer ID and password in the appropriate lines of code 'Purpose Retrieves list of Fourth Coffee Shops in 'specified US city Uses City and State Region...