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

Commit 1a148ea

Browse files
authored
Merge pull request #660 from Eboreg/dev-Eboreg
Always add tweet_mode to API requests
2 parents 13276b6 + 29647e6 commit 1a148ea

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
@@ -5160,6 +5160,8 @@ def _RequestUrl(self, url, verb, data=None, json=None, enforce_auth=True):
51605160
if not data:
51615161
data = {}
51625162

5163+
data['tweet_mode'] = self.tweet_mode
5164+
51635165
if verb == 'POST':
51645166
if data:
51655167
if 'media_ids' in data:
@@ -5175,7 +5177,6 @@ def _RequestUrl(self, url, verb, data=None, json=None, enforce_auth=True):
51755177
resp = 0 # POST request, but without data or json
51765178

51775179
elif verb == 'GET':
5178-
data['tweet_mode'] = self.tweet_mode
51795180
url = self._BuildUrl(url, extra_params=data)
51805181
resp = self._session.get(url, auth=self.__auth, timeout=self._timeout, proxies=self.proxies, verify=self.verify_ssl, cert=self.cert_ssl)
51815182

0 commit comments

Comments
 (0)