Results 1 to 12 of 12

Threaded View

  1. #1
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed

    Google API (VB.net)

    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

    Google.GData.Youtube

    Then Go back and add this one.


    Google.GData.Client.dll
    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/
    Last edited by NextGen1; 02-08-2010 at 01:20 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. The Following 2 Users Say Thank You to NextGen1 For This Useful Post:

    Blubb1337 (02-08-2010),Zoom (02-08-2010)

Similar Threads

  1. Google API Sucks...
    By cfsharp in forum Coders Lounge
    Replies: 2
    Last Post: 09-05-2011, 09:17 AM
  2. [Release] CAEU .NET Player API
    By Iriz3n in forum Combat Arms Europe Hacks
    Replies: 14
    Last Post: 03-17-2010, 08:41 AM
  3. [Note]Google API
    By NextGen1 in forum Visual Basic Programming
    Replies: 2
    Last Post: 02-14-2010, 06:03 PM
  4. Google Having To Copy Ideas?
    By Dave84311 in forum General
    Replies: 11
    Last Post: 01-20-2008, 09:05 AM
  5. [Help] Atom API with Visual Basic 6.0 or .NET
    By Bull3t in forum Visual Basic Programming
    Replies: 5
    Last Post: 07-23-2006, 09:21 AM