API Overview - John Verostek

advertisement
Modeler
API Paradox
API Data Useful for Career Decisions?
No
Yes
Access to API
Data without
learning API
Mechanics?
No
API Skills
Required
for Job?
Learn a Skill
Not Needed
for a Job
Yes
14,954
3,491,915
0.4%
API Templates: Authorization
import oauth2 as oauth
import urllib2 as urllib
# See Assignment 1 instructions
# or README for how to get these credentials
access_token_key = "<Enter your access token key here>"
access_token_secret = "<Enter your access token secret here>"
consumer_key = "<Enter consumer key>"
consumer_secret = "<Enter consumer secret>"
_debug = 0
oauth_token
= oauth.Token(key=access_token_key,
secret=access_token_secret)
oauth_consumer = oauth.Consumer(key=consumer_key,
secret=consumer_secret)
API Templates: Pull Data
def fetchsamples():
url =
"https://stream.twitter.com/1/statuses/sample.json"
parameters = []
response = twitterreq(url, "GET", parameters)
for line in response:
print line.strip()
if __name__ == '__main__':
fetchsamples()
API Overview
Application Programming Interface
• E-Bay
• Short Examples – R, Javascript, PhP
• Career Related APIs
Users buy and sell items using the eBay online interface
Source: eBay
With the eBay API, communicate directly with the eBay database in XML format.
partners
ODBC
Source: eBay
JSON
Source: eBay
ebay.com
Source: ebay
HTML: Hyper Text Markup Language
With the eBay API, communicate directly with the eBay database in XML format.
ODBC
JSON
Web Scraping
Source: ebay
XML: eXtensible Markup Language
http://open.api.ebay.com/shopping?callname=FindPopularItems&responseencoding=XML&appid=
JohnVero-34f1-4c5f-9423-cf1fd36337be&siteid=0&QueryKeywords=redsox&version=849
IF
an API is Public
WYSIWYG
What You See Is What You Get
most organizations
require you to register
you will then receive an
API Key
http://open.api.ebay.com/shopping?callname=FindPopularItems&responseencoding=XML&appid=
JohnVero-XXXX&siteid=0&QueryKeywords=redsox&version=849
URL
ORG API
CONTENT
http://open.api.ebay.com/
FORMAT
XML JSON
&responseencoding=XML
shopping?callname=FindPopularItems
KEYWORD
API KEY
Oauth
&QueryKeywords=redsox
&appid=JohnVero-XXXXXXXXXXXXXXXXXXXXXX
&Page
&Parameters
&Sort
XML - eXtensible Markup Language
JSON: JavaScript Object Notation
Applications
Analytics
Javascript Code
Job and Career APIs
Mobile
• MBTA
175m+ professionals (as of August 2, 2012)
What
Hiring Solutions
Marketing Solutions
Premium Subscriptions
Total Revenue
$ Million
$121.6M
$63.1M
$43.5M
$228.2
https://developer.linkedin.com/partner
https://developer.linkedin.com/documents/authentication
Download