mirror of
https://github.com/kennethreitz-archive/github2.git
synced 2026-06-05 15:40:19 +00:00
Default the username and api_token to None for unauthenticated access.
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ from github2.commits import Commits
|
||||
|
||||
class Github(object):
|
||||
|
||||
def __init__(self, username, api_token, debug=False):
|
||||
def __init__(self, username=None, api_token=None, debug=False):
|
||||
self.debug = debug
|
||||
self.request = GithubRequest(username=username, api_token=api_token,
|
||||
debug=self.debug)
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class GithubRequest(object):
|
||||
"https": httplib.HTTPSConnection,
|
||||
}
|
||||
|
||||
def __init__(self, username, api_token, url_prefix=None, debug=False):
|
||||
def __init__(self, username=None, api_token=None, url_prefix=None, debug=False):
|
||||
self.username = username
|
||||
self.api_token = api_token
|
||||
self.url_prefix = url_prefix
|
||||
|
||||
Reference in New Issue
Block a user