twitter-openapi-python-generated 0.0.34__py3-none-any.whl → 0.0.35__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.
Files changed (227) hide show
  1. twitter_openapi_python_generated/__init__.py +165 -1
  2. twitter_openapi_python_generated/api/post_api.py +2079 -203
  3. twitter_openapi_python_generated/api/tweet_api.py +3207 -231
  4. twitter_openapi_python_generated/api/user_api.py +969 -66
  5. twitter_openapi_python_generated/api/user_list_api.py +1907 -0
  6. twitter_openapi_python_generated/api_client.py +47 -9
  7. twitter_openapi_python_generated/configuration.py +55 -6
  8. twitter_openapi_python_generated/models/__init__.py +82 -0
  9. twitter_openapi_python_generated/models/additional_media_info.py +3 -1
  10. twitter_openapi_python_generated/models/article_cover_media.py +2 -5
  11. twitter_openapi_python_generated/models/article_cover_media_color_info.py +1 -2
  12. twitter_openapi_python_generated/models/article_result.py +3 -7
  13. twitter_openapi_python_generated/models/badge_counts.py +97 -0
  14. twitter_openapi_python_generated/models/birdwatch_entity_ref.py +3 -1
  15. twitter_openapi_python_generated/models/birdwatch_pivot_footer.py +1 -2
  16. twitter_openapi_python_generated/models/birdwatch_pivot_note.py +2 -5
  17. twitter_openapi_python_generated/models/birdwatch_pivot_subtitle.py +1 -2
  18. twitter_openapi_python_generated/models/bookmarks_response.py +1 -2
  19. twitter_openapi_python_generated/models/cashtag_attachment.py +89 -0
  20. twitter_openapi_python_generated/models/community.py +4 -9
  21. twitter_openapi_python_generated/models/community_about_timeline_response.py +1 -2
  22. twitter_openapi_python_generated/models/community_discovery_timeline_response.py +102 -0
  23. twitter_openapi_python_generated/models/community_discovery_timeline_response_data.py +93 -0
  24. twitter_openapi_python_generated/models/community_discovery_timeline_viewer.py +93 -0
  25. twitter_openapi_python_generated/models/community_join_action_result_union.py +3 -2
  26. twitter_openapi_python_generated/models/community_media_timeline_response.py +1 -2
  27. twitter_openapi_python_generated/models/community_relationship.py +2 -5
  28. twitter_openapi_python_generated/models/community_rule.py +2 -5
  29. twitter_openapi_python_generated/models/community_tweets_timeline_response.py +1 -2
  30. twitter_openapi_python_generated/models/community_union.py +3 -2
  31. twitter_openapi_python_generated/models/connect_tab_timeline_response.py +102 -0
  32. twitter_openapi_python_generated/models/connect_tab_timeline_response_data.py +93 -0
  33. twitter_openapi_python_generated/models/content_disclosure_ai_generated_disclosure.py +2 -2
  34. twitter_openapi_python_generated/models/content_item_type.py +3 -0
  35. twitter_openapi_python_generated/models/content_union.py +3 -2
  36. twitter_openapi_python_generated/models/cover_cta.py +1 -2
  37. twitter_openapi_python_generated/models/create_bookmark_response.py +1 -2
  38. twitter_openapi_python_generated/models/create_draft_tweet_response.py +102 -0
  39. twitter_openapi_python_generated/models/create_draft_tweet_response_data.py +93 -0
  40. twitter_openapi_python_generated/models/create_draft_tweet_response_tweet.py +97 -0
  41. twitter_openapi_python_generated/models/create_retweet_response.py +1 -2
  42. twitter_openapi_python_generated/models/create_tweet_response.py +1 -2
  43. twitter_openapi_python_generated/models/delete_bookmark_response.py +1 -2
  44. twitter_openapi_python_generated/models/delete_draft_tweets_response.py +102 -0
  45. twitter_openapi_python_generated/models/delete_draft_tweets_response_data.py +89 -0
  46. twitter_openapi_python_generated/models/delete_list_response.py +102 -0
  47. twitter_openapi_python_generated/models/delete_list_response_data.py +89 -0
  48. twitter_openapi_python_generated/models/delete_retweet.py +1 -2
  49. twitter_openapi_python_generated/models/delete_retweet_response.py +1 -2
  50. twitter_openapi_python_generated/models/delete_tweet_response.py +1 -2
  51. twitter_openapi_python_generated/models/draft_list.py +96 -0
  52. twitter_openapi_python_generated/models/draft_tweet.py +109 -0
  53. twitter_openapi_python_generated/models/draft_tweet_create_request.py +99 -0
  54. twitter_openapi_python_generated/models/draft_tweet_user.py +100 -0
  55. twitter_openapi_python_generated/models/draft_tweet_user_results.py +93 -0
  56. twitter_openapi_python_generated/models/draft_tweets_viewer.py +93 -0
  57. twitter_openapi_python_generated/models/entities.py +7 -9
  58. twitter_openapi_python_generated/models/error_extensions.py +1 -1
  59. twitter_openapi_python_generated/models/error_response.py +3 -5
  60. twitter_openapi_python_generated/models/explore_page.py +95 -0
  61. twitter_openapi_python_generated/models/explore_page_body.py +104 -0
  62. twitter_openapi_python_generated/models/explore_page_response.py +102 -0
  63. twitter_openapi_python_generated/models/explore_page_response_data.py +93 -0
  64. twitter_openapi_python_generated/models/explore_timeline.py +105 -0
  65. twitter_openapi_python_generated/models/explore_timeline_scribe_config.py +91 -0
  66. twitter_openapi_python_generated/models/extended_entities.py +1 -2
  67. twitter_openapi_python_generated/models/favorite_tweet_response.py +1 -2
  68. twitter_openapi_python_generated/models/fetch_draft_tweets_response.py +102 -0
  69. twitter_openapi_python_generated/models/fetch_draft_tweets_response_data.py +93 -0
  70. twitter_openapi_python_generated/models/fetch_scheduled_tweets_response.py +102 -0
  71. twitter_openapi_python_generated/models/fetch_scheduled_tweets_response_data.py +93 -0
  72. twitter_openapi_python_generated/models/follow_response.py +1 -2
  73. twitter_openapi_python_generated/models/generic_timeline_by_id_response.py +102 -0
  74. twitter_openapi_python_generated/models/generic_timeline_by_id_response_data.py +93 -0
  75. twitter_openapi_python_generated/models/grok_share_attachment.py +1 -2
  76. twitter_openapi_python_generated/models/grok_translated_bio.py +101 -0
  77. twitter_openapi_python_generated/models/grok_translated_bio_with_availability.py +97 -0
  78. twitter_openapi_python_generated/models/grok_translated_community_note.py +1 -2
  79. twitter_openapi_python_generated/models/highlight.py +1 -2
  80. twitter_openapi_python_generated/models/instruction_union.py +3 -2
  81. twitter_openapi_python_generated/models/item_content_union.py +68 -10
  82. twitter_openapi_python_generated/models/list_banner_media.py +93 -0
  83. twitter_openapi_python_generated/models/list_banner_media_info.py +99 -0
  84. twitter_openapi_python_generated/models/list_banner_media_salient_rect.py +95 -0
  85. twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py +1 -2
  86. twitter_openapi_python_generated/models/list_members_list.py +93 -0
  87. twitter_openapi_python_generated/models/list_members_response.py +102 -0
  88. twitter_openapi_python_generated/models/list_members_response_data.py +93 -0
  89. twitter_openapi_python_generated/models/list_recommended_users_list.py +93 -0
  90. twitter_openapi_python_generated/models/list_recommended_users_response.py +102 -0
  91. twitter_openapi_python_generated/models/list_recommended_users_response_data.py +93 -0
  92. twitter_openapi_python_generated/models/list_response.py +102 -0
  93. twitter_openapi_python_generated/models/list_response_data.py +93 -0
  94. twitter_openapi_python_generated/models/list_subscribers_list.py +93 -0
  95. twitter_openapi_python_generated/models/list_subscribers_response.py +102 -0
  96. twitter_openapi_python_generated/models/list_subscribers_response_data.py +93 -0
  97. twitter_openapi_python_generated/models/media.py +16 -17
  98. twitter_openapi_python_generated/models/media_extended.py +13 -16
  99. twitter_openapi_python_generated/models/media_original_info.py +1 -2
  100. twitter_openapi_python_generated/models/media_video_info.py +1 -2
  101. twitter_openapi_python_generated/models/module_item.py +2 -5
  102. twitter_openapi_python_generated/models/note_tweet_result_data.py +2 -5
  103. twitter_openapi_python_generated/models/note_tweet_result_media.py +1 -2
  104. twitter_openapi_python_generated/models/note_tweet_result_media_inline_media.py +2 -5
  105. twitter_openapi_python_generated/models/note_tweet_result_rich_text.py +1 -2
  106. twitter_openapi_python_generated/models/notifications_result.py +2 -5
  107. twitter_openapi_python_generated/models/notifications_timeline_response.py +1 -2
  108. twitter_openapi_python_generated/models/post_create_bookmark_request.py +1 -1
  109. twitter_openapi_python_generated/models/post_create_bookmark_request_variables.py +2 -2
  110. twitter_openapi_python_generated/models/post_create_draft_tweet_request.py +95 -0
  111. twitter_openapi_python_generated/models/post_create_draft_tweet_request_variables.py +93 -0
  112. twitter_openapi_python_generated/models/post_create_draft_tweet_request_variables_post_tweet_request.py +97 -0
  113. twitter_openapi_python_generated/models/post_create_list_request.py +101 -0
  114. twitter_openapi_python_generated/models/post_create_list_request_features.py +97 -0
  115. twitter_openapi_python_generated/models/post_create_list_request_variables.py +93 -0
  116. twitter_openapi_python_generated/models/post_create_retweet_request.py +1 -1
  117. twitter_openapi_python_generated/models/post_create_retweet_request_variables.py +3 -3
  118. twitter_openapi_python_generated/models/post_create_tweet_request.py +2 -2
  119. twitter_openapi_python_generated/models/post_create_tweet_request_features.py +43 -41
  120. twitter_openapi_python_generated/models/post_create_tweet_request_variables.py +4 -4
  121. twitter_openapi_python_generated/models/post_create_tweet_request_variables_conversation_control.py +2 -2
  122. twitter_openapi_python_generated/models/post_create_tweet_request_variables_media.py +3 -4
  123. twitter_openapi_python_generated/models/post_create_tweet_request_variables_media_media_entities_inner.py +2 -2
  124. twitter_openapi_python_generated/models/post_create_tweet_request_variables_reply.py +2 -2
  125. twitter_openapi_python_generated/models/post_cta_title_text.py +1 -2
  126. twitter_openapi_python_generated/models/post_delete_bookmark_request.py +1 -1
  127. twitter_openapi_python_generated/models/post_delete_draft_tweets_request.py +95 -0
  128. twitter_openapi_python_generated/models/post_delete_draft_tweets_request_variables.py +89 -0
  129. twitter_openapi_python_generated/models/post_delete_list_request.py +95 -0
  130. twitter_openapi_python_generated/models/post_delete_list_request_variables.py +89 -0
  131. twitter_openapi_python_generated/models/post_delete_retweet_request.py +1 -1
  132. twitter_openapi_python_generated/models/post_delete_retweet_request_variables.py +3 -3
  133. twitter_openapi_python_generated/models/post_delete_tweet_request.py +2 -2
  134. twitter_openapi_python_generated/models/post_favorite_tweet_request.py +1 -1
  135. twitter_openapi_python_generated/models/post_list_add_member_request.py +101 -0
  136. twitter_openapi_python_generated/models/post_list_add_member_request_variables.py +91 -0
  137. twitter_openapi_python_generated/models/post_list_remove_member_request.py +101 -0
  138. twitter_openapi_python_generated/models/post_unfavorite_tweet_request.py +1 -1
  139. twitter_openapi_python_generated/models/primary_community_topic.py +2 -5
  140. twitter_openapi_python_generated/models/profile_bio.py +11 -3
  141. twitter_openapi_python_generated/models/profile_bio_entities.py +98 -0
  142. twitter_openapi_python_generated/models/profile_bio_entities_urls.py +96 -0
  143. twitter_openapi_python_generated/models/profile_response.py +1 -2
  144. twitter_openapi_python_generated/models/retweet.py +4 -7
  145. twitter_openapi_python_generated/models/scheduled_tweets_viewer.py +89 -0
  146. twitter_openapi_python_generated/models/search_timeline_response.py +1 -2
  147. twitter_openapi_python_generated/models/self_thread.py +2 -5
  148. twitter_openapi_python_generated/models/session.py +8 -20
  149. twitter_openapi_python_generated/models/social_context_union.py +3 -2
  150. twitter_openapi_python_generated/models/text.py +1 -2
  151. twitter_openapi_python_generated/models/timeline.py +1 -2
  152. twitter_openapi_python_generated/models/timeline_add_entries.py +1 -2
  153. twitter_openapi_python_generated/models/timeline_add_entry.py +4 -10
  154. twitter_openapi_python_generated/models/timeline_add_to_module.py +1 -2
  155. twitter_openapi_python_generated/models/timeline_frame.py +97 -0
  156. twitter_openapi_python_generated/models/timeline_half_cover.py +1 -2
  157. twitter_openapi_python_generated/models/timeline_label.py +101 -0
  158. twitter_openapi_python_generated/models/timeline_mark_entries_unread_greater_than_sort_index.py +2 -5
  159. twitter_openapi_python_generated/models/timeline_response.py +1 -2
  160. twitter_openapi_python_generated/models/timeline_show_alert.py +7 -3
  161. twitter_openapi_python_generated/models/timeline_timeline_module.py +1 -2
  162. twitter_openapi_python_generated/models/timeline_trend.py +16 -4
  163. twitter_openapi_python_generated/models/timeline_twitter_list.py +101 -0
  164. twitter_openapi_python_generated/models/tombstone_rich_text.py +1 -2
  165. twitter_openapi_python_generated/models/tracing.py +2 -5
  166. twitter_openapi_python_generated/models/trend_metadata.py +4 -2
  167. twitter_openapi_python_generated/models/trend_results.py +2 -5
  168. twitter_openapi_python_generated/models/tweet.py +17 -6
  169. twitter_openapi_python_generated/models/tweet_card_legacy.py +2 -4
  170. twitter_openapi_python_generated/models/tweet_card_platform_device.py +2 -5
  171. twitter_openapi_python_generated/models/tweet_detail_response.py +1 -2
  172. twitter_openapi_python_generated/models/tweet_edit_control.py +6 -15
  173. twitter_openapi_python_generated/models/tweet_edit_control_initial.py +4 -10
  174. twitter_openapi_python_generated/models/tweet_favoriters_response.py +1 -2
  175. twitter_openapi_python_generated/models/tweet_interstitial_reveal_text.py +1 -2
  176. twitter_openapi_python_generated/models/tweet_interstitial_text.py +1 -2
  177. twitter_openapi_python_generated/models/tweet_legacy.py +15 -36
  178. twitter_openapi_python_generated/models/tweet_limited_action_results.py +1 -2
  179. twitter_openapi_python_generated/models/tweet_preview_display_tweet.py +5 -11
  180. twitter_openapi_python_generated/models/tweet_preview_display_tweet_view_count.py +2 -5
  181. twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py +1 -2
  182. twitter_openapi_python_generated/models/tweet_retweeters_response.py +1 -2
  183. twitter_openapi_python_generated/models/tweet_union.py +3 -2
  184. twitter_openapi_python_generated/models/tweet_view.py +2 -5
  185. twitter_openapi_python_generated/models/twitter_list.py +146 -0
  186. twitter_openapi_python_generated/models/type_name.py +4 -0
  187. twitter_openapi_python_generated/models/unfavorite_tweet_response.py +1 -2
  188. twitter_openapi_python_generated/models/urt_endpoint_options.py +3 -4
  189. twitter_openapi_python_generated/models/user.py +75 -13
  190. twitter_openapi_python_generated/models/user_action_counts.py +89 -0
  191. twitter_openapi_python_generated/models/user_banner.py +89 -0
  192. twitter_openapi_python_generated/models/user_core.py +3 -6
  193. twitter_openapi_python_generated/models/user_highlights_tweets_response.py +1 -2
  194. twitter_openapi_python_generated/models/user_legacy.py +3 -6
  195. twitter_openapi_python_generated/models/user_notifications_settings.py +89 -0
  196. twitter_openapi_python_generated/models/user_pinned_items.py +90 -0
  197. twitter_openapi_python_generated/models/user_professional.py +3 -7
  198. twitter_openapi_python_generated/models/user_profile_metadata.py +89 -0
  199. twitter_openapi_python_generated/models/user_profile_translation.py +89 -0
  200. twitter_openapi_python_generated/models/user_relationship_counts.py +91 -0
  201. twitter_openapi_python_generated/models/user_relationship_perspectives.py +6 -2
  202. twitter_openapi_python_generated/models/user_response.py +1 -2
  203. twitter_openapi_python_generated/models/user_result_by_screen_name.py +2 -5
  204. twitter_openapi_python_generated/models/user_result_by_screen_name_result.py +8 -12
  205. twitter_openapi_python_generated/models/user_result_core.py +3 -1
  206. twitter_openapi_python_generated/models/user_results.py +3 -1
  207. twitter_openapi_python_generated/models/user_tweet_counts.py +91 -0
  208. twitter_openapi_python_generated/models/user_tweets_response.py +1 -2
  209. twitter_openapi_python_generated/models/user_union.py +6 -3
  210. twitter_openapi_python_generated/models/user_value.py +8 -9
  211. twitter_openapi_python_generated/models/user_verification_info_reason.py +2 -5
  212. twitter_openapi_python_generated/models/user_verification_info_reason_description.py +1 -2
  213. twitter_openapi_python_generated/models/user_website.py +89 -0
  214. twitter_openapi_python_generated/models/users_response.py +1 -2
  215. twitter_openapi_python_generated/models/users_response_data.py +1 -2
  216. twitter_openapi_python_generated/models/viewer_badge_counts_response.py +102 -0
  217. twitter_openapi_python_generated/models/viewer_badge_counts_response_data.py +93 -0
  218. twitter_openapi_python_generated/models/viewer_badge_counts_result.py +96 -0
  219. twitter_openapi_python_generated/models/viewer_badge_counts_user_results.py +93 -0
  220. twitter_openapi_python_generated/models/viewer_badge_counts_viewer.py +93 -0
  221. twitter_openapi_python_generated/rest.py +79 -8
  222. {twitter_openapi_python_generated-0.0.34.dist-info → twitter_openapi_python_generated-0.0.35.dist-info}/METADATA +926 -816
  223. {twitter_openapi_python_generated-0.0.34.dist-info → twitter_openapi_python_generated-0.0.35.dist-info}/RECORD +227 -145
  224. {twitter_openapi_python_generated-0.0.34.dist-info → twitter_openapi_python_generated-0.0.35.dist-info}/WHEEL +1 -1
  225. {twitter_openapi_python_generated-0.0.34.dist-info → twitter_openapi_python_generated-0.0.35.dist-info}/licenses/LICENSE +31 -31
  226. {twitter_openapi_python_generated-0.0.34.dist-info → twitter_openapi_python_generated-0.0.35.dist-info}/licenses/LICENSE.AGPL +660 -660
  227. {twitter_openapi_python_generated-0.0.34.dist-info → twitter_openapi_python_generated-0.0.35.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Twitter OpenAPI
5
+
6
+ Twitter OpenAPI(Swagger) specification
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Contact: yuki@yuki0311.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List
23
+ from twitter_openapi_python_generated.models.list_members_list import ListMembersList
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class ListMembersResponseData(BaseModel):
29
+ """
30
+ ListMembersResponseData
31
+ """ # noqa: E501
32
+ list: ListMembersList
33
+ __properties: ClassVar[List[str]] = ["list"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ListMembersResponseData from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of list
75
+ if self.list:
76
+ _dict['list'] = self.list.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ListMembersResponseData from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "list": ListMembersList.from_dict(obj["list"]) if obj.get("list") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Twitter OpenAPI
5
+
6
+ Twitter OpenAPI(Swagger) specification
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Contact: yuki@yuki0311.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List
23
+ from twitter_openapi_python_generated.models.timeline_result import TimelineResult
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class ListRecommendedUsersList(BaseModel):
29
+ """
30
+ ListRecommendedUsersList
31
+ """ # noqa: E501
32
+ recommended_users: TimelineResult
33
+ __properties: ClassVar[List[str]] = ["recommended_users"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ListRecommendedUsersList from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of recommended_users
75
+ if self.recommended_users:
76
+ _dict['recommended_users'] = self.recommended_users.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ListRecommendedUsersList from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "recommended_users": TimelineResult.from_dict(obj["recommended_users"]) if obj.get("recommended_users") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Twitter OpenAPI
5
+
6
+ Twitter OpenAPI(Swagger) specification
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Contact: yuki@yuki0311.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from twitter_openapi_python_generated.models.error_response import ErrorResponse
24
+ from twitter_openapi_python_generated.models.list_recommended_users_response_data import ListRecommendedUsersResponseData
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+ from pydantic_core import to_jsonable_python
28
+
29
+ class ListRecommendedUsersResponse(BaseModel):
30
+ """
31
+ ListRecommendedUsersResponse
32
+ """ # noqa: E501
33
+ data: ListRecommendedUsersResponseData
34
+ errors: Optional[List[ErrorResponse]] = None
35
+ __properties: ClassVar[List[str]] = ["data", "errors"]
36
+
37
+ model_config = ConfigDict(
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of ListRecommendedUsersResponse from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of data
77
+ if self.data:
78
+ _dict['data'] = self.data.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
80
+ _items = []
81
+ if self.errors:
82
+ for _item_errors in self.errors:
83
+ _items.append(_item_errors.to_dict() if _item_errors is not None else None)
84
+ _dict['errors'] = _items
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of ListRecommendedUsersResponse from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate({
97
+ "data": ListRecommendedUsersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
98
+ "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
99
+ })
100
+ return _obj
101
+
102
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Twitter OpenAPI
5
+
6
+ Twitter OpenAPI(Swagger) specification
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Contact: yuki@yuki0311.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List
23
+ from twitter_openapi_python_generated.models.list_recommended_users_list import ListRecommendedUsersList
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class ListRecommendedUsersResponseData(BaseModel):
29
+ """
30
+ ListRecommendedUsersResponseData
31
+ """ # noqa: E501
32
+ list: ListRecommendedUsersList
33
+ __properties: ClassVar[List[str]] = ["list"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ListRecommendedUsersResponseData from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of list
75
+ if self.list:
76
+ _dict['list'] = self.list.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ListRecommendedUsersResponseData from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "list": ListRecommendedUsersList.from_dict(obj["list"]) if obj.get("list") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Twitter OpenAPI
5
+
6
+ Twitter OpenAPI(Swagger) specification
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Contact: yuki@yuki0311.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from twitter_openapi_python_generated.models.error_response import ErrorResponse
24
+ from twitter_openapi_python_generated.models.list_response_data import ListResponseData
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+ from pydantic_core import to_jsonable_python
28
+
29
+ class ListResponse(BaseModel):
30
+ """
31
+ ListResponse
32
+ """ # noqa: E501
33
+ data: ListResponseData
34
+ errors: Optional[List[ErrorResponse]] = None
35
+ __properties: ClassVar[List[str]] = ["data", "errors"]
36
+
37
+ model_config = ConfigDict(
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of ListResponse from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of data
77
+ if self.data:
78
+ _dict['data'] = self.data.to_dict()
79
+ # override the default output from pydantic by calling `to_dict()` of each item in errors (list)
80
+ _items = []
81
+ if self.errors:
82
+ for _item_errors in self.errors:
83
+ _items.append(_item_errors.to_dict() if _item_errors is not None else None)
84
+ _dict['errors'] = _items
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of ListResponse from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate({
97
+ "data": ListResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
98
+ "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
99
+ })
100
+ return _obj
101
+
102
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Twitter OpenAPI
5
+
6
+ Twitter OpenAPI(Swagger) specification
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Contact: yuki@yuki0311.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List
23
+ from twitter_openapi_python_generated.models.twitter_list import TwitterList
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class ListResponseData(BaseModel):
29
+ """
30
+ ListResponseData
31
+ """ # noqa: E501
32
+ list: TwitterList
33
+ __properties: ClassVar[List[str]] = ["list"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ListResponseData from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of list
75
+ if self.list:
76
+ _dict['list'] = self.list.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ListResponseData from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "list": TwitterList.from_dict(obj["list"]) if obj.get("list") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Twitter OpenAPI
5
+
6
+ Twitter OpenAPI(Swagger) specification
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Contact: yuki@yuki0311.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List
23
+ from twitter_openapi_python_generated.models.timeline_result import TimelineResult
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+ from pydantic_core import to_jsonable_python
27
+
28
+ class ListSubscribersList(BaseModel):
29
+ """
30
+ ListSubscribersList
31
+ """ # noqa: E501
32
+ subscribers_timeline: TimelineResult
33
+ __properties: ClassVar[List[str]] = ["subscribers_timeline"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ListSubscribersList from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
65
+ """
66
+ excluded_fields: Set[str] = set([
67
+ ])
68
+
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ # override the default output from pydantic by calling `to_dict()` of subscribers_timeline
75
+ if self.subscribers_timeline:
76
+ _dict['subscribers_timeline'] = self.subscribers_timeline.to_dict()
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of ListSubscribersList from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate({
89
+ "subscribers_timeline": TimelineResult.from_dict(obj["subscribers_timeline"]) if obj.get("subscribers_timeline") is not None else None
90
+ })
91
+ return _obj
92
+
93
+