1 / 30

APIs 101 Class notes: http:// measuredvoice.com /apis-101/

APIs 101 Class notes: http:// measuredvoice.com /apis-101/. Jed Sundwall jed@measuredvoice.com @jedsundwall. Application Programming Interface. Has an API. USA.gov Social Media Registry. USA.gov Social Media Registry API + Fedsourcing. Let’s make some API calls!

ingo
Download Presentation

APIs 101 Class notes: http:// measuredvoice.com /apis-101/

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. APIs 101 Class notes: http://measuredvoice.com/apis-101/ Jed Sundwall jed@measuredvoice.com @jedsundwall

  2. ApplicationProgramming Interface

  3. Has an API

  4. USA.gov Social Media Registry

  5. USA.gov Social Media Registry API + Fedsourcing

  6. Let’s make some API calls! Step 1: Learn to read URLs

  7. google.com/search?q=beyonce

  8. google.com/search?q=beyonce

  9. google.com/search?q=beyonce command delimiter parameter value

  10. google.com/search?q=beyonce google.com/search?q=beyonce&num=1 all delimiters after the first “?” are “&”s

  11. google.com/search?q=beyonce google.com/search?q=beyonce&num=1 google.com/search?q=beyonce&num=5&hl=es

  12. google.com/search?q=beyonce google.com/search?q=beyonce&num=1 google.com/search?q=beyonce&num=5&hl=es twitter.com/?lang=es youtube.com/watch?v=iScNjy7U-Zo

  13. Step 2: Write some URLs

  14. USA.gov Social Media Registry Agencies API + Services API + Accounts API

  15. registry.usa.gov/agencies

  16. registry.usa.gov/agencies registry.usa.gov/agencies.xml

  17. registry.usa.gov/agencies registry.usa.gov/agencies.xml registry.usa.gov/agencies.json

  18. registry.usa.gov/services registry.usa.gov/services.xml registry.usa.gov/services.json

  19. registry.usa.gov/accounts registry.usa.gov/accounts.xml registry.usa.gov/accounts.json

  20. registry.usa.gov/accounts?service_id=twitter&agency_id=nasa

  21. registry.usa.gov/accounts?service_id=twitter&agency_id=nasa registry.usa.gov/accounts.xml?service_id=twitter&agency_id=nasa registry.usa.gov/accounts.json?service_id=twitter&agency_id=nasa

  22. Step 3: Tell some machines to read our data

  23. Google Spreadsheets + importXML()

  24. =importXML( "http://registry.usa.gov/agencies.xml", "//agency_name" )

  25. =importXML( "http://registry.usa.gov/agencies.xml", "//agency_name" ) data source XPath

  26. =importXML( "http://registry.usa.gov/agencies.xml", "//agency_name" ) =importXML( "http://registry.usa.gov/agencies.xml", "//agency_id" ) =importXML( "http://registry.usa.gov/services.xml", "//service_id" )

  27. =importXML( "http://registry.usa.gov/accounts.xml?service_id=twitter&agency_id=nasa", "//service_url" )

  28. So what? http://ringdemos.measuredvoice.com/flickr/test Government Twitter autocomplete in Measured Voice

  29. Create more value than you capture. – @timoreilly

  30. Don’t be afraid to ask for help. jed@measuredvoice.com @jedsundwall

More Related