twitter-openapi-python 0.0.42__py3-none-any.whl → 0.0.44__py3-none-any.whl

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.
@@ -61,7 +61,7 @@ class TwitterOpenapiPythonClient:
61
61
 
62
62
 
63
63
  class TwitterOpenapiPython:
64
- hash: str = "54acb4a0cef6aea969d3a1c75d37d58d80b0e5c0"
64
+ hash: str = "590dae5c9f8575abc91d3774946bfe6f23960aba"
65
65
  placeholder_url = "https://raw.githubusercontent.com/fa0311/twitter-openapi/{hash}/src/config/placeholder.json"
66
66
  header = "https://raw.githubusercontent.com/fa0311/latest-user-agent/refs/heads/main/header.json"
67
67
  access_token: str = (
@@ -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()
@@ -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
1
  Metadata-Version: 2.4
2
2
  Name: twitter_openapi_python
3
- Version: 0.0.42
3
+ Version: 0.0.44
4
4
  Summary: Twitter OpenAPI
5
5
  Home-page: https://github.com/fa0311/twitter_openapi_python
6
6
  Author: fa0311
@@ -10,8 +10,9 @@ 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.33
13
+ Requires-Dist: twitter_openapi_python_generated==0.0.34
14
14
  Requires-Dist: pydantic>=2.6
15
+ Requires-Dist: requests<3.0.0,>=2.31.0
15
16
  Requires-Dist: urllib3<3.0.0,>=2.1.0
16
17
  Requires-Dist: xclienttransaction<2.0.0,>=1.0.0
17
18
  Dynamic: author
@@ -1,5 +1,5 @@
1
1
  twitter_openapi_python/__init__.py,sha256=stqYIfWDqM0yC93SQNp4-b2hSz-ONWR3QxOG5g2oREg,339
2
- twitter_openapi_python/client.py,sha256=9qLnlz6KtkxDzUWnZbsbbeoIVfIesg1unRMYESQ5XrY,6980
2
+ twitter_openapi_python/client.py,sha256=6jP6n9XMVk0-QiyWU3CVaQ8sBtgRUjuoIkeNW5wwd_k,6980
3
3
  twitter_openapi_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  twitter_openapi_python/tid.py,sha256=PqwosiLfvOrOdoaWEqbmHL9J1oBPqp60VytOzzp86Xg,809
5
5
  twitter_openapi_python/api/__init__.py,sha256=-2hoS75Fp0KvCIWKYQFpvAl0pcbFyt7Be3ood08P7n8,643
@@ -14,15 +14,15 @@ twitter_openapi_python/api/v11_get_api.py,sha256=Gz5hLf4yJkGdpzjmJIsSqdr1eI6mqtj
14
14
  twitter_openapi_python/api/v11_post_api.py,sha256=y1jJ5Q_-CYLC4HGjvl3eKDnKdtCVbHVRC2VAbJr8_EM,1945
15
15
  twitter_openapi_python/models/__init__.py,sha256=uKZYFWWoXinGRjMU7ErbunUhfsThEuZf8aGFBd7lus0,583
16
16
  twitter_openapi_python/models/base.py,sha256=3C1SKqgEZhf3QQIHPNob5vasEV7FE8KxP9rNwWYmHG0,198
17
- twitter_openapi_python/models/header.py,sha256=hP0fjrm-3Mogt9IkAucQnmDletRuzMmCfoEBaAtoyJ0,594
17
+ twitter_openapi_python/models/header.py,sha256=7anvDfzWuK-QNBikskh3Ya3qRCkVVhV6hmyjA1XZB40,664
18
18
  twitter_openapi_python/models/initial_state.py,sha256=h8P3hC_tLVSmDuYxB03fuSviz22cpp-4RfSR2npP_Yo,530
19
19
  twitter_openapi_python/models/response.py,sha256=ZuaX36mKRsVx5aiJhNw3CjrvVGVaGjMCGdXy28PMFy8,480
20
20
  twitter_openapi_python/models/timeline.py,sha256=AoWfrJsonYImlweciaUSjFzmeciaX0zshi7d-FkT4LM,1392
21
21
  twitter_openapi_python/utils/__init__.py,sha256=2Am22zCH-BUwPxKnnPoHQvKEF-gWX_eryKgA4OZeiog,449
22
- twitter_openapi_python/utils/api.py,sha256=d6lCw3inSis9FVdQosDdTcwJPUl9UNGWT04bdd_l8xs,10325
23
- twitter_openapi_python-0.0.42.dist-info/licenses/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
24
- twitter_openapi_python-0.0.42.dist-info/licenses/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
25
- twitter_openapi_python-0.0.42.dist-info/METADATA,sha256=6adewVSahKpG5ceujTleIXcoAiJxp4RTyYM4LkliLjg,3374
26
- twitter_openapi_python-0.0.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- twitter_openapi_python-0.0.42.dist-info/top_level.txt,sha256=wKFCnW_S6aWD3nFPmd65SxZIviiqQ30LqHOLLpcnTdE,23
28
- twitter_openapi_python-0.0.42.dist-info/RECORD,,
22
+ twitter_openapi_python/utils/api.py,sha256=l80EAhILV55X_6dSMIsQN3VQxu34TX0yY5XuGxf6eRQ,10410
23
+ twitter_openapi_python-0.0.44.dist-info/licenses/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
24
+ twitter_openapi_python-0.0.44.dist-info/licenses/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
25
+ twitter_openapi_python-0.0.44.dist-info/METADATA,sha256=DyaRwaDWYGAfx-5ZX2_sf5kZ7mvdKn6_nPZCzA6k_Fg,3414
26
+ twitter_openapi_python-0.0.44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ twitter_openapi_python-0.0.44.dist-info/top_level.txt,sha256=wKFCnW_S6aWD3nFPmd65SxZIviiqQ30LqHOLLpcnTdE,23
28
+ twitter_openapi_python-0.0.44.dist-info/RECORD,,