twitter-openapi-python 0.0.41__tar.gz → 0.0.43__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/PKG-INFO +17 -2
  2. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/pyproject.toml +4 -3
  3. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/setup.py +4 -3
  4. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/models/header.py +7 -7
  5. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/tid.py +1 -1
  6. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/utils/api.py +7 -7
  7. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python.egg-info/PKG-INFO +18 -3
  8. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python.egg-info/requires.txt +2 -1
  9. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/LICENSE +0 -0
  10. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/LICENSE.AGPL +0 -0
  11. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/README.md +0 -0
  12. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/setup.cfg +0 -0
  13. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/__init__.py +0 -0
  14. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/__init__.py +0 -0
  15. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/default_api.py +0 -0
  16. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/initial_state_api.py +0 -0
  17. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/post_api.py +0 -0
  18. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/tweet_api.py +0 -0
  19. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/user_api.py +0 -0
  20. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/user_list_api.py +0 -0
  21. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/users_api.py +0 -0
  22. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/v11_get_api.py +0 -0
  23. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/api/v11_post_api.py +0 -0
  24. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/client.py +0 -0
  25. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/models/__init__.py +0 -0
  26. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/models/base.py +0 -0
  27. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/models/initial_state.py +0 -0
  28. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/models/response.py +0 -0
  29. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/models/timeline.py +0 -0
  30. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/py.typed +0 -0
  31. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python/utils/__init__.py +0 -0
  32. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python.egg-info/SOURCES.txt +0 -0
  33. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python.egg-info/dependency_links.txt +0 -0
  34. {twitter_openapi_python-0.0.41 → twitter_openapi_python-0.0.43}/twitter_openapi_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: twitter_openapi_python
3
- Version: 0.0.41
3
+ Version: 0.0.43
4
4
  Summary: Twitter OpenAPI
5
5
  Home-page: https://github.com/fa0311/twitter_openapi_python
6
6
  Author: fa0311
@@ -10,6 +10,21 @@ Keywords: OpenAPI,OpenAPI-Generator,Twitter OpenAPI
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
12
  License-File: LICENSE.AGPL
13
+ Requires-Dist: twitter_openapi_python_generated==0.0.34
14
+ Requires-Dist: pydantic>=2.6
15
+ Requires-Dist: requests<3.0.0,>=2.31.0
16
+ Requires-Dist: urllib3<3.0.0,>=2.1.0
17
+ Requires-Dist: xclienttransaction<2.0.0,>=1.0.0
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: description
21
+ Dynamic: description-content-type
22
+ Dynamic: home-page
23
+ Dynamic: keywords
24
+ Dynamic: license
25
+ Dynamic: license-file
26
+ Dynamic: requires-dist
27
+ Dynamic: summary
13
28
 
14
29
  # twitter_openapi_python
15
30
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "twitter_openapi_python"
3
- version = "0.0.41"
3
+ version = "0.0.43"
4
4
  description = "Twitter OpenAPI"
5
5
  authors = ["fa0311 <yuki@yuki0311.com>"]
6
6
  license = "proprietary" # or "AGPL-3.0-only"
@@ -13,10 +13,11 @@ include = ["twitter_openapi_python/py.typed"]
13
13
  [tool.poetry.dependencies]
14
14
  python = "^3.7"
15
15
  pydantic = ">=2.6"
16
+ requests = ">=2.31.0,<3.0.0"
16
17
  urllib3 = ">= 2.1.0 < 3.0.0"
17
18
  xclienttransaction = ">= 1.0.0 < 2.0.0"
18
19
 
19
- twitter-openapi-python-generated = "0.0.33"
20
+ twitter-openapi-python-generated = "0.0.34"
20
21
 
21
22
  [tool.poetry.dev-dependencies]
22
23
 
@@ -32,4 +33,4 @@ reportPrivateImportUsage = false
32
33
  typeCheckingMode = "standard"
33
34
 
34
35
  [tool.ruff]
35
- line-length = 120
36
+ line-length = 120
@@ -5,13 +5,14 @@ import re
5
5
  from setuptools import find_packages, setup
6
6
 
7
7
  NAME = "twitter_openapi_python"
8
- VERSION = "0.0.41"
8
+ VERSION = "0.0.43"
9
9
  PYTHON_REQUIRES = ">=3.7"
10
10
  REQUIRES = [
11
- "twitter_openapi_python_generated == 0.0.33",
11
+ "twitter_openapi_python_generated == 0.0.34",
12
12
  "pydantic >= 2.6",
13
+ "requests >= 2.31.0, < 3.0.0",
13
14
  "urllib3 >= 2.1.0, < 3.0.0",
14
- "xclienttransaction >= 1.0.0, < 2.0.0"
15
+ "xclienttransaction >= 1.0.0, < 2.0.0",
15
16
  ]
16
17
  GITHUB_RAW_URL = (
17
18
  "https://raw.githubusercontent.com/fa0311/twitter_openapi_python/refs/heads/master/twitter_openapi_python/"
@@ -1,4 +1,4 @@
1
- from typing import Dict
1
+ from typing import Dict, Optional
2
2
 
3
3
  from pydantic import Field
4
4
 
@@ -7,14 +7,14 @@ from twitter_openapi_python.models import BaseModel
7
7
 
8
8
  class ApiUtilsHeader(BaseModel):
9
9
  raw: Dict[str, str] = Field()
10
- connection_hash: str = Field()
11
- content_type_options: str = Field()
12
- frame_options: str = Field()
10
+ connection_hash: Optional[str] = Field()
11
+ content_type_options: Optional[str] = Field()
12
+ frame_options: Optional[str] = Field()
13
13
  response_time: int = Field()
14
14
  tfe_preserve_body: bool = Field()
15
- transaction_id: str = Field()
16
- xss_protection: int = Field()
15
+ transaction_id: Optional[str] = Field()
16
+ xss_protection: Optional[int] = Field()
17
17
  rate_limit_limit: int = Field()
18
18
  rate_limit_remaining: int = Field()
19
19
  rate_limit_reset: int = Field()
20
- twitter_response_tags: str = Field()
20
+ twitter_response_tags: Optional[str] = Field()
@@ -12,6 +12,6 @@ def get_tid():
12
12
  home_page_response = bs4.BeautifulSoup(home_page.content, "html.parser")
13
13
  ondemand_file_url = get_ondemand_file_url(response=home_page_response)
14
14
  ondemand_file = session.get(url=ondemand_file_url) # type: ignore
15
- ondemand_file_response = bs4.BeautifulSoup(ondemand_file.content, "html.parser")
15
+ ondemand_file_response = ondemand_file.text
16
16
  ct = ClientTransaction(home_page_response=home_page_response, ondemand_file_response=ondemand_file_response)
17
17
  return ct
@@ -256,17 +256,17 @@ def build_cursor(list: list[models.TimelineTimelineCursor]) -> CursorApiUtilsRes
256
256
  def build_header(headers: Dict[str, str]) -> ApiUtilsHeader:
257
257
  return ApiUtilsHeader(
258
258
  raw=headers,
259
- connection_hash=headers["x-connection-hash"],
260
- content_type_options=headers["x-content-type-options"],
261
- frame_options=headers["x-frame-options"],
259
+ connection_hash=headers.get("x-connection-hash"),
260
+ content_type_options=headers.get("x-content-type-options"),
261
+ frame_options=headers.get("x-frame-options"),
262
262
  rate_limit_limit=int(headers.get("x-rate-limit-limit", 0)),
263
263
  rate_limit_remaining=int(headers.get("x-rate-limit-remaining", 0)),
264
264
  rate_limit_reset=int(headers.get("x-rate-limit-reset", 0)),
265
- response_time=int(headers["x-response-time"]),
265
+ response_time=int(headers.get("x-response-time", 0)),
266
266
  tfe_preserve_body=headers.get("x-tfe-preserve-body") == "true",
267
- transaction_id=headers["x-transaction-id"],
268
- twitter_response_tags=headers["x-twitter-response-tags"],
269
- xss_protection=int(headers["x-xss-protection"]),
267
+ transaction_id=headers.get("x-transaction-id"),
268
+ twitter_response_tags=headers.get("x-twitter-response-tags"),
269
+ xss_protection= int(headers["x-xss-protection"]) if headers.get("x-xss-protection") is not None else None,
270
270
  )
271
271
 
272
272
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
2
- Name: twitter-openapi-python
3
- Version: 0.0.41
1
+ Metadata-Version: 2.4
2
+ Name: twitter_openapi_python
3
+ Version: 0.0.43
4
4
  Summary: Twitter OpenAPI
5
5
  Home-page: https://github.com/fa0311/twitter_openapi_python
6
6
  Author: fa0311
@@ -10,6 +10,21 @@ Keywords: OpenAPI,OpenAPI-Generator,Twitter OpenAPI
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
12
  License-File: LICENSE.AGPL
13
+ Requires-Dist: twitter_openapi_python_generated==0.0.34
14
+ Requires-Dist: pydantic>=2.6
15
+ Requires-Dist: requests<3.0.0,>=2.31.0
16
+ Requires-Dist: urllib3<3.0.0,>=2.1.0
17
+ Requires-Dist: xclienttransaction<2.0.0,>=1.0.0
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: description
21
+ Dynamic: description-content-type
22
+ Dynamic: home-page
23
+ Dynamic: keywords
24
+ Dynamic: license
25
+ Dynamic: license-file
26
+ Dynamic: requires-dist
27
+ Dynamic: summary
13
28
 
14
29
  # twitter_openapi_python
15
30
 
@@ -1,4 +1,5 @@
1
- twitter_openapi_python_generated==0.0.33
1
+ twitter_openapi_python_generated==0.0.34
2
2
  pydantic>=2.6
3
+ requests<3.0.0,>=2.31.0
3
4
  urllib3<3.0.0,>=2.1.0
4
5
  xclienttransaction<2.0.0,>=1.0.0