Adding API References to VB.NET
(This is a completion to a request, this is number 1 [4 more to go])
Sorry it's taking so long.
Here is a tutorial on how you can access Google API , this can open a new world to all developers as there are 1000's of sites which use API and has a WSDL for reference.
Note: Youtube is the big one, using YouTube API you can add YouTube Players and Videos to your projects
( lolland can make a application that houses all his video tutorials internally :P)
We will be referencing Google's Search API, allowing you to embed (without browser) a Google Search using VB controls (or Youtube Videos, plus all of their features , like login, remove video upload video , etc. use this to make widgets, etc. , I am sharing this A. for learning and B. This will hopefully spark some ideas for those who are out of them )
As always Open VB.net and follow along.
Download Google API SDK
Code:
https://code.google.com/p/google-gdata/downloads/list
Note: It is the MSI (Visual Studio Reference)
[IMG]https://i111.photobucke*****m/albums/n121/golmor/image1-2.jpg[/IMG]
After the MSI has Downloaded, Run the Install file and complete it
[IMG]https://i111.photobucke*****m/albums/n121/golmor/Part2.jpg[/IMG]
Now we need to add the reference.
Note: The binaries and DLL files can be found in the default install location ( "C:\Program Files\Google\Google Data API SDK\Sources\Samples\")
Right click your project name in your solutions explorer.
Select "Add Reference"
[IMG]https://i111.photobucke*****m/albums/n121/golmor/pic3-1.jpg[/IMG]
Click the Browse tab.
Goto C:\ ---> Program Files -----> Google ---- > Google Data API SDK ----> Redist"
Note: this is the default location, if you setup a different location then navigate to the Redist folder inside of your chosen location.
Select
Then Go back and add this one.
and
Google.GData.Extensions.dll
Note: There are others in the folder, play around with them if you like. (Youtube API references are in there as well )
Now that the references are added we can take advatage of the API and use them inside our program, lets do a simple search (though the possibilities are endless)
In Code View above Public Class FormName add
Code:
Imports Google.GData.Client
Imports Google.GData.Extensions
Imports Google.Youtube
' The next two are not needed for this tutorial, however I have included them
' because as you begin to get more into using API (google) you may save information
' or post to ASP.net or someother website, (or use emails to send information, like search results)
Imports System.IO
Imports System.Web
After that you will now have access to Google and Youtube API
Such as
Search
Request
Post
Delete (youtube Video)
Etc. Etc. Etc.
I am working on a sample project (OpenS) of course, and I will post it in this thread, it will Search google, Google images and allow embedding of youtube videos.
Some (alot of) websites that allow API have WSDL (XML) Web Refernces which can be accessed in a similiar matter, if you come across some API (SOAP) let me know and I will write a tut on how to acccess the API
and use it in your software, this is a much better approach to Web Douments.
Hope this helps.
API References can be found here
Code:
https://code.google.com/more/