File tree Expand file tree Collapse file tree 1 file changed +13
-17
lines changed
Expand file tree Collapse file tree 1 file changed +13
-17
lines changed Original file line number Diff line number Diff line change 22======================================
33Refactor 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
2824Installation
You can’t perform that action at this time.
0 commit comments