A quixotic quest to use all the APIs at HackNY 2012s
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
nyanmap
screenshots
static
templates
.gitignore
README
aviary_api.py
config.py.tmp
doco_api.py
etsy_api.py
nyt_newswire_fetch.py
server.py
tempout.html
tumblr_api.py
tumblr_out.py

README

README
--------------------------------------------------------------------------------

Wherein we try and make a stupid app that uses all the APIs

~~~
etsy_api.py
""" to use:
import etsy_api
from api import (Etsy_API, Listings)
etsy_api.Listings().findAllListingActive('nyancat')
"""
returns python dictionary of JSON results~
=>Sample results
{u'count': 50100, u'type': u'Listing', u'pagination': {u'effective_limit': 25, u'effective_page': 1, u'next_page': 2, u'effective_offset': 0, u'next_offset': 25}, u'params': {u'category': None, u'min_price': None, u'lat': None, u'tags': None, u'color': None, u'sort_on': u'created',  ...


~~
Donors Choose API

import doco_api
from doco_api import (Doco_API, Geo)
testAPI = doco_api.Geo()
testAPI.ProjectsNearLatLong(40.776104,-73.920822)
=> results in format:
return (titles, proposalURLs)
=>Sample results (python dictionary of JSON results):
>>> testAPI.ProjectsNearLatLong(40.776104,-73.920822)
OUTDATED this is example output for (titles) only
http://api.donorschoose.org/common/json_feed.html?&APIKey=DONORSCHOOSE&centerLat=40.776104&centerLng=-73.920822
{u'index': u'0', u'max': u'10', u'proposals': [{u'totalPrice': u'273.85', u'percentFunded': u'0', u'schoolName': u'Ps 122 Mamie Fay', u'fundURL': u'https://secure.donorschoose.org/donors/givingCart.html?proposalid=718970&donationAmount=&utm_source=api&utm_medium=feed&utm_content=fundlink&utm_campaign=DONORSCHOOSE', u'expirationDate': u'2012-06-13', u'proposalURL': u'http://www.donorschoose.org/donors/proposal.html?id=718970&utm_source=api&utm_medium=

~~~
Tumblr API

import tumblr_api
from tumblr_api import (Tumblr_API, Posts)
testAPI = tumblr_api.Posts()
testAPI.PhotosFromUser('nyancatwashere')

=> Sample Results
[u'http://27.media.tumblr.com/tumblr_lvhtm8h3CL1qm280wo1_500.jpg', u'http://30.media.tumblr.com/tumblr_lvhtpgBwNn1qm280wo1_400.jpg', u'http://29.media.tumblr.com/tumblr_lvhtoffPoR1qm280wo1_400.jpg', u'http://30.media.tumblr.com/tumblr_lvhtmtnnHQ1qm280wo1_500.jpg', u'http://www.tumblr.com/photo/1280/nyancatwashere/13972524882/1/tumblr_lvhtk0mw281qm280w', u'http://www.tumblr.com/photo/1280/nyancatwashere/13925449117/1/tumblr_lvhacjq8A31qm280w', ...