diff options
author | 2011-11-10 23:48:44 +0100 | |
---|---|---|
committer | 2011-11-10 23:48:44 +0100 | |
commit | bd3df24bc3fa4f45ceee53a931752ed62ef21b48 (patch) | |
tree | 5704f6038b3f0531af2ca16632fa4699d8b8270b | |
parent | Init test enviroment (diff) | |
download | python-github3-bd3df24bc3fa4f45ceee53a931752ed62ef21b48.tar.xz python-github3-bd3df24bc3fa4f45ceee53a931752ed62ef21b48.zip |
Updated readme
-rw-r--r-- | README.rst | 30 |
1 files changed, 13 insertions, 17 deletions
@@ -2,27 +2,23 @@ Fork ====================================== Refactor and complete api wrapper. Intensive work in progress -Usage ------ +Use with auth user +--------------------- -:: +```python +from github3.api import Github - from github3.api import Github - from github3.handlers.user import AuthUser - from github3.handlers.gists import Gist +gh = Github('user', 'password') - gh = Github() - gh.session.auth = ('kennethreitz', 'password') - - me = AuthUser(gh) - for repo in me.get_repos(): - print repo - - gists = Gist(gh) - gists.create_gist( - u'Description', - files={'file1.txt': {'content': u'Content of first file'}}) +users_handler = gh.users +for repo in users_handler.get_repos(): + print repo +gists_handler = gh.gists +gists_handler.create_gist( + u'Description', + files={'file1.txt': {'content': u'Content of first file'}}) +``` Installation |