SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler 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

Mais conteúdo relacionado

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Último (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

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