Skip to content

Instantly share code, notes, and snippets.

@Melevir
Created September 24, 2013 18:22
Show Gist options
  • Save Melevir/6689056 to your computer and use it in GitHub Desktop.
Save Melevir/6689056 to your computer and use it in GitHub Desktop.
GitHub Search API example with hammock
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