Skip to content

Commit 64cc369

Browse files
authored
Merge pull request #46 from fa0311/develop
update example
2 parents 39bca47 + be6e66e commit 64cc369

6 files changed

Lines changed: 8 additions & 5 deletions

File tree

example/requirements.txt

-846 Bytes
Binary file not shown.

example/sample/login.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def login():
99
if Path("cookie.json").exists():
1010
with open("cookie.json", "r") as f:
1111
cookies_dict = json.load(f)
12+
13+
if isinstance(cookies_dict, list):
14+
cookies_dict = {cookie['name']: cookie['value'] for cookie in cookies_dict}
1215
cookies = RequestsCookieJar()
1316
for key, value in cookies_dict.items():
1417
cookies.set(key, value)

twitter_openapi_python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "twitter_openapi_python"
3-
version = "0.0.40"
3+
version = "0.0.41"
44
description = "Twitter OpenAPI"
55
authors = ["fa0311 <yuki@yuki0311.com>"]
66
license = "proprietary" # or "AGPL-3.0-only"

twitter_openapi_python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from setuptools import find_packages, setup
66

77
NAME = "twitter_openapi_python"
8-
VERSION = "0.0.40"
8+
VERSION = "0.0.41"
99
PYTHON_REQUIRES = ">=3.7"
1010
REQUIRES = [
1111
"twitter_openapi_python_generated == 0.0.33",

twitter_openapi_python/tool/publish.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pip install wheel twine
2-
Remove-Item twitter_openapi_python_generated.egg-info/*
2+
Remove-Item twitter_openapi_python.egg-info/*
33
Remove-Item dist/*
44
python setup.py sdist
55
python setup.py bdist_wheel

twitter_openapi_python/twitter_openapi_python/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ def get_user_list_api(self) -> UserListApiUtils:
5454
return UserListApiUtils(twitter.UserListApi(self.api), self.placeholder, self.ct)
5555

5656
def get_v11_get_api(self) -> V11GetApiUtils:
57-
return V11GetApiUtils(twitter.V11GetApi(self.api), self.placeholder, self.ct)
57+
return V11GetApiUtils(twitter.V11GetApi(self.api), self.placeholder)
5858

5959
def get_v11_post_api(self) -> V11PostApiUtils:
60-
return V11PostApiUtils(twitter.V11PostApi(self.api), self.placeholder, self.ct)
60+
return V11PostApiUtils(twitter.V11PostApi(self.api), self.placeholder)
6161

6262

6363
class TwitterOpenapiPython:

0 commit comments

Comments
 (0)