Created
September 24, 2013 18:22
-
-
Save Melevir/6689056 to your computer and use it in GitHub Desktop.
GitHub Search API example with hammock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hammock import Hammock as Github | |
github = Github('https://api.github.com') | |
headers = {'Accept': 'application/vnd.github.preview'} | |
resp = github.search.repositories.GET(params={'q': 'language:python', 'sort': 'stars', 'per_page': 10, 'page': 1}, headers=headers) | |
res = resp.json() | |
print res['items'][0]['full_name'] | |
print len(res['items']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment