Skip to content

Commit bd3df24

Browse files
committed
Updated readme
1 parent eb6b5e4 commit bd3df24

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

README.rst

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,23 @@ Fork
22
======================================
33
Refactor and complete api wrapper. Intensive work in progress
44

5-
Usage
6-
-----
5+
Use with auth user
6+
---------------------
77

8-
::
8+
```python
9+
from github3.api import Github
910
10-
from github3.api import Github
11-
from github3.handlers.user import AuthUser
12-
from github3.handlers.gists import Gist
11+
gh = Github('user', 'password')
1312
14-
gh = Github()
15-
gh.session.auth = ('kennethreitz', 'password')
16-
17-
me = AuthUser(gh)
18-
for repo in me.get_repos():
19-
print repo
20-
21-
gists = Gist(gh)
22-
gists.create_gist(
23-
u'Description',
24-
files={'file1.txt': {'content': u'Content of first file'}})
13+
users_handler = gh.users
14+
for repo in users_handler.get_repos():
15+
print repo
2516
17+
gists_handler = gh.gists
18+
gists_handler.create_gist(
19+
u'Description',
20+
files={'file1.txt': {'content': u'Content of first file'}})
21+
```
2622

2723

2824
Installation

0 commit comments

Comments
 (0)