SlideShare a Scribd company logo
1 of 32
Download to read offline
Google API



Karola Weischenberg, André Küpper, Marco Vreydal, Russel Fossi
                                                             The slides are licensed under a
                                                  Creative Commons Attribution 3.0 License

      14.12.2010        Web Technologies
Overview
●   What's an API?
●   Google APIs
     ●   List of all APIs
     ●   Google Custom Search API
     ●   YouTube API
     ●   Google Maps API
●   Example Google Maps API
     ●   Adding map
     ●   Adding mouse event listener
     ●   Adding User Input to Map
●   MashUp (Live Coding)

2                           Web Technologies
What's an API?



                                Offers methods


            ApplicationProgrammingInterface
Uses methods without
knowing the code




3                Web Technologies
What's an API?
    Application Programming Interface
    Pros:
●   Easy to use, if API is well documented
●   Not everybody has to programm eyerything
    (reinvent the wheel)
●   Mashups are easier to create
    Cons:
●   You don´t know exactly how it works
●   It´s Google!
                                         http://trendsupdates.com/good-ridance-arthur-levinson/



4                     Web Technologies
Overview
●   What's an API?
●   Google APIs
     ●   List of all APIs
     ●   Google Custom Search API
     ●   YouTube API
     ●   Google Maps API
●   Example Google Maps API
     ●   Adding map
     ●   Adding mouse event listener
     ●   Adding User Input to Map
●   MashUp (Live Coding)

5                           Web Technologies
Google API

●   there is not only one „Google API“
●   Google provides many different APIs




                                          http://www.globecartoon.com

6                    Web Technologies
List of all APIs




7             Web Technologies
Google API


    Short introduction of three main APIs:
    ●   Google Custom Search Engine
    ●   YouTube
    ●   Google Maps




                                         http://www.techforceindia.co.uk/How_we_Work.htm


8                     Web Technologies
Overview
●   What's an API?
●   Google APIs
     ●   List of all APIs
     ●   Google Custom Search API
     ●   YouTube API
     ●   Google Maps API
●   Example Google Maps API
     ●   Adding map
     ●   Adding mouse event listener
     ●   Adding User Input to Map
●   MashUp (Live Coding)

9                           Web Technologies
Google Custom Search APIs
Google Search Engine – The heart of Google

 ●    Possibility for using the search engine of Google

 ●    Search over a single website or a collection of websites

 ●    Create a search engine tailored to your needs and interests.

 ●    Present results in your website

 ●    Prioritize or restrict search results based on websites you
      specify.


 10                     Web Technologies
Google Custom Search APIs
Google Search Engine – The heart of Google

 ●    Possibility for using the search engine of Google

 ●    Search over a single website or a collection of websites

 ●    Create a search engine tailored to your needs and interests.

 ●    Present results in your website

 ●    Prioritize or restrict search results based on websites you
      specify.


 11                     Web Technologies
Google Custom Search APIs
Very easy to use:

●    Sign in to Google account
●    Choose your settings
●    Get generated code
●    Embed code to your website




12                    Web Technologies
Google Custom Search APIs

google.setOnLoadCallback(function() {

var customSearchControl =
               new google.search.SearchControl(ID)
customSearchControl.setResultSetSize(switchTo);
var options = new google.search.DrawOptions();
options.setSearchFormRoot('cse-search-form');
customSearchControl.draw('cse', options);

 }, true);


 <div id="cse" style="width:100%;"></div>

 13               Web Technologies
Overview
●    What's an API?
●    Google APIs
     ●   List of all APIs
     ●   Google Custom Search API
     ●   YouTube API
     ●   Google Maps API
●    Example Google Maps API
     ●   Adding map
     ●   Adding mouse event listener
     ●   Adding User Input to Map
●    MashUp (Live Coding)

14                          Web Technologies
YouTube API
YouTube – Famous Video Platform
●    YouTube APIs and tools enables people to integrate YouTube
     videos content and functionality into websites, software
     applications or other devices.
●    Three types of functionality: Basic, medium an advanced
     ●   Custom Player and Widgets             Using only HTML
     ●   Player APIs and embedded Player
     ●   DATA API and chromeless player              JavaScript
                                                     ActionScript



                                           Java, .net, PHP, Python

15                    Web Technologies
YouTube API

●    More flexible than regular embedded players
      ●   add videos favourites, or play list
      ●   Choose from different layouts and Schemes


●    Any change updated automatically
      ●   colour change


●    The API enable your application to search for YouTube
      content(demonstrate it in the mash up)




16                          Web Technologies
Overview
●    What's an API?
●    Google APIs
     ●   List of all APIs
     ●   Google Custom Search API
     ●   YouTube API
     ●   Google Maps API
●    Example Google Maps API
     ●   Adding map
     ●   Adding mouse event listener
     ●   Adding User Input to Map
●    MashUp (Live Coding)

17                          Web Technologies
Google Maps APIs


                  Static Maps API:
               only creating an URL
                  and embedding
             this URL in an <img> tag




18         Web Technologies
Google Maps APIs


                 Web Services:
             using URL-request and
             manipulate the reuslts in
                 JSON or XML




19         Web Technologies
Google Maps APIs


                Maps API for flash:
                 embed Maps in
                flash applications




20         Web Technologies
Google Maps APIs


              Maps API JavaScript:
                we use this one
               on our web project




21         Web Technologies
Google Maps APIs


                 Google Earth API:
               needs Google Earth
              Plug-in for the browser
                and uses JavaScript




22         Web Technologies
Overview
●    What's an API?
●    Google APIs
     ●   List of all APIs
     ●   Google Custom Search API
     ●   YouTube API
     ●   Google Maps API
●    Example Google Maps API
     ●   Adding map
     ●   Adding mouse event listener
     ●   Adding User Input to Map
●    MashUp (Live Coding)

23                          Web Technologies
Example: Google Maps API




     Fits perfect in our project
     ●   Travel Together
          –   Users can offer tours
          –   Users can choose the best one
          –   Users can comment tours
     ●   In context: Generate Map with information about the
         offered tours


24                         Web Technologies
Connection and adding Map

<meta name="viewport" content="initial-scale=1.0,
   user-scalable=no"
/>
<script type="text/JavaScript" src=
   "http://maps.google.com/maps/api/js?sensor=false">
</script>




 25               Web Technologies
Connection and adding Map
<script type="text/JavaScript">
   var map;
   function initialize() {
     var latlng =
       new google.maps.LatLng(-34.397, 150.644);
     var myOptions = {
       zoom: 8,
       center: latlng,
       mapTypeId: google.maps.MapTypeId.ROADMAP
     }
     map = new google.maps.Map(document.getElementById
       ("map_canvas"), myOptions);
   }
</script>
<body onload="initialize()">
  <div id="map_canvas" style="width:1000px;
       height:500px"></div>
</body>


26                Web Technologies
Adding Mouse Event Listeners
var map;
   var marker;
   function initialize() {
     var latlng =
      new google.maps.LatLng(-34.397, 150.644);
     var myOptions = {
       zoom: 8,
       center: latlng,
       mapTypeId: google.maps.MapTypeId.ROADMAP
     }
     map = new google.maps.Map(document.getElementById
      ("map_canvas"), myOptions);

         google.maps.event.addListener(map, 'click',
             function(event) {
             placeMarker(event.latLng);
         });
     }


27                   Web Technologies
Adding Mouse Event Listener
     function placeMarker(location) {
          marker = new google.maps.Marker({
              position: location,
              map: map
          });
          map.setCenter(location);
     }




28             Web Technologies
Adding Information of tours
function attachMessage(marker) {
     var message = document.getElementById("description").value;
     var infowindow = new google.maps.InfoWindow(
         { content: message,
           size: new google.maps.Size(50,50)
         });
     google.maps.event.addListener(marker, 'click', function() {
       infowindow.open(map,marker);
     });
   }




<body onload="initialize()">
  <div id="map_canvas" style="width:1000px; height:500px"></div>
  <input type="text" name="description" value=""
          id="description" size="20">
</body>



 29                  Web Technologies
Overview
●    What's an API?
●    Google APIs
     ●   List of all APIs
     ●   Google Custom Search API
     ●   YouTube API
     ●   Google Maps API
●    Example Google Maps API
     ●   Adding map
     ●   Adding mouse event listener
     ●   Adding User Input to Map
●    MashUp (Live Coding)

30                          Web Technologies
Mashup

                                           User Input (e.g a click)


                       Google Maps API

Maps API output = YouTube API input



                          YouTube API



               Google Maps Video Finder
31                      Web Technologies
Any other places you want to travel to?

         Thank you, for your attention.




32              Web Technologies

More Related Content

Viewers also liked (12)

Twitter skola för BNI Avenyn 28 september 2012
Twitter skola för BNI Avenyn 28 september 2012Twitter skola för BNI Avenyn 28 september 2012
Twitter skola för BNI Avenyn 28 september 2012
 
S Strategy Eecondlife 2011
S Strategy Eecondlife 2011S Strategy Eecondlife 2011
S Strategy Eecondlife 2011
 
Speaker
SpeakerSpeaker
Speaker
 
Kort om Facebook för BNI Avenyn
Kort om Facebook för BNI AvenynKort om Facebook för BNI Avenyn
Kort om Facebook för BNI Avenyn
 
Photo Album
Photo  AlbumPhoto  Album
Photo Album
 
Nibiru final update
Nibiru final updateNibiru final update
Nibiru final update
 
K3
K3K3
K3
 
Modul k3 lh
Modul k3 lhModul k3 lh
Modul k3 lh
 
Komunikasi daring
Komunikasi daringKomunikasi daring
Komunikasi daring
 
Pengenalan dan penggunaan peralatan gatek
Pengenalan dan penggunaan peralatan gatekPengenalan dan penggunaan peralatan gatek
Pengenalan dan penggunaan peralatan gatek
 
Modul praktikum instruksi dasar
Modul praktikum instruksi dasarModul praktikum instruksi dasar
Modul praktikum instruksi dasar
 
Pengenalan bentuk dan fungsi garis gambar
Pengenalan bentuk dan fungsi garis gambarPengenalan bentuk dan fungsi garis gambar
Pengenalan bentuk dan fungsi garis gambar
 

Similar to Google API

Integrating Google APIs into Your Applications
Integrating Google APIs into Your ApplicationsIntegrating Google APIs into Your Applications
Integrating Google APIs into Your ApplicationsChris Schalk
 
Using the Google AJAX APIs
Using the Google AJAX APIsUsing the Google AJAX APIs
Using the Google AJAX APIsChris Schalk
 
Google Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 yearsGoogle Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 yearsPatrick Chanezon
 
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Caktus Group
 
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Caktus Group
 
G Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopG Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopwesley chun
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform UpdateIdo Green
 
Intro to Web Map APIs
Intro to Web Map APIsIntro to Web Map APIs
Intro to Web Map APIsYos Riady
 
Android
AndroidAndroid
Androidscottw
 
Google's serverless journey: past to present
Google's serverless journey: past to presentGoogle's serverless journey: past to present
Google's serverless journey: past to presentwesley chun
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Natalia Efimtseva
 
Advanced Gadget And Ui Development Using Googles Ajax Ap Is
Advanced Gadget And Ui Development Using Googles Ajax Ap IsAdvanced Gadget And Ui Development Using Googles Ajax Ap Is
Advanced Gadget And Ui Development Using Googles Ajax Ap IsGoogleTecTalks
 
[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps APIGoogle Cloud Platform - Japan
 
Google Location Services
Google Location ServicesGoogle Location Services
Google Location ServicesVishal Sapariya
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Ido Green
 
South America 2008: Open Social For Brand Advertising and Media
South America 2008: Open Social For Brand Advertising and MediaSouth America 2008: Open Social For Brand Advertising and Media
South America 2008: Open Social For Brand Advertising and MediaPatrick Chanezon
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_startedAhsanul Karim
 
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)Open API Initiative (OAI)
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 

Similar to Google API (20)

Integrating Google APIs into Your Applications
Integrating Google APIs into Your ApplicationsIntegrating Google APIs into Your Applications
Integrating Google APIs into Your Applications
 
Using the Google AJAX APIs
Using the Google AJAX APIsUsing the Google AJAX APIs
Using the Google AJAX APIs
 
Google Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 yearsGoogle Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 years
 
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
 
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
Write an API for Almost Anything: The Amazing Power and Flexibility of Django...
 
G Suite & Google APIs coding workshop
G Suite & Google APIs coding workshopG Suite & Google APIs coding workshop
G Suite & Google APIs coding workshop
 
Google Cloud Platform Update
Google Cloud Platform UpdateGoogle Cloud Platform Update
Google Cloud Platform Update
 
Intro to Web Map APIs
Intro to Web Map APIsIntro to Web Map APIs
Intro to Web Map APIs
 
Android
AndroidAndroid
Android
 
Google's serverless journey: past to present
Google's serverless journey: past to presentGoogle's serverless journey: past to present
Google's serverless journey: past to present
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)
 
Advanced Gadget And Ui Development Using Googles Ajax Ap Is
Advanced Gadget And Ui Development Using Googles Ajax Ap IsAdvanced Gadget And Ui Development Using Googles Ajax Ap Is
Advanced Gadget And Ui Development Using Googles Ajax Ap Is
 
[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API[English] Create Mobile LBS Application Using Maps API
[English] Create Mobile LBS Application Using Maps API
 
Google Location Services
Google Location ServicesGoogle Location Services
Google Location Services
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)
 
South America 2008: Open Social For Brand Advertising and Media
South America 2008: Open Social For Brand Advertising and MediaSouth America 2008: Open Social For Brand Advertising and Media
South America 2008: Open Social For Brand Advertising and Media
 
Day1 before getting_started
Day1 before getting_startedDay1 before getting_started
Day1 before getting_started
 
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
OpenAPI Spec at Google (Open API Initiative Meetup on 2016-09-15)
 
Android Presentation
Android PresentationAndroid Presentation
Android Presentation
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 

Recently uploaded

SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Google API

  • 1. Google API Karola Weischenberg, André Küpper, Marco Vreydal, Russel Fossi The slides are licensed under a Creative Commons Attribution 3.0 License 14.12.2010 Web Technologies
  • 2. Overview ● What's an API? ● Google APIs ● List of all APIs ● Google Custom Search API ● YouTube API ● Google Maps API ● Example Google Maps API ● Adding map ● Adding mouse event listener ● Adding User Input to Map ● MashUp (Live Coding) 2 Web Technologies
  • 3. What's an API? Offers methods ApplicationProgrammingInterface Uses methods without knowing the code 3 Web Technologies
  • 4. What's an API? Application Programming Interface Pros: ● Easy to use, if API is well documented ● Not everybody has to programm eyerything (reinvent the wheel) ● Mashups are easier to create Cons: ● You don´t know exactly how it works ● It´s Google! http://trendsupdates.com/good-ridance-arthur-levinson/ 4 Web Technologies
  • 5. Overview ● What's an API? ● Google APIs ● List of all APIs ● Google Custom Search API ● YouTube API ● Google Maps API ● Example Google Maps API ● Adding map ● Adding mouse event listener ● Adding User Input to Map ● MashUp (Live Coding) 5 Web Technologies
  • 6. Google API ● there is not only one „Google API“ ● Google provides many different APIs http://www.globecartoon.com 6 Web Technologies
  • 7. List of all APIs 7 Web Technologies
  • 8. Google API Short introduction of three main APIs: ● Google Custom Search Engine ● YouTube ● Google Maps http://www.techforceindia.co.uk/How_we_Work.htm 8 Web Technologies
  • 9. Overview ● What's an API? ● Google APIs ● List of all APIs ● Google Custom Search API ● YouTube API ● Google Maps API ● Example Google Maps API ● Adding map ● Adding mouse event listener ● Adding User Input to Map ● MashUp (Live Coding) 9 Web Technologies
  • 10. Google Custom Search APIs Google Search Engine – The heart of Google ● Possibility for using the search engine of Google ● Search over a single website or a collection of websites ● Create a search engine tailored to your needs and interests. ● Present results in your website ● Prioritize or restrict search results based on websites you specify. 10 Web Technologies
  • 11. Google Custom Search APIs Google Search Engine – The heart of Google ● Possibility for using the search engine of Google ● Search over a single website or a collection of websites ● Create a search engine tailored to your needs and interests. ● Present results in your website ● Prioritize or restrict search results based on websites you specify. 11 Web Technologies
  • 12. Google Custom Search APIs Very easy to use: ● Sign in to Google account ● Choose your settings ● Get generated code ● Embed code to your website 12 Web Technologies
  • 13. Google Custom Search APIs google.setOnLoadCallback(function() { var customSearchControl = new google.search.SearchControl(ID) customSearchControl.setResultSetSize(switchTo); var options = new google.search.DrawOptions(); options.setSearchFormRoot('cse-search-form'); customSearchControl.draw('cse', options); }, true); <div id="cse" style="width:100%;"></div> 13 Web Technologies
  • 14. Overview ● What's an API? ● Google APIs ● List of all APIs ● Google Custom Search API ● YouTube API ● Google Maps API ● Example Google Maps API ● Adding map ● Adding mouse event listener ● Adding User Input to Map ● MashUp (Live Coding) 14 Web Technologies
  • 15. YouTube API YouTube – Famous Video Platform ● YouTube APIs and tools enables people to integrate YouTube videos content and functionality into websites, software applications or other devices. ● Three types of functionality: Basic, medium an advanced ● Custom Player and Widgets Using only HTML ● Player APIs and embedded Player ● DATA API and chromeless player JavaScript ActionScript Java, .net, PHP, Python 15 Web Technologies
  • 16. YouTube API ● More flexible than regular embedded players ● add videos favourites, or play list ● Choose from different layouts and Schemes ● Any change updated automatically ● colour change ● The API enable your application to search for YouTube content(demonstrate it in the mash up) 16 Web Technologies
  • 17. Overview ● What's an API? ● Google APIs ● List of all APIs ● Google Custom Search API ● YouTube API ● Google Maps API ● Example Google Maps API ● Adding map ● Adding mouse event listener ● Adding User Input to Map ● MashUp (Live Coding) 17 Web Technologies
  • 18. Google Maps APIs Static Maps API: only creating an URL and embedding this URL in an <img> tag 18 Web Technologies
  • 19. Google Maps APIs Web Services: using URL-request and manipulate the reuslts in JSON or XML 19 Web Technologies
  • 20. Google Maps APIs Maps API for flash: embed Maps in flash applications 20 Web Technologies
  • 21. Google Maps APIs Maps API JavaScript: we use this one on our web project 21 Web Technologies
  • 22. Google Maps APIs Google Earth API: needs Google Earth Plug-in for the browser and uses JavaScript 22 Web Technologies
  • 23. Overview ● What's an API? ● Google APIs ● List of all APIs ● Google Custom Search API ● YouTube API ● Google Maps API ● Example Google Maps API ● Adding map ● Adding mouse event listener ● Adding User Input to Map ● MashUp (Live Coding) 23 Web Technologies
  • 24. Example: Google Maps API Fits perfect in our project ● Travel Together – Users can offer tours – Users can choose the best one – Users can comment tours ● In context: Generate Map with information about the offered tours 24 Web Technologies
  • 25. Connection and adding Map <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/JavaScript" src= "http://maps.google.com/maps/api/js?sensor=false"> </script> 25 Web Technologies
  • 26. Connection and adding Map <script type="text/JavaScript"> var map; function initialize() { var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById ("map_canvas"), myOptions); } </script> <body onload="initialize()"> <div id="map_canvas" style="width:1000px; height:500px"></div> </body> 26 Web Technologies
  • 27. Adding Mouse Event Listeners var map; var marker; function initialize() { var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById ("map_canvas"), myOptions); google.maps.event.addListener(map, 'click', function(event) { placeMarker(event.latLng); }); } 27 Web Technologies
  • 28. Adding Mouse Event Listener function placeMarker(location) { marker = new google.maps.Marker({ position: location, map: map }); map.setCenter(location); } 28 Web Technologies
  • 29. Adding Information of tours function attachMessage(marker) { var message = document.getElementById("description").value; var infowindow = new google.maps.InfoWindow( { content: message, size: new google.maps.Size(50,50) }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } <body onload="initialize()"> <div id="map_canvas" style="width:1000px; height:500px"></div> <input type="text" name="description" value="" id="description" size="20"> </body> 29 Web Technologies
  • 30. Overview ● What's an API? ● Google APIs ● List of all APIs ● Google Custom Search API ● YouTube API ● Google Maps API ● Example Google Maps API ● Adding map ● Adding mouse event listener ● Adding User Input to Map ● MashUp (Live Coding) 30 Web Technologies
  • 31. Mashup User Input (e.g a click) Google Maps API Maps API output = YouTube API input YouTube API Google Maps Video Finder 31 Web Technologies
  • 32. Any other places you want to travel to? Thank you, for your attention. 32 Web Technologies