Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update client.py #1971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions tweepy/client.py
Expand Up @@ -42,13 +42,14 @@ class BaseClient:
def __init__(
self, bearer_token=None, consumer_key=None, consumer_secret=None,
access_token=None, access_token_secret=None, *, return_type=Response,
wait_on_rate_limit=False
wait_on_rate_limit=False, host="https://api.twitter.com"
):
self.bearer_token = bearer_token
self.consumer_key = consumer_key
self.consumer_secret = consumer_secret
self.access_token = access_token
self.access_token_secret = access_token_secret
self.host = host

self.return_type = return_type
self.wait_on_rate_limit = wait_on_rate_limit
Expand All @@ -61,7 +62,7 @@ def __init__(
)

def request(self, method, route, params=None, json=None, user_auth=False):
host = "https://api.twitter.com"
host = self.host
headers = {"User-Agent": self.user_agent}
auth = None
if user_auth:
Expand Down