Your SlideShare is downloading. ×
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Apis 101
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Apis 101

1,140

Published on

Slides explaining how to use Google Spreadsheets to access data from GSA's Social Media Registry API

Slides explaining how to use Google Spreadsheets to access data from GSA's Social Media Registry API

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,140
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • 2. What is an API. Application Programming Interface. That's jargon. It means nothing. Greg Elin called it a remote control for software. That's one way of thinking about it.
  • If you have a smartphone, it has a list of contacts, for any other program to access your contacts, it has to use the contacts' API. The contacts' API is essentially the set of instructions that define what can be done with your contacts and how to do it. In recent years, we learned that the APIs that governed access to contacts on some phones were too generous, so the APIs to access the contacts were changed.
  • 4. So, I'm going to talk about GSA's Social Media Registry and its API. Particularly, I'm going to talk about the API-first approach that GSA took when building it. 5. The issue was this: we needed lists of what was official. People were getting spoofed. Agencies were afraid of being spoofed, or being unable to assert their authority. Previously, the .gov and .mil domains gave government their own *domain*, but as governments interact with citizens on .com domains – Twitter, Facebook, or Google+ – there's a need to know what's going on out there. Both by management within government, but by journalists and citizens.
  • 6. But! How to build it? The old USA.gov way wouldn't work. *Fedsourcing*.7. And how to present it? We didn't know. So we went API first. We build an API to put stuff into the registry and an API to get stuff out. It's all documented at registry.usa.gov.
  • Learning how to read URLs blew my mind.
  • Learning how to read URLs blew my mind.
  • Type this into any cell in a Google Spreadsheet
  • Type this into any cell in a Google Spreadsheet
  • Type this into any cell in a Google Spreadsheet
  • Type this into any cell in a Google Spreadsheet
  • Transcript

    • 1. APIs 101Jed Sundwall jed@measuredvoice.com @jedsundwall
    • 2. Application Programming 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=beyoncecommand delimiter parameter value
    • 10. google.com/search?q=beyoncegoogle.com/search?q=beyonce&num=1 all delimiters after the first “?” are “&”s
    • 11. google.com/search?q=beyoncegoogle.com/search?q=beyonce&num=1google.com/search?q=beyonce&num=5&hl=es
    • 12. google.com/search?q=beyoncegoogle.com/search?q=beyonce&num=1google.com/search?q=beyonce&num=5&hl=estwitter.com/?lang=esyoutube.com/watch?v=iScNjy7U-Zo
    • 13. Step 2: Write some URLs
    • 14. USA.gov Social Media RegistryAgencies API + Services API + Accounts API
    • 15. registry.usa.gov/agencies
    • 16. registry.usa.gov/agenciesregistry.usa.gov/agencies.xml
    • 17. registry.usa.gov/agenciesregistry.usa.gov/agencies.xmlregistry.usa.gov/agencies.json
    • 18. registry.usa.gov/agenciesregistry.usa.gov/agencies.xmlregistry.usa.gov/agencies.json
    • 19. registry.usa.gov/servicesregistry.usa.gov/services.xmlregistry.usa.gov/services.json
    • 20. registry.usa.gov/accountsregistry.usa.gov/accounts.xmlregistry.usa.gov/accounts.json
    • 21. registry.usa.gov/accounts?service_id=twitter&agency_id=nasa
    • 22. registry.usa.gov/accounts?service_id=twitter&agency_id=nasaregistry.usa.gov/accounts.xml?service_id=twitter&agency_id=nasaregistry.usa.gov/accounts.json?service_id=twitter&agency_id=nasa
    • 23. Step 3: Tell some machines to read our data
    • 24. Google Spreadsheets + importXML()
    • 25. =importXML( "http://registry.usa.gov/agencies.xml", "//agency_name”)
    • 26. =importXML( "http://registry.usa.gov/agencies.xml", "//agency_name”) data source XPath
    • 27. =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”)
    • 28. =importXML("http://registry.usa.gov/accounts.xml?service_id=twitter&agency_id=nasa", "//service_url”)
    • 29. So what?
    • 30. Create more value than you capture. – @timoreilly
    • 31. Don’t be afraid to ask for help.jed@measuredvoice.com@jedsundwall

    ×