mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Add ability to skip SSL verify from requests (#758)
This commit is contained in:
+3
-2
@@ -81,7 +81,7 @@ class Github(object):
|
||||
This is the main class you instantiate to access the Github API v3. Optional parameters allow different authentication methods.
|
||||
"""
|
||||
|
||||
def __init__(self, login_or_token=None, password=None, base_url=DEFAULT_BASE_URL, timeout=DEFAULT_TIMEOUT, client_id=None, client_secret=None, user_agent='PyGithub/Python', per_page=DEFAULT_PER_PAGE, api_preview=False):
|
||||
def __init__(self, login_or_token=None, password=None, base_url=DEFAULT_BASE_URL, timeout=DEFAULT_TIMEOUT, client_id=None, client_secret=None, user_agent='PyGithub/Python', per_page=DEFAULT_PER_PAGE, api_preview=False, verify=True):
|
||||
"""
|
||||
:param login_or_token: string
|
||||
:param password: string
|
||||
@@ -91,6 +91,7 @@ class Github(object):
|
||||
:param client_secret: string
|
||||
:param user_agent: string
|
||||
:param per_page: int
|
||||
:param verify: boolean or string
|
||||
"""
|
||||
|
||||
assert login_or_token is None or isinstance(login_or_token, (str, unicode)), login_or_token
|
||||
@@ -101,7 +102,7 @@ class Github(object):
|
||||
assert client_secret is None or isinstance(client_secret, (str, unicode)), client_secret
|
||||
assert user_agent is None or isinstance(user_agent, (str, unicode)), user_agent
|
||||
assert isinstance(api_preview, (bool))
|
||||
self.__requester = Requester(login_or_token, password, base_url, timeout, client_id, client_secret, user_agent, per_page, api_preview)
|
||||
self.__requester = Requester(login_or_token, password, base_url, timeout, client_id, client_secret, user_agent, per_page, api_preview, verify)
|
||||
|
||||
def __get_FIX_REPO_GET_GIT_REF(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user