Skip to content

Commit

Permalink
Fix the readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
epsy committed May 8, 2016
1 parent 0f34be6 commit 0442db6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Currently in experimental stage. Use at your own risk.
async def getstargazers():
"""Print the most popular repository of the authors of
the most recent gists from github."""
with github() as site:
async with github() as site:
async for gist in site.gists.get():
try:
repo = await gist.owner.repos_url.get()[0]
Expand Down
7 changes: 5 additions & 2 deletions napper/apis/github.restspec.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"base_address": "https://api.github.com/",

"permalink_object": { "attribute": "permalink" },
"permalink_attribute": { "suffix": "_url" }
"permalink_object": { "attr": "permalink" },
"permalink_attribute": [
{ "context": "attribute" },
{ "matches": { "suffix": "_url" } }
]
}

0 comments on commit 0442db6

Please sign in to comment.