mirror of
https://github.com/kennethreitz/gistapi.py.git
synced 2026-06-05 23:10:17 +00:00
Do not use self from a static method :-).
This commit is contained in:
+3
-3
@@ -196,19 +196,19 @@ class Gists(object):
|
||||
"""Gist API wrapper"""
|
||||
|
||||
def __init__(self, username=None, token=None):
|
||||
# Token-based Authentication is unnecesary, gist api still in alpha
|
||||
# Token-based Authentication is unnecessary, gist api still in alpha
|
||||
self._username = username
|
||||
self._token = token
|
||||
|
||||
@staticmethod
|
||||
def fetch_by_user(name):
|
||||
"""Return a list of public Gist objects owned by
|
||||
the given GitHub username"""
|
||||
the given GitHub username."""
|
||||
|
||||
_url = GIST_JSON % 'gists/%s' % name
|
||||
|
||||
# Return a list of Gist objects
|
||||
return [Gist(json=g, username=self._username, token=self._token)
|
||||
return [Gist(json=g)
|
||||
for g in json.load(urllib2.urlopen(_url))['gists']]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user