diff options
author | 2011-04-24 21:32:05 -0400 | |
---|---|---|
committer | 2011-04-24 21:32:05 -0400 | |
commit | 2b8fa24053877e37ccf362476d5fd58d47ed9753 (patch) | |
tree | cae50de13f21cca5ecadef31f54612afffad77e0 /github3/api.py | |
parent | model improvements (diff) | |
download | python-github3-2b8fa24053877e37ccf362476d5fd58d47ed9753.tar.xz python-github3-2b8fa24053877e37ccf362476d5fd58d47ed9753.zip |
repo api works :)
Diffstat (limited to 'github3/api.py')
-rw-r--r-- | github3/api.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/github3/api.py b/github3/api.py index 8b30d52..3225e43 100644 --- a/github3/api.py +++ b/github3/api.py @@ -49,8 +49,11 @@ def get(*path, **params): api.get('accounts', 'verify') """ - url = '{0}{1}'.format(API_URL, '/'.join(map(str, path))) + path = list(path) + path.insert(0, '') + url = '{0}{1}'.format(API_URL, '/'.join(map(str, path))) + print url # params = kwargs.get('params', None) r = requests.get(url, params=params, auth=None) @@ -60,7 +63,8 @@ def get(*path, **params): def post(params, *path): - url = '%s%s%s' % (API_URL, '/'.join(map(str, path)), '.json') + path += API_URL + url = '%s%s' % ('/'.join(map(str, path)), '.json') r = requests.post(url, params=params, auth=auth) return _safe_response(r) |