Skip to content

Instantly share code, notes, and snippets.

@willvanwazer
Created August 15, 2013 17:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save willvanwazer/6242581 to your computer and use it in GitHub Desktop.
Save willvanwazer/6242581 to your computer and use it in GitHub Desktop.
import requests
CLIENT_KEY=""
EMAIL=""
PASSWORD=""
AUTHORIZE_ENDPOINT="http://feedwrangler.net/api/v2/users/authorize?email=%s&password=%s&client_key=%s" % (EMAIL, PASSWORD, CLIENT_KEY)
authorize = requests.get(AUTHORIZE_ENDPOINT)
access_token = authorize.json()['access_token']
STREAMS_ENDPOINT="http://feedwrangler.net/api/v2/streams/list?access_token=%s" % access_token
streams = requests.get(STREAMS_ENDPOINT)
for stream in streams.json['streams']:
print "Title: " + str(stream['title']) + " Query: " + str(stream['search_term'])
STARRED_ITEMS_ENDPOINT="http://feedwrangler.net/api/v2/feed_items/list?starred=true&access_token=%s" % access_token
starred = requests.get(STARRED_ITEMS_ENDPOINT)
for starred_item in starred.json['feed_items']:
print starred_item['title']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment