Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 29647e6

Browse files
committed
Always add tweet_mode to API requests
1 parent a1fe9c8 commit 29647e6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,9 @@ violations.flake8.txt
5353

5454
# Built docs
5555
doc/_build/**
56+
57+
# Mypy cache
58+
**/.mypy_cache
59+
60+
# VS Code
61+
**/.vscode

twitter/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5107,6 +5107,8 @@ def _RequestUrl(self, url, verb, data=None, json=None, enforce_auth=True):
51075107
if not data:
51085108
data = {}
51095109

5110+
data['tweet_mode'] = self.tweet_mode
5111+
51105112
if verb == 'POST':
51115113
if data:
51125114
if 'media_ids' in data:
@@ -5122,7 +5124,6 @@ def _RequestUrl(self, url, verb, data=None, json=None, enforce_auth=True):
51225124
resp = 0 # POST request, but without data or json
51235125

51245126
elif verb == 'GET':
5125-
data['tweet_mode'] = self.tweet_mode
51265127
url = self._BuildUrl(url, extra_params=data)
51275128
resp = self._session.get(url, auth=self.__auth, timeout=self._timeout, proxies=self.proxies)
51285129

0 commit comments

Comments
 (0)