aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2011-11-10 23:48:44 +0100
committerDavid Medina <davidmedina9@gmail.com>2011-11-10 23:48:44 +0100
commitbd3df24bc3fa4f45ceee53a931752ed62ef21b48 (patch)
tree5704f6038b3f0531af2ca16632fa4699d8b8270b
parentInit test enviroment (diff)
downloadpython-github3-bd3df24bc3fa4f45ceee53a931752ed62ef21b48.tar.xz
python-github3-bd3df24bc3fa4f45ceee53a931752ed62ef21b48.zip
Updated readme
-rw-r--r--README.rst30
1 files changed, 13 insertions, 17 deletions
diff --git a/README.rst b/README.rst
index 4c74cfa..c07cbc9 100644
--- a/README.rst
+++ b/README.rst
@@ -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