twitter-openapi-python-generated 0.0.14__py3-none-any.whl → 0.0.16__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 (301) hide show
  1. twitter_openapi_python_generated/__init__.py +28 -1
  2. twitter_openapi_python_generated/api/default_api.py +23 -6
  3. twitter_openapi_python_generated/api/other_api.py +3 -3
  4. twitter_openapi_python_generated/api/post_api.py +691 -77
  5. twitter_openapi_python_generated/api/tweet_api.py +33 -33
  6. twitter_openapi_python_generated/api/user_api.py +6 -6
  7. twitter_openapi_python_generated/api/user_list_api.py +15 -15
  8. twitter_openapi_python_generated/api/users_api.py +3 -3
  9. twitter_openapi_python_generated/api/v11_get_api.py +6 -6
  10. twitter_openapi_python_generated/api/v11_post_api.py +6 -6
  11. twitter_openapi_python_generated/api/v20_get_api.py +3 -3
  12. twitter_openapi_python_generated/api_client.py +36 -24
  13. twitter_openapi_python_generated/configuration.py +14 -14
  14. twitter_openapi_python_generated/models/__init__.py +27 -0
  15. twitter_openapi_python_generated/models/additional_media_info.py +6 -6
  16. twitter_openapi_python_generated/models/additional_media_info_call_to_actions.py +6 -6
  17. twitter_openapi_python_generated/models/additional_media_info_call_to_actions_url.py +6 -6
  18. twitter_openapi_python_generated/models/allow_download_status.py +88 -0
  19. twitter_openapi_python_generated/models/article.py +92 -0
  20. twitter_openapi_python_generated/models/article_cover_media.py +106 -0
  21. twitter_openapi_python_generated/models/article_cover_media_color_info.py +96 -0
  22. twitter_openapi_python_generated/models/article_cover_media_color_info_palette.py +94 -0
  23. twitter_openapi_python_generated/models/article_cover_media_color_info_palette_rgb.py +92 -0
  24. twitter_openapi_python_generated/models/article_cover_media_info.py +101 -0
  25. twitter_openapi_python_generated/models/article_lifecycle_state.py +88 -0
  26. twitter_openapi_python_generated/models/article_metadata.py +88 -0
  27. twitter_openapi_python_generated/models/article_result.py +120 -0
  28. twitter_openapi_python_generated/models/article_results.py +92 -0
  29. twitter_openapi_python_generated/models/author_community_relationship.py +6 -6
  30. twitter_openapi_python_generated/models/birdwatch_entity.py +6 -6
  31. twitter_openapi_python_generated/models/birdwatch_entity_ref.py +6 -6
  32. twitter_openapi_python_generated/models/birdwatch_pivot.py +6 -6
  33. twitter_openapi_python_generated/models/birdwatch_pivot_call_to_action.py +6 -6
  34. twitter_openapi_python_generated/models/birdwatch_pivot_footer.py +6 -6
  35. twitter_openapi_python_generated/models/birdwatch_pivot_note.py +6 -6
  36. twitter_openapi_python_generated/models/birdwatch_pivot_subtitle.py +6 -6
  37. twitter_openapi_python_generated/models/bookmarks_response.py +6 -6
  38. twitter_openapi_python_generated/models/bookmarks_response_data.py +6 -6
  39. twitter_openapi_python_generated/models/bookmarks_timeline.py +6 -6
  40. twitter_openapi_python_generated/models/callback.py +6 -6
  41. twitter_openapi_python_generated/models/client_event_info.py +6 -6
  42. twitter_openapi_python_generated/models/communities_actions.py +6 -6
  43. twitter_openapi_python_generated/models/community.py +6 -6
  44. twitter_openapi_python_generated/models/community_actions.py +6 -6
  45. twitter_openapi_python_generated/models/community_data.py +6 -6
  46. twitter_openapi_python_generated/models/community_delete_action_result.py +6 -6
  47. twitter_openapi_python_generated/models/community_invites_result.py +6 -6
  48. twitter_openapi_python_generated/models/community_join_action_result.py +6 -6
  49. twitter_openapi_python_generated/models/community_join_requests_result.py +6 -6
  50. twitter_openapi_python_generated/models/community_leave_action_result.py +6 -6
  51. twitter_openapi_python_generated/models/community_pin_action_result.py +6 -6
  52. twitter_openapi_python_generated/models/community_rule.py +6 -6
  53. twitter_openapi_python_generated/models/community_urls.py +6 -6
  54. twitter_openapi_python_generated/models/community_urls_permalink.py +6 -6
  55. twitter_openapi_python_generated/models/content_union.py +7 -7
  56. twitter_openapi_python_generated/models/cover_cta.py +6 -6
  57. twitter_openapi_python_generated/models/create_bookmark_response.py +92 -0
  58. twitter_openapi_python_generated/models/create_bookmark_response_data.py +88 -0
  59. twitter_openapi_python_generated/models/create_retweet.py +6 -6
  60. twitter_openapi_python_generated/models/create_retweet_response.py +6 -6
  61. twitter_openapi_python_generated/models/create_retweet_response_data.py +6 -6
  62. twitter_openapi_python_generated/models/create_retweet_response_result.py +6 -6
  63. twitter_openapi_python_generated/models/create_tweet.py +6 -6
  64. twitter_openapi_python_generated/models/create_tweet_response.py +6 -6
  65. twitter_openapi_python_generated/models/create_tweet_response_data.py +6 -6
  66. twitter_openapi_python_generated/models/create_tweet_response_result.py +6 -6
  67. twitter_openapi_python_generated/models/cta_client_event_info.py +6 -6
  68. twitter_openapi_python_generated/models/delete_bookmark_response.py +92 -0
  69. twitter_openapi_python_generated/models/delete_bookmark_response_data.py +88 -0
  70. twitter_openapi_python_generated/models/delete_retweet.py +6 -6
  71. twitter_openapi_python_generated/models/delete_retweet_response.py +6 -6
  72. twitter_openapi_python_generated/models/delete_retweet_response_data.py +6 -6
  73. twitter_openapi_python_generated/models/delete_retweet_response_result.py +6 -6
  74. twitter_openapi_python_generated/models/delete_tweet_response.py +6 -6
  75. twitter_openapi_python_generated/models/delete_tweet_response_data.py +6 -6
  76. twitter_openapi_python_generated/models/delete_tweet_response_result.py +6 -6
  77. twitter_openapi_python_generated/models/display_treatment.py +6 -6
  78. twitter_openapi_python_generated/models/entities.py +6 -6
  79. twitter_openapi_python_generated/models/error.py +6 -6
  80. twitter_openapi_python_generated/models/error_extensions.py +6 -6
  81. twitter_openapi_python_generated/models/error_response.py +6 -6
  82. twitter_openapi_python_generated/models/errors.py +6 -6
  83. twitter_openapi_python_generated/models/ext_media_availability.py +6 -6
  84. twitter_openapi_python_generated/models/extended_entities.py +6 -6
  85. twitter_openapi_python_generated/models/extensions.py +6 -6
  86. twitter_openapi_python_generated/models/favorite_tweet.py +6 -6
  87. twitter_openapi_python_generated/models/favorite_tweet_response_data.py +6 -6
  88. twitter_openapi_python_generated/models/feedback_info.py +6 -6
  89. twitter_openapi_python_generated/models/follow_response.py +6 -6
  90. twitter_openapi_python_generated/models/follow_response_data.py +6 -6
  91. twitter_openapi_python_generated/models/follow_response_result.py +6 -6
  92. twitter_openapi_python_generated/models/follow_response_user.py +6 -6
  93. twitter_openapi_python_generated/models/follow_timeline.py +6 -6
  94. twitter_openapi_python_generated/models/get_bookmarks200_response.py +7 -7
  95. twitter_openapi_python_generated/models/get_favoriters200_response.py +7 -7
  96. twitter_openapi_python_generated/models/get_followers200_response.py +7 -7
  97. twitter_openapi_python_generated/models/get_home_latest_timeline200_response.py +7 -7
  98. twitter_openapi_python_generated/models/get_likes200_response.py +7 -7
  99. twitter_openapi_python_generated/models/get_list_latest_tweets_timeline200_response.py +7 -7
  100. twitter_openapi_python_generated/models/get_profile_spotlights_query200_response.py +7 -7
  101. twitter_openapi_python_generated/models/get_retweeters200_response.py +7 -7
  102. twitter_openapi_python_generated/models/get_search_timeline200_response.py +7 -7
  103. twitter_openapi_python_generated/models/get_tweet_detail200_response.py +7 -7
  104. twitter_openapi_python_generated/models/get_tweet_result_by_rest_id200_response.py +7 -7
  105. twitter_openapi_python_generated/models/get_user_by_rest_id200_response.py +7 -7
  106. twitter_openapi_python_generated/models/get_user_highlights_tweets200_response.py +7 -7
  107. twitter_openapi_python_generated/models/get_users_by_rest_ids200_response.py +7 -7
  108. twitter_openapi_python_generated/models/highlight.py +6 -6
  109. twitter_openapi_python_generated/models/home_timeline_home.py +6 -6
  110. twitter_openapi_python_generated/models/home_timeline_response_data.py +6 -6
  111. twitter_openapi_python_generated/models/instruction_union.py +7 -7
  112. twitter_openapi_python_generated/models/item_content_union.py +7 -7
  113. twitter_openapi_python_generated/models/item_result.py +6 -6
  114. twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py +6 -6
  115. twitter_openapi_python_generated/models/list_tweets_timeline.py +6 -6
  116. twitter_openapi_python_generated/models/list_tweets_timeline_data.py +6 -6
  117. twitter_openapi_python_generated/models/list_tweets_timeline_list.py +6 -6
  118. twitter_openapi_python_generated/models/location.py +6 -6
  119. twitter_openapi_python_generated/models/media.py +31 -11
  120. twitter_openapi_python_generated/models/media_extended.py +19 -7
  121. twitter_openapi_python_generated/models/media_original_info.py +6 -6
  122. twitter_openapi_python_generated/models/media_original_info_focus_rect.py +6 -6
  123. twitter_openapi_python_generated/models/media_result.py +88 -0
  124. twitter_openapi_python_generated/models/media_results.py +92 -0
  125. twitter_openapi_python_generated/models/media_size.py +6 -6
  126. twitter_openapi_python_generated/models/media_sizes.py +6 -6
  127. twitter_openapi_python_generated/models/media_stats.py +6 -6
  128. twitter_openapi_python_generated/models/media_video_info.py +6 -6
  129. twitter_openapi_python_generated/models/media_video_info_variant.py +6 -6
  130. twitter_openapi_python_generated/models/media_visibility_results.py +92 -0
  131. twitter_openapi_python_generated/models/media_visibility_results_blurred_image_interstitial.py +99 -0
  132. twitter_openapi_python_generated/models/module_entry.py +6 -6
  133. twitter_openapi_python_generated/models/module_item.py +6 -6
  134. twitter_openapi_python_generated/models/note_tweet.py +6 -6
  135. twitter_openapi_python_generated/models/note_tweet_result.py +6 -6
  136. twitter_openapi_python_generated/models/note_tweet_result_data.py +6 -6
  137. twitter_openapi_python_generated/models/note_tweet_result_media.py +6 -6
  138. twitter_openapi_python_generated/models/note_tweet_result_media_inline_media.py +6 -6
  139. twitter_openapi_python_generated/models/note_tweet_result_rich_text.py +6 -6
  140. twitter_openapi_python_generated/models/note_tweet_result_rich_text_tag.py +6 -6
  141. twitter_openapi_python_generated/models/one_factor_login_eligibility.py +6 -6
  142. twitter_openapi_python_generated/models/other200_response.py +7 -7
  143. twitter_openapi_python_generated/models/other_response.py +6 -6
  144. twitter_openapi_python_generated/models/post_create_bookmark200_response.py +138 -0
  145. twitter_openapi_python_generated/models/post_create_bookmark_request.py +94 -0
  146. twitter_openapi_python_generated/models/post_create_bookmark_request_variables.py +88 -0
  147. twitter_openapi_python_generated/models/post_create_retweet200_response.py +7 -7
  148. twitter_openapi_python_generated/models/post_create_retweet_request.py +6 -6
  149. twitter_openapi_python_generated/models/post_create_retweet_request_variables.py +6 -6
  150. twitter_openapi_python_generated/models/post_create_tweet200_response.py +7 -7
  151. twitter_openapi_python_generated/models/post_create_tweet_request.py +6 -6
  152. twitter_openapi_python_generated/models/post_create_tweet_request_features.py +6 -6
  153. twitter_openapi_python_generated/models/post_create_tweet_request_variables.py +6 -6
  154. twitter_openapi_python_generated/models/post_create_tweet_request_variables_media.py +6 -6
  155. twitter_openapi_python_generated/models/post_create_tweet_request_variables_media_media_entities_inner.py +6 -6
  156. twitter_openapi_python_generated/models/post_create_tweet_request_variables_reply.py +6 -6
  157. twitter_openapi_python_generated/models/post_delete_bookmark200_response.py +138 -0
  158. twitter_openapi_python_generated/models/post_delete_bookmark_request.py +94 -0
  159. twitter_openapi_python_generated/models/post_delete_retweet200_response.py +7 -7
  160. twitter_openapi_python_generated/models/post_delete_retweet_request.py +6 -6
  161. twitter_openapi_python_generated/models/post_delete_retweet_request_variables.py +6 -6
  162. twitter_openapi_python_generated/models/post_delete_tweet200_response.py +7 -7
  163. twitter_openapi_python_generated/models/post_delete_tweet_request.py +6 -6
  164. twitter_openapi_python_generated/models/post_favorite_tweet200_response.py +7 -7
  165. twitter_openapi_python_generated/models/post_favorite_tweet_request.py +6 -6
  166. twitter_openapi_python_generated/models/post_unfavorite_tweet200_response.py +7 -7
  167. twitter_openapi_python_generated/models/post_unfavorite_tweet_request.py +6 -6
  168. twitter_openapi_python_generated/models/primary_community_topic.py +6 -6
  169. twitter_openapi_python_generated/models/profile_response.py +6 -6
  170. twitter_openapi_python_generated/models/profile_response_data.py +6 -6
  171. twitter_openapi_python_generated/models/quoted_ref_result.py +6 -6
  172. twitter_openapi_python_generated/models/quoted_status_permalink.py +6 -6
  173. twitter_openapi_python_generated/models/retweet.py +6 -6
  174. twitter_openapi_python_generated/models/retweet_legacy.py +6 -6
  175. twitter_openapi_python_generated/models/search_by_raw_query.py +6 -6
  176. twitter_openapi_python_generated/models/search_timeline.py +6 -6
  177. twitter_openapi_python_generated/models/search_timeline_data.py +6 -6
  178. twitter_openapi_python_generated/models/search_timeline_response.py +6 -6
  179. twitter_openapi_python_generated/models/self_thread.py +6 -6
  180. twitter_openapi_python_generated/models/sensitive_media_warning.py +6 -6
  181. twitter_openapi_python_generated/models/session.py +6 -6
  182. twitter_openapi_python_generated/models/social_context_landing_url.py +6 -6
  183. twitter_openapi_python_generated/models/social_context_union.py +7 -7
  184. twitter_openapi_python_generated/models/super_follows_reply_user_result.py +6 -6
  185. twitter_openapi_python_generated/models/super_follows_reply_user_result_data.py +6 -6
  186. twitter_openapi_python_generated/models/super_follows_reply_user_result_legacy.py +6 -6
  187. twitter_openapi_python_generated/models/text.py +6 -6
  188. twitter_openapi_python_generated/models/text_entity.py +6 -6
  189. twitter_openapi_python_generated/models/text_entity_ref.py +6 -6
  190. twitter_openapi_python_generated/models/text_highlight.py +6 -6
  191. twitter_openapi_python_generated/models/timeline.py +6 -6
  192. twitter_openapi_python_generated/models/timeline_add_entries.py +6 -6
  193. twitter_openapi_python_generated/models/timeline_add_entry.py +6 -6
  194. twitter_openapi_python_generated/models/timeline_add_to_module.py +6 -6
  195. twitter_openapi_python_generated/models/timeline_clear_cache.py +6 -6
  196. twitter_openapi_python_generated/models/timeline_community.py +6 -6
  197. twitter_openapi_python_generated/models/timeline_cover_behavior.py +6 -6
  198. twitter_openapi_python_generated/models/timeline_general_context.py +6 -6
  199. twitter_openapi_python_generated/models/timeline_half_cover.py +6 -6
  200. twitter_openapi_python_generated/models/timeline_message_prompt.py +6 -6
  201. twitter_openapi_python_generated/models/timeline_pin_entry.py +6 -6
  202. twitter_openapi_python_generated/models/timeline_prompt.py +6 -6
  203. twitter_openapi_python_generated/models/timeline_replace_entry.py +6 -6
  204. twitter_openapi_python_generated/models/timeline_response.py +6 -6
  205. twitter_openapi_python_generated/models/timeline_show_alert.py +6 -6
  206. twitter_openapi_python_generated/models/timeline_show_alert_rich_text.py +6 -6
  207. twitter_openapi_python_generated/models/timeline_show_cover.py +6 -6
  208. twitter_openapi_python_generated/models/timeline_terminate_timeline.py +6 -6
  209. twitter_openapi_python_generated/models/timeline_timeline_cursor.py +6 -6
  210. twitter_openapi_python_generated/models/timeline_timeline_item.py +6 -6
  211. twitter_openapi_python_generated/models/timeline_timeline_module.py +6 -6
  212. twitter_openapi_python_generated/models/timeline_topic_context.py +6 -6
  213. twitter_openapi_python_generated/models/timeline_tweet.py +13 -6
  214. twitter_openapi_python_generated/models/timeline_user.py +6 -6
  215. twitter_openapi_python_generated/models/timeline_v2.py +6 -6
  216. twitter_openapi_python_generated/models/timestamp.py +6 -6
  217. twitter_openapi_python_generated/models/topic_context.py +6 -6
  218. twitter_openapi_python_generated/models/tracing.py +6 -6
  219. twitter_openapi_python_generated/models/tweet.py +13 -7
  220. twitter_openapi_python_generated/models/tweet_card.py +6 -6
  221. twitter_openapi_python_generated/models/tweet_card_legacy.py +6 -6
  222. twitter_openapi_python_generated/models/tweet_card_legacy_binding_value.py +6 -6
  223. twitter_openapi_python_generated/models/tweet_card_legacy_binding_value_data.py +6 -6
  224. twitter_openapi_python_generated/models/tweet_card_legacy_binding_value_data_image.py +6 -6
  225. twitter_openapi_python_generated/models/tweet_card_platform.py +6 -6
  226. twitter_openapi_python_generated/models/tweet_card_platform_audience.py +6 -6
  227. twitter_openapi_python_generated/models/tweet_card_platform_data.py +6 -6
  228. twitter_openapi_python_generated/models/tweet_card_platform_device.py +6 -6
  229. twitter_openapi_python_generated/models/tweet_detail_response.py +6 -6
  230. twitter_openapi_python_generated/models/tweet_detail_response_data.py +6 -6
  231. twitter_openapi_python_generated/models/tweet_edit_control.py +6 -6
  232. twitter_openapi_python_generated/models/tweet_edit_control_initial.py +6 -6
  233. twitter_openapi_python_generated/models/tweet_edit_prespective.py +6 -6
  234. twitter_openapi_python_generated/models/tweet_favoriters_response.py +6 -6
  235. twitter_openapi_python_generated/models/tweet_favoriters_response_data.py +6 -6
  236. twitter_openapi_python_generated/models/tweet_interstitial.py +6 -6
  237. twitter_openapi_python_generated/models/tweet_interstitial_reveal_text.py +6 -6
  238. twitter_openapi_python_generated/models/tweet_interstitial_text.py +6 -6
  239. twitter_openapi_python_generated/models/tweet_interstitial_text_entity.py +6 -6
  240. twitter_openapi_python_generated/models/tweet_interstitial_text_entity_ref.py +6 -6
  241. twitter_openapi_python_generated/models/tweet_legacy.py +6 -6
  242. twitter_openapi_python_generated/models/tweet_legacy_scopes.py +6 -6
  243. twitter_openapi_python_generated/models/tweet_previous_counts.py +6 -6
  244. twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py +6 -6
  245. twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py +6 -6
  246. twitter_openapi_python_generated/models/tweet_retweeters_response.py +6 -6
  247. twitter_openapi_python_generated/models/tweet_retweeters_response_data.py +6 -6
  248. twitter_openapi_python_generated/models/tweet_tombstone.py +6 -6
  249. twitter_openapi_python_generated/models/tweet_union.py +7 -7
  250. twitter_openapi_python_generated/models/tweet_view.py +6 -6
  251. twitter_openapi_python_generated/models/tweet_with_visibility_results.py +13 -7
  252. twitter_openapi_python_generated/models/type_name.py +1 -0
  253. twitter_openapi_python_generated/models/unfavorite_tweet.py +6 -6
  254. twitter_openapi_python_generated/models/unfavorite_tweet_response_data.py +6 -6
  255. twitter_openapi_python_generated/models/unified_card.py +6 -6
  256. twitter_openapi_python_generated/models/url.py +8 -8
  257. twitter_openapi_python_generated/models/urt_endpoint_options.py +6 -6
  258. twitter_openapi_python_generated/models/urt_endpoint_request_params.py +6 -6
  259. twitter_openapi_python_generated/models/user.py +19 -7
  260. twitter_openapi_python_generated/models/user_features.py +6 -6
  261. twitter_openapi_python_generated/models/user_highlights_info.py +6 -6
  262. twitter_openapi_python_generated/models/user_highlights_tweets_data.py +6 -6
  263. twitter_openapi_python_generated/models/user_highlights_tweets_response.py +6 -6
  264. twitter_openapi_python_generated/models/user_highlights_tweets_result.py +6 -6
  265. twitter_openapi_python_generated/models/user_highlights_tweets_timeline.py +6 -6
  266. twitter_openapi_python_generated/models/user_highlights_tweets_user.py +6 -6
  267. twitter_openapi_python_generated/models/user_legacy.py +6 -6
  268. twitter_openapi_python_generated/models/user_legacy_extended_profile.py +92 -0
  269. twitter_openapi_python_generated/models/user_legacy_extended_profile_birthdate.py +110 -0
  270. twitter_openapi_python_generated/models/user_professional.py +6 -6
  271. twitter_openapi_python_generated/models/user_professional_category.py +6 -6
  272. twitter_openapi_python_generated/models/user_response.py +6 -6
  273. twitter_openapi_python_generated/models/user_response_data.py +6 -6
  274. twitter_openapi_python_generated/models/user_result_by_screen_name.py +6 -6
  275. twitter_openapi_python_generated/models/user_result_by_screen_name_legacy.py +6 -6
  276. twitter_openapi_python_generated/models/user_result_by_screen_name_result.py +6 -6
  277. twitter_openapi_python_generated/models/user_result_core.py +6 -6
  278. twitter_openapi_python_generated/models/user_results.py +6 -6
  279. twitter_openapi_python_generated/models/user_tip_jar_settings.py +100 -0
  280. twitter_openapi_python_generated/models/user_tweets_data.py +6 -6
  281. twitter_openapi_python_generated/models/user_tweets_response.py +6 -6
  282. twitter_openapi_python_generated/models/user_tweets_result.py +6 -6
  283. twitter_openapi_python_generated/models/user_tweets_user.py +6 -6
  284. twitter_openapi_python_generated/models/user_unavailable.py +6 -6
  285. twitter_openapi_python_generated/models/user_union.py +7 -7
  286. twitter_openapi_python_generated/models/user_value.py +6 -6
  287. twitter_openapi_python_generated/models/user_verification_info.py +6 -6
  288. twitter_openapi_python_generated/models/user_verification_info_reason.py +6 -6
  289. twitter_openapi_python_generated/models/user_verification_info_reason_description.py +6 -6
  290. twitter_openapi_python_generated/models/user_verification_info_reason_description_entities.py +6 -6
  291. twitter_openapi_python_generated/models/user_verification_info_reason_description_entities_ref.py +6 -6
  292. twitter_openapi_python_generated/models/users_response.py +6 -6
  293. twitter_openapi_python_generated/models/users_response_data.py +6 -6
  294. twitter_openapi_python_generated/rest.py +2 -0
  295. {twitter_openapi_python_generated-0.0.14.dist-info → twitter_openapi_python_generated-0.0.16.dist-info}/METADATA +1 -1
  296. twitter_openapi_python_generated-0.0.16.dist-info/RECORD +310 -0
  297. twitter_openapi_python_generated-0.0.14.dist-info/RECORD +0 -283
  298. {twitter_openapi_python_generated-0.0.14.dist-info → twitter_openapi_python_generated-0.0.16.dist-info}/LICENSE +0 -0
  299. {twitter_openapi_python_generated-0.0.14.dist-info → twitter_openapi_python_generated-0.0.16.dist-info}/LICENSE.AGPL +0 -0
  300. {twitter_openapi_python_generated-0.0.14.dist-info → twitter_openapi_python_generated-0.0.16.dist-info}/WHEEL +0 -0
  301. {twitter_openapi_python_generated-0.0.14.dist-info → twitter_openapi_python_generated-0.0.16.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,96 @@
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.article_cover_media_color_info_palette import ArticleCoverMediaColorInfoPalette
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ArticleCoverMediaColorInfo(BaseModel):
28
+ """
29
+ ArticleCoverMediaColorInfo
30
+ """ # noqa: E501
31
+ palette: List[ArticleCoverMediaColorInfoPalette]
32
+ __properties: ClassVar[List[str]] = ["palette"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of ArticleCoverMediaColorInfo from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ # override the default output from pydantic by calling `to_dict()` of each item in palette (list)
74
+ _items = []
75
+ if self.palette:
76
+ for _item in self.palette:
77
+ if _item:
78
+ _items.append(_item.to_dict())
79
+ _dict['palette'] = _items
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of ArticleCoverMediaColorInfo from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "palette": [ArticleCoverMediaColorInfoPalette.from_dict(_item) for _item in obj["palette"]] if obj.get("palette") is not None else None
93
+ })
94
+ return _obj
95
+
96
+
@@ -0,0 +1,94 @@
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, StrictFloat, StrictInt
22
+ from typing import Any, ClassVar, Dict, List, Union
23
+ from twitter_openapi_python_generated.models.article_cover_media_color_info_palette_rgb import ArticleCoverMediaColorInfoPaletteRGB
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ArticleCoverMediaColorInfoPalette(BaseModel):
28
+ """
29
+ ArticleCoverMediaColorInfoPalette
30
+ """ # noqa: E501
31
+ percentage: Union[StrictFloat, StrictInt]
32
+ rgb: ArticleCoverMediaColorInfoPaletteRGB
33
+ __properties: ClassVar[List[str]] = ["percentage", "rgb"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ArticleCoverMediaColorInfoPalette 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 rgb
75
+ if self.rgb:
76
+ _dict['rgb'] = self.rgb.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 ArticleCoverMediaColorInfoPalette 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
+ "percentage": obj.get("percentage"),
90
+ "rgb": ArticleCoverMediaColorInfoPaletteRGB.from_dict(obj["rgb"]) if obj.get("rgb") is not None else None
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,92 @@
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, StrictInt
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ArticleCoverMediaColorInfoPaletteRGB(BaseModel):
27
+ """
28
+ ArticleCoverMediaColorInfoPaletteRGB
29
+ """ # noqa: E501
30
+ blue: StrictInt
31
+ green: StrictInt
32
+ red: StrictInt
33
+ __properties: ClassVar[List[str]] = ["blue", "green", "red"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of ArticleCoverMediaColorInfoPaletteRGB 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
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of ArticleCoverMediaColorInfoPaletteRGB from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
84
+
85
+ _obj = cls.model_validate({
86
+ "blue": obj.get("blue"),
87
+ "green": obj.get("green"),
88
+ "red": obj.get("red")
89
+ })
90
+ return _obj
91
+
92
+
@@ -0,0 +1,101 @@
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, Field, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from twitter_openapi_python_generated.models.article_cover_media_color_info import ArticleCoverMediaColorInfo
24
+ from twitter_openapi_python_generated.models.type_name import TypeName
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class ArticleCoverMediaInfo(BaseModel):
29
+ """
30
+ ArticleCoverMediaInfo
31
+ """ # noqa: E501
32
+ typename: Optional[TypeName] = Field(default=None, alias="__typename")
33
+ color_info: ArticleCoverMediaColorInfo
34
+ original_img_height: StrictInt
35
+ original_img_url: StrictStr
36
+ original_img_width: StrictInt
37
+ __properties: ClassVar[List[str]] = ["__typename", "color_info", "original_img_height", "original_img_url", "original_img_width"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of ArticleCoverMediaInfo from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of color_info
79
+ if self.color_info:
80
+ _dict['color_info'] = self.color_info.to_dict()
81
+ return _dict
82
+
83
+ @classmethod
84
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
85
+ """Create an instance of ArticleCoverMediaInfo from a dict"""
86
+ if obj is None:
87
+ return None
88
+
89
+ if not isinstance(obj, dict):
90
+ return cls.model_validate(obj)
91
+
92
+ _obj = cls.model_validate({
93
+ "__typename": obj.get("__typename"),
94
+ "color_info": ArticleCoverMediaColorInfo.from_dict(obj["color_info"]) if obj.get("color_info") is not None else None,
95
+ "original_img_height": obj.get("original_img_height"),
96
+ "original_img_url": obj.get("original_img_url"),
97
+ "original_img_width": obj.get("original_img_width")
98
+ })
99
+ return _obj
100
+
101
+
@@ -0,0 +1,88 @@
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, StrictInt
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ArticleLifecycleState(BaseModel):
27
+ """
28
+ ArticleLifecycleState
29
+ """ # noqa: E501
30
+ modified_at_secs: StrictInt
31
+ __properties: ClassVar[List[str]] = ["modified_at_secs"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of ArticleLifecycleState from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of ArticleLifecycleState from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "modified_at_secs": obj.get("modified_at_secs")
85
+ })
86
+ return _obj
87
+
88
+
@@ -0,0 +1,88 @@
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, StrictInt
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ArticleMetadata(BaseModel):
27
+ """
28
+ ArticleMetadata
29
+ """ # noqa: E501
30
+ first_published_at_secs: StrictInt
31
+ __properties: ClassVar[List[str]] = ["first_published_at_secs"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of ArticleMetadata from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of ArticleMetadata from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "first_published_at_secs": obj.get("first_published_at_secs")
85
+ })
86
+ return _obj
87
+
88
+
@@ -0,0 +1,120 @@
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, Field, StrictStr, field_validator
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from twitter_openapi_python_generated.models.article_cover_media import ArticleCoverMedia
25
+ from twitter_openapi_python_generated.models.article_lifecycle_state import ArticleLifecycleState
26
+ from twitter_openapi_python_generated.models.article_metadata import ArticleMetadata
27
+ from typing import Optional, Set
28
+ from typing_extensions import Self
29
+
30
+ class ArticleResult(BaseModel):
31
+ """
32
+ ArticleResult
33
+ """ # noqa: E501
34
+ cover_media: ArticleCoverMedia
35
+ id: StrictStr
36
+ lifecycle_state: Optional[ArticleLifecycleState] = None
37
+ metadata: ArticleMetadata
38
+ preview_text: StrictStr
39
+ rest_id: Annotated[str, Field(strict=True)]
40
+ title: StrictStr
41
+ __properties: ClassVar[List[str]] = ["cover_media", "id", "lifecycle_state", "metadata", "preview_text", "rest_id", "title"]
42
+
43
+ @field_validator('rest_id')
44
+ def rest_id_validate_regular_expression(cls, value):
45
+ """Validates the regular expression"""
46
+ if not re.match(r"^[0-9]+$", value):
47
+ raise ValueError(r"must validate the regular expression /^[0-9]+$/")
48
+ return value
49
+
50
+ model_config = ConfigDict(
51
+ populate_by_name=True,
52
+ validate_assignment=True,
53
+ protected_namespaces=(),
54
+ )
55
+
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.model_dump(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
64
+ return json.dumps(self.to_dict())
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> Optional[Self]:
68
+ """Create an instance of ArticleResult from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self) -> Dict[str, Any]:
72
+ """Return the dictionary representation of the model using alias.
73
+
74
+ This has the following differences from calling pydantic's
75
+ `self.model_dump(by_alias=True)`:
76
+
77
+ * `None` is only added to the output dict for nullable fields that
78
+ were set at model initialization. Other fields with value `None`
79
+ are ignored.
80
+ """
81
+ excluded_fields: Set[str] = set([
82
+ ])
83
+
84
+ _dict = self.model_dump(
85
+ by_alias=True,
86
+ exclude=excluded_fields,
87
+ exclude_none=True,
88
+ )
89
+ # override the default output from pydantic by calling `to_dict()` of cover_media
90
+ if self.cover_media:
91
+ _dict['cover_media'] = self.cover_media.to_dict()
92
+ # override the default output from pydantic by calling `to_dict()` of lifecycle_state
93
+ if self.lifecycle_state:
94
+ _dict['lifecycle_state'] = self.lifecycle_state.to_dict()
95
+ # override the default output from pydantic by calling `to_dict()` of metadata
96
+ if self.metadata:
97
+ _dict['metadata'] = self.metadata.to_dict()
98
+ return _dict
99
+
100
+ @classmethod
101
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
102
+ """Create an instance of ArticleResult from a dict"""
103
+ if obj is None:
104
+ return None
105
+
106
+ if not isinstance(obj, dict):
107
+ return cls.model_validate(obj)
108
+
109
+ _obj = cls.model_validate({
110
+ "cover_media": ArticleCoverMedia.from_dict(obj["cover_media"]) if obj.get("cover_media") is not None else None,
111
+ "id": obj.get("id"),
112
+ "lifecycle_state": ArticleLifecycleState.from_dict(obj["lifecycle_state"]) if obj.get("lifecycle_state") is not None else None,
113
+ "metadata": ArticleMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None,
114
+ "preview_text": obj.get("preview_text"),
115
+ "rest_id": obj.get("rest_id"),
116
+ "title": obj.get("title")
117
+ })
118
+ return _obj
119
+
120
+