diff --git a/twitter_openapi_python/pyproject.toml b/twitter_openapi_python/pyproject.toml index 13203c07..afcf4a86 100644 --- a/twitter_openapi_python/pyproject.toml +++ b/twitter_openapi_python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "twitter_openapi_python" -version = "0.0.26" +version = "0.0.29" description = "Twitter OpenAPI" authors = ["fa0311 "] license = "proprietary" # or "AGPL-3.0-only" @@ -14,7 +14,7 @@ include = ["twitter_openapi_python/py.typed"] python = "^3.7" pydantic = ">=2.6" -twitter-openapi-python-generated = "0.0.24" +twitter-openapi-python-generated = "0.0.27" [tool.poetry.dev-dependencies] @@ -27,4 +27,7 @@ extension-pkg-whitelist = "pydantic" [tool.pyright] reportPrivateImportUsage = false -typeCheckingMode = "standard" \ No newline at end of file +typeCheckingMode = "standard" + +[tool.ruff] +line-length = 120 \ No newline at end of file diff --git a/twitter_openapi_python/requirements.txt b/twitter_openapi_python/requirements.txt index a89e0cb7..08e52b98 100644 Binary files a/twitter_openapi_python/requirements.txt and b/twitter_openapi_python/requirements.txt differ diff --git a/twitter_openapi_python/setup.py b/twitter_openapi_python/setup.py index 08f60889..2c3143e1 100644 --- a/twitter_openapi_python/setup.py +++ b/twitter_openapi_python/setup.py @@ -5,13 +5,15 @@ from setuptools import find_packages, setup NAME = "twitter_openapi_python" -VERSION = "0.0.26" +VERSION = "0.0.29" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ - "twitter_openapi_python_generated == 0.0.24", + "twitter_openapi_python_generated == 0.0.27", "pydantic >= 2.6", ] -GITHUB_RAW_URL = "https://raw.githubusercontent.com/fa0311/twitter_openapi_python/refs/heads/master/twitter_openapi_python/" +GITHUB_RAW_URL = ( + "https://raw.githubusercontent.com/fa0311/twitter_openapi_python/refs/heads/master/twitter_openapi_python/" +) def image_replace(text: str, url: str): diff --git a/twitter_openapi_python/test/api/test_1_post_api.py b/twitter_openapi_python/test/api/test_1_post_api.py index c8ee25d3..08684c64 100644 --- a/twitter_openapi_python/test/api/test_1_post_api.py +++ b/twitter_openapi_python/test/api/test_1_post_api.py @@ -19,6 +19,7 @@ def test_post_create_tweet(self): def test_post_delete_tweet(self): time = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%SZ") result = self.client.post_create_tweet(tweet_text=f"Test{time}") + assert result.data.data.create_tweet tweet_id = result.data.data.create_tweet.tweet_results.result.rest_id result2 = self.client.post_delete_tweet(tweet_id=tweet_id) diff --git a/twitter_openapi_python/test/api/test_1_tweet_api.py b/twitter_openapi_python/test/api/test_1_tweet_api.py index 6cfabf4e..63e3a9c5 100644 --- a/twitter_openapi_python/test/api/test_1_tweet_api.py +++ b/twitter_openapi_python/test/api/test_1_tweet_api.py @@ -30,9 +30,7 @@ def test_get_home_latest_timeline(self): print_tweet(tweet) def test_get_list_latest_tweets_timeline(self): - result = self.client.get_list_latest_tweets_timeline( - list_id="1141162794290520064" - ) + result = self.client.get_list_latest_tweets_timeline(list_id="1141162794290520064") for tweet in list(filter(self.ad_fillter, result.data.data)): print_tweet(tweet) diff --git a/twitter_openapi_python/twitter_openapi_python/api/default_api.py b/twitter_openapi_python/twitter_openapi_python/api/default_api.py index 6220306f..8c0499e0 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/default_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/default_api.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, Optional, Type, TypeVar +from typing import Any, Callable, Optional, TypeVar import twitter_openapi_python_generated as twitter import twitter_openapi_python_generated.models as models @@ -7,13 +7,13 @@ from twitter_openapi_python.utils import ( build_response, build_tweet_api_utils, - check_error, get_kwargs, ) +from twitter_openapi_python.utils.api import error_check T1 = TypeVar("T1") T2 = TypeVar("T2") -ApiFnType = Callable[..., twitter.ApiResponse] +ApiFnType = Callable[..., twitter.ApiResponse[T1]] ParamType = dict[str, Any] @@ -27,20 +27,15 @@ def __init__(self, api: twitter.DefaultApi, flag: ParamType): def request( self, - apiFn: ApiFnType, + apiFn: "ApiFnType[T1]", convertFn: Callable[[T1], T2], - type1: Type[T1], - type2: Type[T2], key: str, param: ParamType, - ) -> TwitterApiUtilsResponse[T2]: + ): args = get_kwargs(flag=self.flag[key], additional=param) res = apiFn(**args) - checked = check_error(data=res, type=type1) - - data = convertFn(checked) - - return build_response(response=res, data=data) + data = convertFn(res.data) + return build_response(res, data) def get_profile_spotlights_query( self, @@ -55,9 +50,7 @@ def get_profile_spotlights_query( response = self.request( apiFn=self.api.get_profile_spotlights_query_with_http_info, - convertFn=lambda x: x.data.user_result_by_screen_name, - type1=models.ProfileResponse, - type2=models.UserResultByScreenName, + convertFn=lambda x: error_check(x.data.user_result_by_screen_name, x.errors), key="ProfileSpotlightsQuery", param=param, ) @@ -74,9 +67,9 @@ def get_tweet_result_by_rest_id( response = self.request( apiFn=self.api.get_tweet_result_by_rest_id_with_http_info, - convertFn=lambda x: build_tweet_api_utils(x.data.tweet_result), - type1=models.TweetResultByRestIdResponse, - type2=TweetApiUtilsData, + convertFn=lambda x: error_check( + build_tweet_api_utils(error_check(x.data.tweet_result, x.errors)), x.errors + ), key="TweetResultByRestId", param=param, ) diff --git a/twitter_openapi_python/twitter_openapi_python/api/initial_state_api.py b/twitter_openapi_python/twitter_openapi_python/api/initial_state_api.py index 5a8c7f84..39e63f00 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/initial_state_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/initial_state_api.py @@ -33,9 +33,7 @@ def request(self, url: str) -> HTTPResponse: def get_initial_state(self, url: str) -> InitialStateApiUtilsResponse: response = self.request(url=url).data.decode("utf-8") reg = '' - js = re.search( - reg.format(nonce=r"([a-zA-Z0-9]{48})", any=r"([\s\S]*?)"), response - ) + js = re.search(reg.format(nonce=r"([a-zA-Z0-9]{48})", any=r"([\s\S]*?)"), response) if js is None: raise Exception("js is None") @@ -56,14 +54,14 @@ def get_initial_state(self, url: str) -> InitialStateApiUtilsResponse: def get_user(e: dict[str, Any]) -> Optional[models.UserLegacy]: try: entities = e["entities"]["users"]["entities"] - return models.UserLegacy.parse_obj(list(entities.values())[0]) + return models.UserLegacy.model_validate(list(entities.values())[0]) except Exception: # todo: fix return None def get_session(e: dict[str, Any]) -> Optional[models.Session]: try: - return models.Session.parse_obj(e["session"]) + return models.Session.model_validate(e["session"]) except Exception: return None diff --git a/twitter_openapi_python/twitter_openapi_python/api/post_api.py b/twitter_openapi_python/twitter_openapi_python/api/post_api.py index 258fd51e..9f704b8a 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/post_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/post_api.py @@ -4,7 +4,7 @@ import twitter_openapi_python_generated.models as models from twitter_openapi_python.models import TwitterApiUtilsResponse -from twitter_openapi_python.utils import build_response, check_error, non_nullable +from twitter_openapi_python.utils import build_response, non_nullable T = TypeVar("T") ResponseType = TwitterApiUtilsResponse[T] @@ -19,14 +19,6 @@ def __init__(self, api: twitter.PostApi, flag: ParamType): self.api = api self.flag = flag - def builder( - self, - res: twitter.ApiResponse, - type: type[T], - ) -> ResponseType[T]: - checked = check_error(data=res, type=type) - return build_response(response=res, data=checked) - def post_create_tweet( self, tweet_text: str, @@ -37,15 +29,9 @@ def post_create_tweet( conversation_control: Optional[str] = None, ) -> ResponseType[models.CreateTweetResponse]: variables = non_nullable( - twitter.PostCreateTweetRequestVariables.from_dict( - self.flag["CreateTweet"]["variables"] - ) - ) - features = non_nullable( - twitter.PostCreateTweetRequestFeatures.from_dict( - self.flag["CreateTweet"]["features"] - ) + twitter.PostCreateTweetRequestVariables.from_dict(self.flag["CreateTweet"]["variables"]) ) + features = non_nullable(twitter.PostCreateTweetRequestFeatures.from_dict(self.flag["CreateTweet"]["features"])) variables.tweet_text = tweet_text if media_ids: tagged_or = tagged_users or [] @@ -58,10 +44,8 @@ def post_create_tweet( ] variables.attachment_url = attachment_url if conversation_control: - variables.conversation_control = ( - twitter.PostCreateTweetRequestVariablesConversationControl( - mode=conversation_control - ) + variables.conversation_control = twitter.PostCreateTweetRequestVariablesConversationControl( + mode=conversation_control ) if in_reply_to_tweet_id: @@ -78,17 +62,14 @@ def post_create_tweet( features=features, ), ) - - return self.builder(res=res, type=models.CreateTweetResponse) + return build_response(res, res.data) def post_delete_tweet( self, tweet_id: str, ) -> ResponseType[models.DeleteTweetResponse]: variables = non_nullable( - twitter.PostCreateRetweetRequestVariables.from_dict( - self.flag["DeleteTweet"]["variables"] - ) + twitter.PostCreateRetweetRequestVariables.from_dict(self.flag["DeleteTweet"]["variables"]) ) variables.tweet_id = tweet_id @@ -99,17 +80,14 @@ def post_delete_tweet( variables=variables, ), ) - - return self.builder(res=res, type=models.DeleteTweetResponse) + return build_response(res, res.data) def post_create_retweet( self, tweet_id: str, ) -> ResponseType[models.CreateRetweetResponse]: variables = non_nullable( - twitter.PostCreateRetweetRequestVariables.from_dict( - self.flag["CreateRetweet"]["variables"] - ) + twitter.PostCreateRetweetRequestVariables.from_dict(self.flag["CreateRetweet"]["variables"]) ) variables.tweet_id = tweet_id @@ -120,17 +98,14 @@ def post_create_retweet( variables=variables, ), ) - - return self.builder(res=res, type=models.CreateRetweetResponse) + return build_response(res, res.data) def post_delete_retweet( self, source_tweet_id: str, ) -> ResponseType[models.DeleteRetweetResponse]: variables = non_nullable( - twitter.PostDeleteRetweetRequestVariables.from_dict( - self.flag["DeleteRetweet"]["variables"] - ) + twitter.PostDeleteRetweetRequestVariables.from_dict(self.flag["DeleteRetweet"]["variables"]) ) variables.source_tweet_id = source_tweet_id @@ -141,18 +116,15 @@ def post_delete_retweet( variables=variables, ), ) - - return self.builder(res=res, type=models.DeleteRetweetResponse) + return build_response(res, res.data) # postFavoriteTweet def post_favorite_tweet( self, tweet_id: str, - ) -> ResponseType[models.FavoriteTweetResponseData]: + ) -> ResponseType[models.FavoriteTweetResponse]: variables = non_nullable( - twitter.PostCreateBookmarkRequestVariables.from_dict( - self.flag["FavoriteTweet"]["variables"] - ) + twitter.PostCreateBookmarkRequestVariables.from_dict(self.flag["FavoriteTweet"]["variables"]) ) variables.tweet_id = tweet_id @@ -163,17 +135,15 @@ def post_favorite_tweet( variables=variables, ), ) - return self.builder(res=res, type=models.FavoriteTweetResponseData) + return build_response(res, res.data) # postUnfavoriteTweet def post_unfavorite_tweet( self, tweet_id: str, - ) -> ResponseType[models.UnfavoriteTweetResponseData]: + ) -> ResponseType[models.UnfavoriteTweetResponse]: variables = non_nullable( - twitter.PostCreateRetweetRequestVariables.from_dict( - self.flag["UnfavoriteTweet"]["variables"] - ) + twitter.PostCreateRetweetRequestVariables.from_dict(self.flag["UnfavoriteTweet"]["variables"]) ) variables.tweet_id = tweet_id @@ -184,4 +154,4 @@ def post_unfavorite_tweet( variables=variables, ), ) - return self.builder(res=res, type=models.UnfavoriteTweetResponseData) + return build_response(res, res.data) diff --git a/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py b/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py index 10399ca2..39ccab20 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/tweet_api.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, List, Optional, Type, TypeVar +from typing import Any, Callable, List, Optional, TypeVar import twitter_openapi_python_generated as twitter import twitter_openapi_python_generated.models as models @@ -11,17 +11,16 @@ ) from twitter_openapi_python.utils import ( build_response, - check_error, entries_cursor, + error_check, get_kwargs, instruction_to_entry, tweet_entries_converter, ) -from twitter_openapi_python.utils.api import non_nullable T = TypeVar("T") ResponseType = TwitterApiUtilsResponse[TimelineApiUtilsResponse[TweetApiUtilsData]] -ApiFnType = Callable[..., twitter.ApiResponse] +ApiFnType = Callable[..., twitter.ApiResponse[T]] ParamType = dict[str, Any] @@ -35,17 +34,14 @@ def __init__(self, api: twitter.TweetApi, flag: ParamType): def request( self, - apiFn: ApiFnType, + apiFn: "ApiFnType[T]", convertFn: Callable[[T], List[models.InstructionUnion]], - type: Type[T], key: str, param: ParamType, ) -> ResponseType: args = get_kwargs(flag=self.flag[key], additional=param) res = apiFn(**args) - checked = check_error(data=res, type=type) - - instruction = convertFn(checked) + instruction = convertFn(res.data) entry = instruction_to_entry(instruction) tweet_list = tweet_entries_converter(entry) raw = ApiUtilsRaw( @@ -57,8 +53,7 @@ def request( cursor=entries_cursor(entry), data=tweet_list, ) - - return build_response(response=res, data=data) + return build_response(res, data) def get_tweet_detail( self, @@ -77,8 +72,7 @@ def get_tweet_detail( response = self.request( apiFn=self.api.get_tweet_detail_with_http_info, - convertFn=lambda e: e.data.threaded_conversation_with_injections_v2.instructions, - type=models.TweetDetailResponse, + convertFn=lambda e: error_check(e.data.threaded_conversation_with_injections_v2, e.errors).instructions, key="TweetDetail", param=param, ) @@ -104,8 +98,7 @@ def get_search_timeline( response = self.request( apiFn=self.api.get_search_timeline_with_http_info, - convertFn=lambda e: e.data.search_by_raw_query.search_timeline.timeline.instructions, - type=models.SearchTimelineResponse, + convertFn=lambda e: error_check(e.data.search_by_raw_query, e.errors).search_timeline.timeline.instructions, key="SearchTimeline", param=param, ) @@ -127,8 +120,7 @@ def get_home_timeline( response = self.request( apiFn=self.api.get_home_timeline_with_http_info, - convertFn=lambda e: e.data.home.home_timeline_urt.instructions, - type=models.TimelineResponse, + convertFn=lambda e: error_check(e.data.home, e.errors).home_timeline_urt.instructions, key="HomeTimeline", param=param, ) @@ -150,8 +142,7 @@ def get_home_latest_timeline( response = self.request( apiFn=self.api.get_home_latest_timeline_with_http_info, - convertFn=lambda e: e.data.home.home_timeline_urt.instructions, - type=models.TimelineResponse, + convertFn=lambda e: error_check(e.data.home, e.errors).home_timeline_urt.instructions, key="HomeLatestTimeline", param=param, ) @@ -174,10 +165,9 @@ def get_list_latest_tweets_timeline( response = self.request( apiFn=self.api.get_list_latest_tweets_timeline_with_http_info, - convertFn=lambda e: [] - if (x := e.data.list.tweets_timeline.timeline) is None - else x.instructions, - type=models.ListLatestTweetsTimelineResponse, + convertFn=lambda e: error_check( + error_check(e.data.list, e.errors).tweets_timeline.timeline, e.errors + ).instructions, key="ListLatestTweetsTimeline", param=param, ) @@ -200,10 +190,9 @@ def get_user_tweets( response = self.request( apiFn=self.api.get_user_tweets_with_http_info, - convertFn=lambda e: non_nullable( - e.data.user.result.timeline_v2.timeline + convertFn=lambda e: error_check( + error_check(e.data.user, e.errors).result.timeline_v2.timeline, e.errors ).instructions, - type=models.UserTweetsResponse, key="UserTweets", param=param, ) @@ -226,10 +215,9 @@ def get_user_tweets_and_replies( response = self.request( apiFn=self.api.get_user_tweets_and_replies_with_http_info, - convertFn=lambda e: non_nullable( - e.data.user.result.timeline_v2.timeline + convertFn=lambda e: error_check( + error_check(e.data.user, e.errors).result.timeline_v2.timeline, e.errors ).instructions, - type=models.UserTweetsResponse, key="UserTweetsAndReplies", param=param, ) @@ -252,10 +240,9 @@ def get_user_media( response = self.request( apiFn=self.api.get_user_media_with_http_info, - convertFn=lambda e: non_nullable( - e.data.user.result.timeline_v2.timeline + convertFn=lambda e: error_check( + error_check(e.data.user, e.errors).result.timeline_v2.timeline, e.errors ).instructions, - type=models.UserTweetsResponse, key="UserMedia", param=param, ) @@ -278,10 +265,9 @@ def get_likes( response = self.request( apiFn=self.api.get_likes_with_http_info, - convertFn=lambda e: non_nullable( - e.data.user.result.timeline_v2.timeline + convertFn=lambda e: error_check( + error_check(e.data.user, e.errors).result.timeline_v2.timeline, e.errors ).instructions, - type=models.UserTweetsResponse, key="Likes", param=param, ) @@ -303,8 +289,9 @@ def get_bookmarks( response = self.request( apiFn=self.api.get_bookmarks_with_http_info, - convertFn=lambda e: e.data.bookmark_timeline_v2.timeline.instructions, - type=models.BookmarksResponse, + convertFn=lambda e: error_check( + error_check(e.data, e.errors).bookmark_timeline_v2.timeline, e.errors + ).instructions, key="Bookmarks", param=param, ) diff --git a/twitter_openapi_python/twitter_openapi_python/api/user_api.py b/twitter_openapi_python/twitter_openapi_python/api/user_api.py index f3dedfa1..fa1bb01e 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/user_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/user_api.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, Optional, Type, TypeVar +from typing import Any, Callable, Optional, TypeVar import twitter_openapi_python_generated as twitter import twitter_openapi_python_generated.models as models @@ -6,14 +6,14 @@ from twitter_openapi_python.models import TwitterApiUtilsResponse, UserApiUtilsData from twitter_openapi_python.utils import ( build_response, - check_error, + error_check, get_kwargs, user_or_null_converter, ) T = TypeVar("T") ResponseType = TwitterApiUtilsResponse[UserApiUtilsData] -ApiFnType = Callable[..., twitter.ApiResponse] +ApiFnType = Callable[..., twitter.ApiResponse[T]] ParamType = dict[str, Any] @@ -27,27 +27,19 @@ def __init__(self, api: twitter.UserApi, flag: ParamType): def request( self, - apiFn: ApiFnType, + apiFn: "ApiFnType[T]", convertFn: Callable[[T], models.UserResults], - type: Type[T], key: str, param: ParamType, ) -> ResponseType: args = get_kwargs(flag=self.flag[key], additional=param) res = apiFn(**args) - checked = check_error(data=res, type=type) - - result = convertFn(checked) + result = convertFn(res.data) if result.result is None: - # never reach this point. raise Exception("No user") - user = user_or_null_converter(result.result) - if user is None: - # never reach this point. raise Exception("No user") - data = UserApiUtilsData( raw=result, user=user, @@ -65,8 +57,7 @@ def get_user_by_screen_name( param.update(extra_param) return self.request( apiFn=self.api.get_user_by_screen_name_with_http_info, - convertFn=lambda e: e.data.user, - type=models.UserResponse, + convertFn=lambda e: error_check(e.data.user, e.errors), key="UserByScreenName", param=param, ) @@ -81,8 +72,7 @@ def get_user_by_rest_id( param.update(extra_param) return self.request( apiFn=self.api.get_user_by_rest_id_with_http_info, - convertFn=lambda e: e.data.user, - type=models.UserResponse, + convertFn=lambda e: error_check(e.data.user, e.errors), key="UserByRestId", param=param, ) diff --git a/twitter_openapi_python/twitter_openapi_python/api/user_list_api.py b/twitter_openapi_python/twitter_openapi_python/api/user_list_api.py index 957ea291..2d647d37 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/user_list_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/user_list_api.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, List, Optional, Type, TypeVar +from typing import Any, Callable, List, Optional, TypeVar import twitter_openapi_python_generated as twitter import twitter_openapi_python_generated.models as models @@ -11,18 +11,17 @@ ) from twitter_openapi_python.utils import ( build_response, - check_error, entries_cursor, + error_check, get_kwargs, instruction_to_entry, - non_nullable, user_entries_converter, user_result_converter, ) T = TypeVar("T") ResponseType = TwitterApiUtilsResponse[TimelineApiUtilsResponse[UserApiUtilsData]] -ApiFnType = Callable[..., twitter.ApiResponse] +ApiFnType = Callable[..., twitter.ApiResponse[T]] ParamType = dict[str, Any] @@ -36,17 +35,14 @@ def __init__(self, api: twitter.UserListApi, flag: ParamType): def request( self, - apiFn: ApiFnType, + apiFn: "ApiFnType[T]", convertFn: Callable[[T], List[models.InstructionUnion]], - type: Type[T], key: str, param: ParamType, ) -> ResponseType: args = get_kwargs(flag=self.flag[key], additional=param) res = apiFn(**args) - checked = check_error(data=res, type=type) - - instruction = convertFn(checked) + instruction = convertFn(res.data) entry = instruction_to_entry(instruction) user_list = user_entries_converter(entry) user = user_result_converter(user_list) @@ -79,8 +75,7 @@ def get_followers( param.update(extra_param) return self.request( apiFn=self.api.get_followers_with_http_info, - convertFn=lambda e: e.data.user.result.timeline.timeline.instructions, - type=models.FollowResponse, + convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions, key="Followers", param=param, ) @@ -101,8 +96,7 @@ def get_following( param.update(extra_param) return self.request( apiFn=self.api.get_following_with_http_info, - convertFn=lambda e: e.data.user.result.timeline.timeline.instructions, - type=models.FollowResponse, + convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions, key="Following", param=param, ) @@ -123,8 +117,7 @@ def get_followers_you_know( param.update(extra_param) return self.request( apiFn=self.api.get_followers_you_know_with_http_info, - convertFn=lambda e: e.data.user.result.timeline.timeline.instructions, - type=models.FollowResponse, + convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions, key="FollowersYouKnow", param=param, ) @@ -145,10 +138,9 @@ def get_favoriters( param.update(extra_param) return self.request( apiFn=self.api.get_favoriters_with_http_info, - convertFn=lambda e: non_nullable( - e.data.favoriters_timeline.timeline + convertFn=lambda e: error_check( + error_check(e.data.favoriters_timeline, e.errors).timeline, e.errors ).instructions, - type=models.TweetFavoritersResponse, key="Favoriters", param=param, ) @@ -169,10 +161,9 @@ def get_retweeters( param.update(extra_param) return self.request( apiFn=self.api.get_retweeters_with_http_info, - convertFn=lambda e: non_nullable( - e.data.retweeters_timeline.timeline + convertFn=lambda e: error_check( + error_check(e.data.retweeters_timeline, e.errors).timeline, e.errors ).instructions, - type=models.TweetRetweetersResponse, key="Retweeters", param=param, ) diff --git a/twitter_openapi_python/twitter_openapi_python/api/users_api.py b/twitter_openapi_python/twitter_openapi_python/api/users_api.py index fa0de948..3e30d2ef 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/users_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/users_api.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, Optional, Type, TypeVar +from typing import Any, Callable, Optional, TypeVar import twitter_openapi_python_generated as twitter import twitter_openapi_python_generated.models as models @@ -6,14 +6,14 @@ from twitter_openapi_python.models import TwitterApiUtilsResponse, UserApiUtilsData from twitter_openapi_python.utils import ( build_response, - check_error, + error_check, get_kwargs, user_result_converter, ) T = TypeVar("T") ResponseType = TwitterApiUtilsResponse[list[UserApiUtilsData]] -ApiFnType = Callable[..., twitter.ApiResponse] +ApiFnType = Callable[..., twitter.ApiResponse[T]] ParamType = dict[str, Any] @@ -27,17 +27,14 @@ def __init__(self, api: twitter.UsersApi, flag: ParamType): def request( self, - apiFn: ApiFnType, + apiFn: "ApiFnType[T]", convertFn: Callable[[T], list[models.UserResults]], - type: Type[T], key: str, param: ParamType, ) -> ResponseType: args = get_kwargs(flag=self.flag[key], additional=param) res = apiFn(**args) - checked = check_error(data=res, type=type) - - user_result = convertFn(checked) + user_result = convertFn(res.data) user = user_result_converter(user_result) return build_response(response=res, data=user) @@ -51,8 +48,7 @@ def get_users_by_rest_ids( param.update(extra_param) return self.request( apiFn=self.api.get_users_by_rest_ids_with_http_info, - convertFn=lambda e: e.data.users, - type=models.UsersResponse, + convertFn=lambda e: error_check(e.data.users, e.errors), key="UsersByRestIds", param=param, ) diff --git a/twitter_openapi_python/twitter_openapi_python/api/v11_get_api.py b/twitter_openapi_python/twitter_openapi_python/api/v11_get_api.py index ceac608a..f0930362 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/v11_get_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/v11_get_api.py @@ -1,5 +1,4 @@ -from types import NoneType -from typing import Any, Callable, Optional, Type, TypeVar +from typing import Any, Callable, Optional, TypeVar import twitter_openapi_python_generated as twitter @@ -7,7 +6,7 @@ from twitter_openapi_python.utils import build_response, get_legacy_kwargs T = TypeVar("T") -ApiFnType = Callable[..., twitter.ApiResponse] +ApiFnType = Callable[..., twitter.ApiResponse[T]] ParamType = dict[str, Any] @@ -21,18 +20,15 @@ def __init__(self, api: twitter.V11GetApi, flag: ParamType): def request( self, - apiFn: ApiFnType, - type: Type[T], + apiFn: "ApiFnType[T]", key: str, param: ParamType, ) -> TwitterApiUtilsResponse[T]: args = get_legacy_kwargs(flag=self.flag[key], additional=param) res = apiFn(**args) data = res.data - if not isinstance(data, type): raise Exception("Error") - return build_response(response=res, data=data) def get_friends_following_list( @@ -52,7 +48,6 @@ def get_friends_following_list( response = self.request( apiFn=self.api.get_friends_following_list_with_http_info, - type=NoneType, param=param, key="friends/following/list.json", ) @@ -69,7 +64,6 @@ def get_search_typeahead( response = self.request( apiFn=self.api.get_search_typeahead_with_http_info, - type=NoneType, param=param, key="search/typeahead.json", ) diff --git a/twitter_openapi_python/twitter_openapi_python/api/v11_post_api.py b/twitter_openapi_python/twitter_openapi_python/api/v11_post_api.py index c227c618..99d6aa57 100644 --- a/twitter_openapi_python/twitter_openapi_python/api/v11_post_api.py +++ b/twitter_openapi_python/twitter_openapi_python/api/v11_post_api.py @@ -1,5 +1,4 @@ -from types import NoneType -from typing import Any, Callable, Optional, Type, TypeVar +from typing import Any, Callable, Optional, TypeVar import twitter_openapi_python_generated as twitter @@ -7,7 +6,7 @@ from twitter_openapi_python.utils import build_response, get_legacy_kwargs T = TypeVar("T") -ApiFnType = Callable[..., twitter.ApiResponse] +ApiFnType = Callable[..., twitter.ApiResponse[T]] ParamType = dict[str, Any] @@ -21,8 +20,7 @@ def __init__(self, api: twitter.V11PostApi, flag: ParamType): def request( self, - apiFn: ApiFnType, - type: Type[T], + apiFn: "ApiFnType[T]", key: str, param: ParamType, ) -> TwitterApiUtilsResponse[T]: @@ -46,7 +44,6 @@ def post_create_friendships( response = self.request( apiFn=self.api.post_create_friendships_with_http_info, - type=NoneType, param=param, key="friendships/create.json", ) @@ -63,7 +60,6 @@ def post_destroy_friendships( response = self.request( apiFn=self.api.post_destroy_friendships_with_http_info, - type=NoneType, param=param, key="friendships/destroy.json", ) diff --git a/twitter_openapi_python/twitter_openapi_python/utils/__init__.py b/twitter_openapi_python/twitter_openapi_python/utils/__init__.py index ba2b8fcd..e9fe82c7 100644 --- a/twitter_openapi_python/twitter_openapi_python/utils/__init__.py +++ b/twitter_openapi_python/twitter_openapi_python/utils/__init__.py @@ -8,7 +8,7 @@ build_header, build_response, build_tweet_api_utils, - check_error, + error_check, entries_cursor, get_kwargs, get_legacy_kwargs, diff --git a/twitter_openapi_python/twitter_openapi_python/utils/api.py b/twitter_openapi_python/twitter_openapi_python/utils/api.py index 81d0452c..82e1c81a 100644 --- a/twitter_openapi_python/twitter_openapi_python/utils/api.py +++ b/twitter_openapi_python/twitter_openapi_python/utils/api.py @@ -28,6 +28,7 @@ def non_nullable(x: Optional[T]) -> T: raise Exception("No data") return x + def non_nullable_list(x: List[Optional[T]]) -> List[T]: def filter_fn(x: Optional[T]) -> TypeGuard[T]: return x is not None @@ -58,15 +59,13 @@ def to_snake_case(x: str) -> str: return res | additional -def check_error(data: twitter.ApiResponse, type: type[T]) -> T: - if data.data is None: - raise Exception("No data") - oneOf = data.data.actual_instance - if isinstance(oneOf, models.Errors): - raise Exception(oneOf) - if isinstance(oneOf, type): - return oneOf - raise Exception("Error") +def error_check(data: Optional[T], error: Optional[List[models.ErrorResponse]]) -> T: + if data is None: + if error is None: + raise Exception("No data") + else: + raise Exception(", ".join([x.message for x in error])) + return data def instruction_to_entry( @@ -263,10 +262,7 @@ def build_header(headers: Dict[str, str]) -> ApiUtilsHeader: ) -def build_response( - response: twitter.ApiResponse, - data: T1, -) -> TwitterApiUtilsResponse[T1]: +def build_response(response: twitter.ApiResponse, data: T1) -> TwitterApiUtilsResponse[T1]: if response.headers is None: raise Exception("headers is None") diff --git a/twitter_openapi_python_generated/.openapi-generator/FILES b/twitter_openapi_python_generated/.openapi-generator/FILES index e22322fa..3db5ccf6 100644 --- a/twitter_openapi_python_generated/.openapi-generator/FILES +++ b/twitter_openapi_python_generated/.openapi-generator/FILES @@ -36,7 +36,9 @@ docs/CommunityActions.md docs/CommunityData.md docs/CommunityDeleteActionResult.md docs/CommunityInvitesResult.md -docs/CommunityJoinActionResult.md +docs/CommunityJoinAction.md +docs/CommunityJoinActionResultUnion.md +docs/CommunityJoinActionUnavailable.md docs/CommunityJoinRequestsResult.md docs/CommunityLeaveActionResult.md docs/CommunityPinActionResult.md @@ -75,34 +77,18 @@ docs/DeleteTweetResponseResult.md docs/DisplayTreatment.md docs/DisplayType.md docs/Entities.md -docs/Error.md docs/ErrorExtensions.md -docs/Errors.md -docs/ErrorsData.md +docs/ErrorResponse.md docs/ExtMediaAvailability.md docs/ExtendedEntities.md docs/FavoriteTweet.md -docs/FavoriteTweetResponseData.md +docs/FavoriteTweetResponse.md docs/FeedbackInfo.md docs/FollowResponse.md docs/FollowResponseData.md docs/FollowResponseResult.md docs/FollowResponseUser.md docs/FollowTimeline.md -docs/GetBookmarks200Response.md -docs/GetFavoriters200Response.md -docs/GetFollowers200Response.md -docs/GetHomeLatestTimeline200Response.md -docs/GetLikes200Response.md -docs/GetListLatestTweetsTimeline200Response.md -docs/GetProfileSpotlightsQuery200Response.md -docs/GetRetweeters200Response.md -docs/GetSearchTimeline200Response.md -docs/GetTweetDetail200Response.md -docs/GetTweetResultByRestId200Response.md -docs/GetUserByRestId200Response.md -docs/GetUserHighlightsTweets200Response.md -docs/GetUsersByRestIds200Response.md docs/Highlight.md docs/HomeTimelineHome.md docs/HomeTimelineResponseData.md @@ -139,15 +125,12 @@ docs/NoteTweetResultRichText.md docs/NoteTweetResultRichTextTag.md docs/OneFactorLoginEligibility.md docs/OtherApi.md -docs/OtherResponse.md +docs/OtherObjectAll.md docs/PostApi.md -docs/PostCreateBookmark200Response.md docs/PostCreateBookmarkRequest.md docs/PostCreateBookmarkRequestVariables.md -docs/PostCreateRetweet200Response.md docs/PostCreateRetweetRequest.md docs/PostCreateRetweetRequestVariables.md -docs/PostCreateTweet200Response.md docs/PostCreateTweetRequest.md docs/PostCreateTweetRequestFeatures.md docs/PostCreateTweetRequestVariables.md @@ -155,16 +138,11 @@ docs/PostCreateTweetRequestVariablesConversationControl.md docs/PostCreateTweetRequestVariablesMedia.md docs/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.md docs/PostCreateTweetRequestVariablesReply.md -docs/PostDeleteBookmark200Response.md docs/PostDeleteBookmarkRequest.md -docs/PostDeleteRetweet200Response.md docs/PostDeleteRetweetRequest.md docs/PostDeleteRetweetRequestVariables.md -docs/PostDeleteTweet200Response.md docs/PostDeleteTweetRequest.md -docs/PostFavoriteTweet200Response.md docs/PostFavoriteTweetRequest.md -docs/PostUnfavoriteTweet200Response.md docs/PostUnfavoriteTweetRequest.md docs/PrimaryCommunityTopic.md docs/ProfileResponse.md @@ -256,7 +234,7 @@ docs/TweetView.md docs/TweetWithVisibilityResults.md docs/TypeName.md docs/UnfavoriteTweet.md -docs/UnfavoriteTweetResponseData.md +docs/UnfavoriteTweetResponse.md docs/UnifiedCard.md docs/Url.md docs/UrtEndpointOptions.md @@ -342,7 +320,9 @@ test/test_community_actions.py test/test_community_data.py test/test_community_delete_action_result.py test/test_community_invites_result.py -test/test_community_join_action_result.py +test/test_community_join_action.py +test/test_community_join_action_result_union.py +test/test_community_join_action_unavailable.py test/test_community_join_requests_result.py test/test_community_leave_action_result.py test/test_community_pin_action_result.py @@ -381,34 +361,18 @@ test/test_delete_tweet_response_result.py test/test_display_treatment.py test/test_display_type.py test/test_entities.py -test/test_error.py test/test_error_extensions.py -test/test_errors.py -test/test_errors_data.py +test/test_error_response.py test/test_ext_media_availability.py test/test_extended_entities.py test/test_favorite_tweet.py -test/test_favorite_tweet_response_data.py +test/test_favorite_tweet_response.py test/test_feedback_info.py test/test_follow_response.py test/test_follow_response_data.py test/test_follow_response_result.py test/test_follow_response_user.py test/test_follow_timeline.py -test/test_get_bookmarks200_response.py -test/test_get_favoriters200_response.py -test/test_get_followers200_response.py -test/test_get_home_latest_timeline200_response.py -test/test_get_likes200_response.py -test/test_get_list_latest_tweets_timeline200_response.py -test/test_get_profile_spotlights_query200_response.py -test/test_get_retweeters200_response.py -test/test_get_search_timeline200_response.py -test/test_get_tweet_detail200_response.py -test/test_get_tweet_result_by_rest_id200_response.py -test/test_get_user_by_rest_id200_response.py -test/test_get_user_highlights_tweets200_response.py -test/test_get_users_by_rest_ids200_response.py test/test_highlight.py test/test_home_timeline_home.py test/test_home_timeline_response_data.py @@ -445,15 +409,12 @@ test/test_note_tweet_result_rich_text.py test/test_note_tweet_result_rich_text_tag.py test/test_one_factor_login_eligibility.py test/test_other_api.py -test/test_other_response.py +test/test_other_object_all.py test/test_post_api.py -test/test_post_create_bookmark200_response.py test/test_post_create_bookmark_request.py test/test_post_create_bookmark_request_variables.py -test/test_post_create_retweet200_response.py test/test_post_create_retweet_request.py test/test_post_create_retweet_request_variables.py -test/test_post_create_tweet200_response.py test/test_post_create_tweet_request.py test/test_post_create_tweet_request_features.py test/test_post_create_tweet_request_variables.py @@ -461,16 +422,11 @@ test/test_post_create_tweet_request_variables_conversation_control.py test/test_post_create_tweet_request_variables_media.py test/test_post_create_tweet_request_variables_media_media_entities_inner.py test/test_post_create_tweet_request_variables_reply.py -test/test_post_delete_bookmark200_response.py test/test_post_delete_bookmark_request.py -test/test_post_delete_retweet200_response.py test/test_post_delete_retweet_request.py test/test_post_delete_retweet_request_variables.py -test/test_post_delete_tweet200_response.py test/test_post_delete_tweet_request.py -test/test_post_favorite_tweet200_response.py test/test_post_favorite_tweet_request.py -test/test_post_unfavorite_tweet200_response.py test/test_post_unfavorite_tweet_request.py test/test_primary_community_topic.py test/test_profile_response.py @@ -514,6 +470,9 @@ test/test_timeline_response.py test/test_timeline_show_alert.py test/test_timeline_show_alert_rich_text.py test/test_timeline_show_cover.py +test/test_timeline_terminate_timeline.py +test/test_timeline_timeline_cursor.py +test/test_timeline_timeline_item.py test/test_timeline_timeline_module.py test/test_timeline_topic_context.py test/test_timeline_tweet.py @@ -548,6 +507,7 @@ test/test_tweet_interstitial_text_entity_ref.py test/test_tweet_legacy.py test/test_tweet_legacy_scopes.py test/test_tweet_previous_counts.py +test/test_tweet_result_by_rest_id_data.py test/test_tweet_result_by_rest_id_response.py test/test_tweet_retweeters_response.py test/test_tweet_retweeters_response_data.py @@ -558,7 +518,7 @@ test/test_tweet_view.py test/test_tweet_with_visibility_results.py test/test_type_name.py test/test_unfavorite_tweet.py -test/test_unfavorite_tweet_response_data.py +test/test_unfavorite_tweet_response.py test/test_unified_card.py test/test_url.py test/test_urt_endpoint_options.py @@ -655,7 +615,9 @@ twitter_openapi_python_generated/models/community_actions.py twitter_openapi_python_generated/models/community_data.py twitter_openapi_python_generated/models/community_delete_action_result.py twitter_openapi_python_generated/models/community_invites_result.py -twitter_openapi_python_generated/models/community_join_action_result.py +twitter_openapi_python_generated/models/community_join_action.py +twitter_openapi_python_generated/models/community_join_action_result_union.py +twitter_openapi_python_generated/models/community_join_action_unavailable.py twitter_openapi_python_generated/models/community_join_requests_result.py twitter_openapi_python_generated/models/community_leave_action_result.py twitter_openapi_python_generated/models/community_pin_action_result.py @@ -693,34 +655,18 @@ twitter_openapi_python_generated/models/delete_tweet_response_result.py twitter_openapi_python_generated/models/display_treatment.py twitter_openapi_python_generated/models/display_type.py twitter_openapi_python_generated/models/entities.py -twitter_openapi_python_generated/models/error.py twitter_openapi_python_generated/models/error_extensions.py -twitter_openapi_python_generated/models/errors.py -twitter_openapi_python_generated/models/errors_data.py +twitter_openapi_python_generated/models/error_response.py twitter_openapi_python_generated/models/ext_media_availability.py twitter_openapi_python_generated/models/extended_entities.py twitter_openapi_python_generated/models/favorite_tweet.py -twitter_openapi_python_generated/models/favorite_tweet_response_data.py +twitter_openapi_python_generated/models/favorite_tweet_response.py twitter_openapi_python_generated/models/feedback_info.py twitter_openapi_python_generated/models/follow_response.py twitter_openapi_python_generated/models/follow_response_data.py twitter_openapi_python_generated/models/follow_response_result.py twitter_openapi_python_generated/models/follow_response_user.py twitter_openapi_python_generated/models/follow_timeline.py -twitter_openapi_python_generated/models/get_bookmarks200_response.py -twitter_openapi_python_generated/models/get_favoriters200_response.py -twitter_openapi_python_generated/models/get_followers200_response.py -twitter_openapi_python_generated/models/get_home_latest_timeline200_response.py -twitter_openapi_python_generated/models/get_likes200_response.py -twitter_openapi_python_generated/models/get_list_latest_tweets_timeline200_response.py -twitter_openapi_python_generated/models/get_profile_spotlights_query200_response.py -twitter_openapi_python_generated/models/get_retweeters200_response.py -twitter_openapi_python_generated/models/get_search_timeline200_response.py -twitter_openapi_python_generated/models/get_tweet_detail200_response.py -twitter_openapi_python_generated/models/get_tweet_result_by_rest_id200_response.py -twitter_openapi_python_generated/models/get_user_by_rest_id200_response.py -twitter_openapi_python_generated/models/get_user_highlights_tweets200_response.py -twitter_openapi_python_generated/models/get_users_by_rest_ids200_response.py twitter_openapi_python_generated/models/highlight.py twitter_openapi_python_generated/models/home_timeline_home.py twitter_openapi_python_generated/models/home_timeline_response_data.py @@ -756,14 +702,11 @@ twitter_openapi_python_generated/models/note_tweet_result_media_inline_media.py twitter_openapi_python_generated/models/note_tweet_result_rich_text.py twitter_openapi_python_generated/models/note_tweet_result_rich_text_tag.py twitter_openapi_python_generated/models/one_factor_login_eligibility.py -twitter_openapi_python_generated/models/other_response.py -twitter_openapi_python_generated/models/post_create_bookmark200_response.py +twitter_openapi_python_generated/models/other_object_all.py twitter_openapi_python_generated/models/post_create_bookmark_request.py twitter_openapi_python_generated/models/post_create_bookmark_request_variables.py -twitter_openapi_python_generated/models/post_create_retweet200_response.py twitter_openapi_python_generated/models/post_create_retweet_request.py twitter_openapi_python_generated/models/post_create_retweet_request_variables.py -twitter_openapi_python_generated/models/post_create_tweet200_response.py twitter_openapi_python_generated/models/post_create_tweet_request.py twitter_openapi_python_generated/models/post_create_tweet_request_features.py twitter_openapi_python_generated/models/post_create_tweet_request_variables.py @@ -771,16 +714,11 @@ twitter_openapi_python_generated/models/post_create_tweet_request_variables_conv twitter_openapi_python_generated/models/post_create_tweet_request_variables_media.py twitter_openapi_python_generated/models/post_create_tweet_request_variables_media_media_entities_inner.py twitter_openapi_python_generated/models/post_create_tweet_request_variables_reply.py -twitter_openapi_python_generated/models/post_delete_bookmark200_response.py twitter_openapi_python_generated/models/post_delete_bookmark_request.py -twitter_openapi_python_generated/models/post_delete_retweet200_response.py twitter_openapi_python_generated/models/post_delete_retweet_request.py twitter_openapi_python_generated/models/post_delete_retweet_request_variables.py -twitter_openapi_python_generated/models/post_delete_tweet200_response.py twitter_openapi_python_generated/models/post_delete_tweet_request.py -twitter_openapi_python_generated/models/post_favorite_tweet200_response.py twitter_openapi_python_generated/models/post_favorite_tweet_request.py -twitter_openapi_python_generated/models/post_unfavorite_tweet200_response.py twitter_openapi_python_generated/models/post_unfavorite_tweet_request.py twitter_openapi_python_generated/models/primary_community_topic.py twitter_openapi_python_generated/models/profile_response.py @@ -871,7 +809,7 @@ twitter_openapi_python_generated/models/tweet_view.py twitter_openapi_python_generated/models/tweet_with_visibility_results.py twitter_openapi_python_generated/models/type_name.py twitter_openapi_python_generated/models/unfavorite_tweet.py -twitter_openapi_python_generated/models/unfavorite_tweet_response_data.py +twitter_openapi_python_generated/models/unfavorite_tweet_response.py twitter_openapi_python_generated/models/unified_card.py twitter_openapi_python_generated/models/url.py twitter_openapi_python_generated/models/urt_endpoint_options.py diff --git a/twitter_openapi_python_generated/.openapi-generator/VERSION b/twitter_openapi_python_generated/.openapi-generator/VERSION index 4bc5d618..758bb9c8 100644 --- a/twitter_openapi_python_generated/.openapi-generator/VERSION +++ b/twitter_openapi_python_generated/.openapi-generator/VERSION @@ -1 +1 @@ -7.9.0 +7.10.0 diff --git a/twitter_openapi_python_generated/README.md b/twitter_openapi_python_generated/README.md index 1d33be15..bd1ddaa2 100644 --- a/twitter_openapi_python_generated/README.md +++ b/twitter_openapi_python_generated/README.md @@ -4,13 +4,13 @@ Twitter OpenAPI(Swagger) specification This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.0.1 -- Package version: 0.0.24 -- Generator version: 7.9.0 +- Package version: 0.0.27 +- Generator version: 7.10.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. -Python 3.7+ +Python 3.8+ ## Installation & Usage ### pip install @@ -78,6 +78,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -293,7 +299,9 @@ Class | Method | HTTP request | Description - [CommunityData](docs/CommunityData.md) - [CommunityDeleteActionResult](docs/CommunityDeleteActionResult.md) - [CommunityInvitesResult](docs/CommunityInvitesResult.md) - - [CommunityJoinActionResult](docs/CommunityJoinActionResult.md) + - [CommunityJoinAction](docs/CommunityJoinAction.md) + - [CommunityJoinActionResultUnion](docs/CommunityJoinActionResultUnion.md) + - [CommunityJoinActionUnavailable](docs/CommunityJoinActionUnavailable.md) - [CommunityJoinRequestsResult](docs/CommunityJoinRequestsResult.md) - [CommunityLeaveActionResult](docs/CommunityLeaveActionResult.md) - [CommunityPinActionResult](docs/CommunityPinActionResult.md) @@ -331,34 +339,18 @@ Class | Method | HTTP request | Description - [DisplayTreatment](docs/DisplayTreatment.md) - [DisplayType](docs/DisplayType.md) - [Entities](docs/Entities.md) - - [Error](docs/Error.md) - [ErrorExtensions](docs/ErrorExtensions.md) - - [Errors](docs/Errors.md) - - [ErrorsData](docs/ErrorsData.md) + - [ErrorResponse](docs/ErrorResponse.md) - [ExtMediaAvailability](docs/ExtMediaAvailability.md) - [ExtendedEntities](docs/ExtendedEntities.md) - [FavoriteTweet](docs/FavoriteTweet.md) - - [FavoriteTweetResponseData](docs/FavoriteTweetResponseData.md) + - [FavoriteTweetResponse](docs/FavoriteTweetResponse.md) - [FeedbackInfo](docs/FeedbackInfo.md) - [FollowResponse](docs/FollowResponse.md) - [FollowResponseData](docs/FollowResponseData.md) - [FollowResponseResult](docs/FollowResponseResult.md) - [FollowResponseUser](docs/FollowResponseUser.md) - [FollowTimeline](docs/FollowTimeline.md) - - [GetBookmarks200Response](docs/GetBookmarks200Response.md) - - [GetFavoriters200Response](docs/GetFavoriters200Response.md) - - [GetFollowers200Response](docs/GetFollowers200Response.md) - - [GetHomeLatestTimeline200Response](docs/GetHomeLatestTimeline200Response.md) - - [GetLikes200Response](docs/GetLikes200Response.md) - - [GetListLatestTweetsTimeline200Response](docs/GetListLatestTweetsTimeline200Response.md) - - [GetProfileSpotlightsQuery200Response](docs/GetProfileSpotlightsQuery200Response.md) - - [GetRetweeters200Response](docs/GetRetweeters200Response.md) - - [GetSearchTimeline200Response](docs/GetSearchTimeline200Response.md) - - [GetTweetDetail200Response](docs/GetTweetDetail200Response.md) - - [GetTweetResultByRestId200Response](docs/GetTweetResultByRestId200Response.md) - - [GetUserByRestId200Response](docs/GetUserByRestId200Response.md) - - [GetUserHighlightsTweets200Response](docs/GetUserHighlightsTweets200Response.md) - - [GetUsersByRestIds200Response](docs/GetUsersByRestIds200Response.md) - [Highlight](docs/Highlight.md) - [HomeTimelineHome](docs/HomeTimelineHome.md) - [HomeTimelineResponseData](docs/HomeTimelineResponseData.md) @@ -394,14 +386,11 @@ Class | Method | HTTP request | Description - [NoteTweetResultRichText](docs/NoteTweetResultRichText.md) - [NoteTweetResultRichTextTag](docs/NoteTweetResultRichTextTag.md) - [OneFactorLoginEligibility](docs/OneFactorLoginEligibility.md) - - [OtherResponse](docs/OtherResponse.md) - - [PostCreateBookmark200Response](docs/PostCreateBookmark200Response.md) + - [OtherObjectAll](docs/OtherObjectAll.md) - [PostCreateBookmarkRequest](docs/PostCreateBookmarkRequest.md) - [PostCreateBookmarkRequestVariables](docs/PostCreateBookmarkRequestVariables.md) - - [PostCreateRetweet200Response](docs/PostCreateRetweet200Response.md) - [PostCreateRetweetRequest](docs/PostCreateRetweetRequest.md) - [PostCreateRetweetRequestVariables](docs/PostCreateRetweetRequestVariables.md) - - [PostCreateTweet200Response](docs/PostCreateTweet200Response.md) - [PostCreateTweetRequest](docs/PostCreateTweetRequest.md) - [PostCreateTweetRequestFeatures](docs/PostCreateTweetRequestFeatures.md) - [PostCreateTweetRequestVariables](docs/PostCreateTweetRequestVariables.md) @@ -409,16 +398,11 @@ Class | Method | HTTP request | Description - [PostCreateTweetRequestVariablesMedia](docs/PostCreateTweetRequestVariablesMedia.md) - [PostCreateTweetRequestVariablesMediaMediaEntitiesInner](docs/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.md) - [PostCreateTweetRequestVariablesReply](docs/PostCreateTweetRequestVariablesReply.md) - - [PostDeleteBookmark200Response](docs/PostDeleteBookmark200Response.md) - [PostDeleteBookmarkRequest](docs/PostDeleteBookmarkRequest.md) - - [PostDeleteRetweet200Response](docs/PostDeleteRetweet200Response.md) - [PostDeleteRetweetRequest](docs/PostDeleteRetweetRequest.md) - [PostDeleteRetweetRequestVariables](docs/PostDeleteRetweetRequestVariables.md) - - [PostDeleteTweet200Response](docs/PostDeleteTweet200Response.md) - [PostDeleteTweetRequest](docs/PostDeleteTweetRequest.md) - - [PostFavoriteTweet200Response](docs/PostFavoriteTweet200Response.md) - [PostFavoriteTweetRequest](docs/PostFavoriteTweetRequest.md) - - [PostUnfavoriteTweet200Response](docs/PostUnfavoriteTweet200Response.md) - [PostUnfavoriteTweetRequest](docs/PostUnfavoriteTweetRequest.md) - [PrimaryCommunityTopic](docs/PrimaryCommunityTopic.md) - [ProfileResponse](docs/ProfileResponse.md) @@ -509,7 +493,7 @@ Class | Method | HTTP request | Description - [TweetWithVisibilityResults](docs/TweetWithVisibilityResults.md) - [TypeName](docs/TypeName.md) - [UnfavoriteTweet](docs/UnfavoriteTweet.md) - - [UnfavoriteTweetResponseData](docs/UnfavoriteTweetResponseData.md) + - [UnfavoriteTweetResponse](docs/UnfavoriteTweetResponse.md) - [UnifiedCard](docs/UnifiedCard.md) - [Url](docs/Url.md) - [UrtEndpointOptions](docs/UrtEndpointOptions.md) @@ -652,6 +636,13 @@ Authentication schemes defined for the API: - **API key parameter name**: x-guest-token - **Location**: HTTP header + +### Priority + +- **Type**: API key +- **API key parameter name**: Priority +- **Location**: HTTP header + ### Referer diff --git a/twitter_openapi_python_generated/docs/BirdwatchPivot.md b/twitter_openapi_python_generated/docs/BirdwatchPivot.md index a4704429..c972c53f 100644 --- a/twitter_openapi_python_generated/docs/BirdwatchPivot.md +++ b/twitter_openapi_python_generated/docs/BirdwatchPivot.md @@ -7,11 +7,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **call_to_action** | [**BirdwatchPivotCallToAction**](BirdwatchPivotCallToAction.md) | | [optional] **destination_url** | **str** | | -**footer** | [**BirdwatchPivotFooter**](BirdwatchPivotFooter.md) | | +**footer** | [**BirdwatchPivotFooter**](BirdwatchPivotFooter.md) | | [optional] **icon_type** | **str** | | -**note** | [**BirdwatchPivotNote**](BirdwatchPivotNote.md) | | -**shorttitle** | **str** | | -**subtitle** | [**BirdwatchPivotSubtitle**](BirdwatchPivotSubtitle.md) | | +**note** | [**BirdwatchPivotNote**](BirdwatchPivotNote.md) | | [optional] +**shorttitle** | **str** | | [optional] +**subtitle** | [**BirdwatchPivotSubtitle**](BirdwatchPivotSubtitle.md) | | [optional] **title** | **str** | | **visual_style** | **str** | | [optional] diff --git a/twitter_openapi_python_generated/docs/BookmarksResponse.md b/twitter_openapi_python_generated/docs/BookmarksResponse.md index 9d6788fc..36ec727b 100644 --- a/twitter_openapi_python_generated/docs/BookmarksResponse.md +++ b/twitter_openapi_python_generated/docs/BookmarksResponse.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**BookmarksResponseData**](BookmarksResponseData.md) | | +**data** | [**BookmarksResponseData**](BookmarksResponseData.md) | | [optional] +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/CommunityActions.md b/twitter_openapi_python_generated/docs/CommunityActions.md index bd36354f..8841b64e 100644 --- a/twitter_openapi_python_generated/docs/CommunityActions.md +++ b/twitter_openapi_python_generated/docs/CommunityActions.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **delete_action_result** | [**CommunityDeleteActionResult**](CommunityDeleteActionResult.md) | | [optional] -**join_action_result** | [**CommunityJoinActionResult**](CommunityJoinActionResult.md) | | [optional] +**join_action_result** | [**CommunityJoinActionResultUnion**](CommunityJoinActionResultUnion.md) | | [optional] **leave_action_result** | [**CommunityLeaveActionResult**](CommunityLeaveActionResult.md) | | [optional] **pin_action_result** | [**CommunityPinActionResult**](CommunityPinActionResult.md) | | [optional] **unpin_action_result** | [**CommunityUnpinActionResult**](CommunityUnpinActionResult.md) | | [optional] diff --git a/twitter_openapi_python_generated/docs/CommunityJoinActionResult.md b/twitter_openapi_python_generated/docs/CommunityJoinAction.md similarity index 51% rename from twitter_openapi_python_generated/docs/CommunityJoinActionResult.md rename to twitter_openapi_python_generated/docs/CommunityJoinAction.md index b522c947..e8796b71 100644 --- a/twitter_openapi_python_generated/docs/CommunityJoinActionResult.md +++ b/twitter_openapi_python_generated/docs/CommunityJoinAction.md @@ -1,4 +1,4 @@ -# CommunityJoinActionResult +# CommunityJoinAction ## Properties @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from twitter_openapi_python_generated.models.community_join_action_result import CommunityJoinActionResult +from twitter_openapi_python_generated.models.community_join_action import CommunityJoinAction # TODO update the JSON string below json = "{}" -# create an instance of CommunityJoinActionResult from a JSON string -community_join_action_result_instance = CommunityJoinActionResult.from_json(json) +# create an instance of CommunityJoinAction from a JSON string +community_join_action_instance = CommunityJoinAction.from_json(json) # print the JSON string representation of the object -print(CommunityJoinActionResult.to_json()) +print(CommunityJoinAction.to_json()) # convert the object into a dict -community_join_action_result_dict = community_join_action_result_instance.to_dict() -# create an instance of CommunityJoinActionResult from a dict -community_join_action_result_from_dict = CommunityJoinActionResult.from_dict(community_join_action_result_dict) +community_join_action_dict = community_join_action_instance.to_dict() +# create an instance of CommunityJoinAction from a dict +community_join_action_from_dict = CommunityJoinAction.from_dict(community_join_action_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twitter_openapi_python_generated/docs/CommunityJoinActionResultUnion.md b/twitter_openapi_python_generated/docs/CommunityJoinActionResultUnion.md new file mode 100644 index 00000000..942706a0 --- /dev/null +++ b/twitter_openapi_python_generated/docs/CommunityJoinActionResultUnion.md @@ -0,0 +1,31 @@ +# CommunityJoinActionResultUnion + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**typename** | [**TypeName**](TypeName.md) | | +**message** | **str** | | +**reason** | **str** | | + +## Example + +```python +from twitter_openapi_python_generated.models.community_join_action_result_union import CommunityJoinActionResultUnion + +# TODO update the JSON string below +json = "{}" +# create an instance of CommunityJoinActionResultUnion from a JSON string +community_join_action_result_union_instance = CommunityJoinActionResultUnion.from_json(json) +# print the JSON string representation of the object +print(CommunityJoinActionResultUnion.to_json()) + +# convert the object into a dict +community_join_action_result_union_dict = community_join_action_result_union_instance.to_dict() +# create an instance of CommunityJoinActionResultUnion from a dict +community_join_action_result_union_from_dict = CommunityJoinActionResultUnion.from_dict(community_join_action_result_union_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/twitter_openapi_python_generated/docs/CommunityJoinActionUnavailable.md b/twitter_openapi_python_generated/docs/CommunityJoinActionUnavailable.md new file mode 100644 index 00000000..42d56b4e --- /dev/null +++ b/twitter_openapi_python_generated/docs/CommunityJoinActionUnavailable.md @@ -0,0 +1,31 @@ +# CommunityJoinActionUnavailable + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**typename** | [**TypeName**](TypeName.md) | | +**message** | **str** | | +**reason** | **str** | | + +## Example + +```python +from twitter_openapi_python_generated.models.community_join_action_unavailable import CommunityJoinActionUnavailable + +# TODO update the JSON string below +json = "{}" +# create an instance of CommunityJoinActionUnavailable from a JSON string +community_join_action_unavailable_instance = CommunityJoinActionUnavailable.from_json(json) +# print the JSON string representation of the object +print(CommunityJoinActionUnavailable.to_json()) + +# convert the object into a dict +community_join_action_unavailable_dict = community_join_action_unavailable_instance.to_dict() +# create an instance of CommunityJoinActionUnavailable from a dict +community_join_action_unavailable_from_dict = CommunityJoinActionUnavailable.from_dict(community_join_action_unavailable_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/twitter_openapi_python_generated/docs/CreateBookmarkResponse.md b/twitter_openapi_python_generated/docs/CreateBookmarkResponse.md index 1ef50283..55aeeed7 100644 --- a/twitter_openapi_python_generated/docs/CreateBookmarkResponse.md +++ b/twitter_openapi_python_generated/docs/CreateBookmarkResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**CreateBookmarkResponseData**](CreateBookmarkResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/CreateBookmarkResponseData.md b/twitter_openapi_python_generated/docs/CreateBookmarkResponseData.md index 806e5531..d6db73db 100644 --- a/twitter_openapi_python_generated/docs/CreateBookmarkResponseData.md +++ b/twitter_openapi_python_generated/docs/CreateBookmarkResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tweet_bookmark_put** | **str** | | +**tweet_bookmark_put** | **str** | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/CreateRetweetResponse.md b/twitter_openapi_python_generated/docs/CreateRetweetResponse.md index ec81ab67..7c37ec62 100644 --- a/twitter_openapi_python_generated/docs/CreateRetweetResponse.md +++ b/twitter_openapi_python_generated/docs/CreateRetweetResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**CreateRetweetResponseData**](CreateRetweetResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/CreateRetweetResponseData.md b/twitter_openapi_python_generated/docs/CreateRetweetResponseData.md index c787befb..d7e50e7f 100644 --- a/twitter_openapi_python_generated/docs/CreateRetweetResponseData.md +++ b/twitter_openapi_python_generated/docs/CreateRetweetResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**create_retweet** | [**CreateRetweetResponseResult**](CreateRetweetResponseResult.md) | | +**create_retweet** | [**CreateRetweetResponseResult**](CreateRetweetResponseResult.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/CreateTweetResponse.md b/twitter_openapi_python_generated/docs/CreateTweetResponse.md index f6f6d570..286c0a68 100644 --- a/twitter_openapi_python_generated/docs/CreateTweetResponse.md +++ b/twitter_openapi_python_generated/docs/CreateTweetResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**CreateTweetResponseData**](CreateTweetResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/CreateTweetResponseData.md b/twitter_openapi_python_generated/docs/CreateTweetResponseData.md index c2c36ab1..fd911cd5 100644 --- a/twitter_openapi_python_generated/docs/CreateTweetResponseData.md +++ b/twitter_openapi_python_generated/docs/CreateTweetResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**create_tweet** | [**CreateTweetResponseResult**](CreateTweetResponseResult.md) | | +**create_tweet** | [**CreateTweetResponseResult**](CreateTweetResponseResult.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/DefaultApi.md b/twitter_openapi_python_generated/docs/DefaultApi.md index 61c964d4..13b94df5 100644 --- a/twitter_openapi_python_generated/docs/DefaultApi.md +++ b/twitter_openapi_python_generated/docs/DefaultApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **get_profile_spotlights_query** -> GetProfileSpotlightsQuery200Response get_profile_spotlights_query(path_query_id, variables, features) +> ProfileResponse get_profile_spotlights_query(path_query_id, variables, features) @@ -19,6 +19,7 @@ get user by screen name * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -42,7 +43,7 @@ get user by screen name ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_profile_spotlights_query200_response import GetProfileSpotlightsQuery200Response +from twitter_openapi_python_generated.models.profile_response import ProfileResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -69,6 +70,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -217,11 +224,11 @@ Name | Type | Description | Notes ### Return type -[**GetProfileSpotlightsQuery200Response**](GetProfileSpotlightsQuery200Response.md) +[**ProfileResponse**](ProfileResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -237,7 +244,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_tweet_result_by_rest_id** -> GetTweetResultByRestId200Response get_tweet_result_by_rest_id(path_query_id, variables, features, field_toggles) +> TweetResultByRestIdResponse get_tweet_result_by_rest_id(path_query_id, variables, features, field_toggles) @@ -247,6 +254,7 @@ get TweetResultByRestId * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -270,7 +278,7 @@ get TweetResultByRestId ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_tweet_result_by_rest_id200_response import GetTweetResultByRestId200Response +from twitter_openapi_python_generated.models.tweet_result_by_rest_id_response import TweetResultByRestIdResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -297,6 +305,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -447,11 +461,11 @@ Name | Type | Description | Notes ### Return type -[**GetTweetResultByRestId200Response**](GetTweetResultByRestId200Response.md) +[**TweetResultByRestIdResponse**](TweetResultByRestIdResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/DeleteBookmarkResponse.md b/twitter_openapi_python_generated/docs/DeleteBookmarkResponse.md index 79e03aa2..c33db359 100644 --- a/twitter_openapi_python_generated/docs/DeleteBookmarkResponse.md +++ b/twitter_openapi_python_generated/docs/DeleteBookmarkResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**DeleteBookmarkResponseData**](DeleteBookmarkResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/DeleteBookmarkResponseData.md b/twitter_openapi_python_generated/docs/DeleteBookmarkResponseData.md index 8cda0653..6b0e60e7 100644 --- a/twitter_openapi_python_generated/docs/DeleteBookmarkResponseData.md +++ b/twitter_openapi_python_generated/docs/DeleteBookmarkResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tweet_bookmark_delete** | **str** | | +**tweet_bookmark_delete** | **str** | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/DeleteRetweetResponse.md b/twitter_openapi_python_generated/docs/DeleteRetweetResponse.md index 94c29cb4..e91150da 100644 --- a/twitter_openapi_python_generated/docs/DeleteRetweetResponse.md +++ b/twitter_openapi_python_generated/docs/DeleteRetweetResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**DeleteRetweetResponseData**](DeleteRetweetResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/DeleteRetweetResponseData.md b/twitter_openapi_python_generated/docs/DeleteRetweetResponseData.md index d65d02ef..94364e43 100644 --- a/twitter_openapi_python_generated/docs/DeleteRetweetResponseData.md +++ b/twitter_openapi_python_generated/docs/DeleteRetweetResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**create_retweet** | [**CreateRetweetResponseResult**](CreateRetweetResponseResult.md) | | [optional] +**create_retweet** | [**DeleteRetweetResponseResult**](DeleteRetweetResponseResult.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/DeleteTweetResponse.md b/twitter_openapi_python_generated/docs/DeleteTweetResponse.md index f0c23085..974e9514 100644 --- a/twitter_openapi_python_generated/docs/DeleteTweetResponse.md +++ b/twitter_openapi_python_generated/docs/DeleteTweetResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**DeleteTweetResponseData**](DeleteTweetResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/Error.md b/twitter_openapi_python_generated/docs/ErrorResponse.md similarity index 63% rename from twitter_openapi_python_generated/docs/Error.md rename to twitter_openapi_python_generated/docs/ErrorResponse.md index 9564c4b7..2c525e35 100644 --- a/twitter_openapi_python_generated/docs/Error.md +++ b/twitter_openapi_python_generated/docs/ErrorResponse.md @@ -1,4 +1,4 @@ -# Error +# ErrorResponse ## Properties @@ -11,7 +11,7 @@ Name | Type | Description | Notes **locations** | [**List[Location]**](Location.md) | | **message** | **str** | | **name** | **str** | | -**path** | **List[str]** | | +**path** | **List[object]** | | **retry_after** | **int** | | [optional] **source** | **str** | | **tracing** | [**Tracing**](Tracing.md) | | @@ -19,19 +19,19 @@ Name | Type | Description | Notes ## Example ```python -from twitter_openapi_python_generated.models.error import Error +from twitter_openapi_python_generated.models.error_response import ErrorResponse # TODO update the JSON string below json = "{}" -# create an instance of Error from a JSON string -error_instance = Error.from_json(json) +# create an instance of ErrorResponse from a JSON string +error_response_instance = ErrorResponse.from_json(json) # print the JSON string representation of the object -print(Error.to_json()) +print(ErrorResponse.to_json()) # convert the object into a dict -error_dict = error_instance.to_dict() -# create an instance of Error from a dict -error_from_dict = Error.from_dict(error_dict) +error_response_dict = error_response_instance.to_dict() +# create an instance of ErrorResponse from a dict +error_response_from_dict = ErrorResponse.from_dict(error_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twitter_openapi_python_generated/docs/Errors.md b/twitter_openapi_python_generated/docs/Errors.md deleted file mode 100644 index 6a624286..00000000 --- a/twitter_openapi_python_generated/docs/Errors.md +++ /dev/null @@ -1,30 +0,0 @@ -# Errors - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | [optional] -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.errors import Errors - -# TODO update the JSON string below -json = "{}" -# create an instance of Errors from a JSON string -errors_instance = Errors.from_json(json) -# print the JSON string representation of the object -print(Errors.to_json()) - -# convert the object into a dict -errors_dict = errors_instance.to_dict() -# create an instance of Errors from a dict -errors_from_dict = Errors.from_dict(errors_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/ErrorsData.md b/twitter_openapi_python_generated/docs/ErrorsData.md deleted file mode 100644 index d18781ca..00000000 --- a/twitter_openapi_python_generated/docs/ErrorsData.md +++ /dev/null @@ -1,29 +0,0 @@ -# ErrorsData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | **str** | | [optional] - -## Example - -```python -from twitter_openapi_python_generated.models.errors_data import ErrorsData - -# TODO update the JSON string below -json = "{}" -# create an instance of ErrorsData from a JSON string -errors_data_instance = ErrorsData.from_json(json) -# print the JSON string representation of the object -print(ErrorsData.to_json()) - -# convert the object into a dict -errors_data_dict = errors_data_instance.to_dict() -# create an instance of ErrorsData from a dict -errors_data_from_dict = ErrorsData.from_dict(errors_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/FavoriteTweet.md b/twitter_openapi_python_generated/docs/FavoriteTweet.md index 22d46b9e..e028703f 100644 --- a/twitter_openapi_python_generated/docs/FavoriteTweet.md +++ b/twitter_openapi_python_generated/docs/FavoriteTweet.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**favorite_tweet** | **str** | | +**favorite_tweet** | **str** | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/FavoriteTweetResponseData.md b/twitter_openapi_python_generated/docs/FavoriteTweetResponse.md similarity index 50% rename from twitter_openapi_python_generated/docs/FavoriteTweetResponseData.md rename to twitter_openapi_python_generated/docs/FavoriteTweetResponse.md index e298d509..47b100d7 100644 --- a/twitter_openapi_python_generated/docs/FavoriteTweetResponseData.md +++ b/twitter_openapi_python_generated/docs/FavoriteTweetResponse.md @@ -1,4 +1,4 @@ -# FavoriteTweetResponseData +# FavoriteTweetResponse ## Properties @@ -6,23 +6,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**FavoriteTweet**](FavoriteTweet.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example ```python -from twitter_openapi_python_generated.models.favorite_tweet_response_data import FavoriteTweetResponseData +from twitter_openapi_python_generated.models.favorite_tweet_response import FavoriteTweetResponse # TODO update the JSON string below json = "{}" -# create an instance of FavoriteTweetResponseData from a JSON string -favorite_tweet_response_data_instance = FavoriteTweetResponseData.from_json(json) +# create an instance of FavoriteTweetResponse from a JSON string +favorite_tweet_response_instance = FavoriteTweetResponse.from_json(json) # print the JSON string representation of the object -print(FavoriteTweetResponseData.to_json()) +print(FavoriteTweetResponse.to_json()) # convert the object into a dict -favorite_tweet_response_data_dict = favorite_tweet_response_data_instance.to_dict() -# create an instance of FavoriteTweetResponseData from a dict -favorite_tweet_response_data_from_dict = FavoriteTweetResponseData.from_dict(favorite_tweet_response_data_dict) +favorite_tweet_response_dict = favorite_tweet_response_instance.to_dict() +# create an instance of FavoriteTweetResponse from a dict +favorite_tweet_response_from_dict = FavoriteTweetResponse.from_dict(favorite_tweet_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twitter_openapi_python_generated/docs/FollowResponse.md b/twitter_openapi_python_generated/docs/FollowResponse.md index 854668bf..5803028f 100644 --- a/twitter_openapi_python_generated/docs/FollowResponse.md +++ b/twitter_openapi_python_generated/docs/FollowResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**FollowResponseData**](FollowResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/FollowResponseData.md b/twitter_openapi_python_generated/docs/FollowResponseData.md index 428f23c3..624aac04 100644 --- a/twitter_openapi_python_generated/docs/FollowResponseData.md +++ b/twitter_openapi_python_generated/docs/FollowResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | [**FollowResponseUser**](FollowResponseUser.md) | | +**user** | [**FollowResponseUser**](FollowResponseUser.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/GetBookmarks200Response.md b/twitter_openapi_python_generated/docs/GetBookmarks200Response.md deleted file mode 100644 index 9627bb6e..00000000 --- a/twitter_openapi_python_generated/docs/GetBookmarks200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetBookmarks200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_bookmarks200_response import GetBookmarks200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetBookmarks200Response from a JSON string -get_bookmarks200_response_instance = GetBookmarks200Response.from_json(json) -# print the JSON string representation of the object -print(GetBookmarks200Response.to_json()) - -# convert the object into a dict -get_bookmarks200_response_dict = get_bookmarks200_response_instance.to_dict() -# create an instance of GetBookmarks200Response from a dict -get_bookmarks200_response_from_dict = GetBookmarks200Response.from_dict(get_bookmarks200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetFavoriters200Response.md b/twitter_openapi_python_generated/docs/GetFavoriters200Response.md deleted file mode 100644 index fd5fe43f..00000000 --- a/twitter_openapi_python_generated/docs/GetFavoriters200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetFavoriters200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_favoriters200_response import GetFavoriters200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetFavoriters200Response from a JSON string -get_favoriters200_response_instance = GetFavoriters200Response.from_json(json) -# print the JSON string representation of the object -print(GetFavoriters200Response.to_json()) - -# convert the object into a dict -get_favoriters200_response_dict = get_favoriters200_response_instance.to_dict() -# create an instance of GetFavoriters200Response from a dict -get_favoriters200_response_from_dict = GetFavoriters200Response.from_dict(get_favoriters200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetFollowers200Response.md b/twitter_openapi_python_generated/docs/GetFollowers200Response.md deleted file mode 100644 index 11c9bf71..00000000 --- a/twitter_openapi_python_generated/docs/GetFollowers200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetFollowers200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetFollowers200Response from a JSON string -get_followers200_response_instance = GetFollowers200Response.from_json(json) -# print the JSON string representation of the object -print(GetFollowers200Response.to_json()) - -# convert the object into a dict -get_followers200_response_dict = get_followers200_response_instance.to_dict() -# create an instance of GetFollowers200Response from a dict -get_followers200_response_from_dict = GetFollowers200Response.from_dict(get_followers200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetHomeLatestTimeline200Response.md b/twitter_openapi_python_generated/docs/GetHomeLatestTimeline200Response.md deleted file mode 100644 index f22384d6..00000000 --- a/twitter_openapi_python_generated/docs/GetHomeLatestTimeline200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetHomeLatestTimeline200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_home_latest_timeline200_response import GetHomeLatestTimeline200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetHomeLatestTimeline200Response from a JSON string -get_home_latest_timeline200_response_instance = GetHomeLatestTimeline200Response.from_json(json) -# print the JSON string representation of the object -print(GetHomeLatestTimeline200Response.to_json()) - -# convert the object into a dict -get_home_latest_timeline200_response_dict = get_home_latest_timeline200_response_instance.to_dict() -# create an instance of GetHomeLatestTimeline200Response from a dict -get_home_latest_timeline200_response_from_dict = GetHomeLatestTimeline200Response.from_dict(get_home_latest_timeline200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetLikes200Response.md b/twitter_openapi_python_generated/docs/GetLikes200Response.md deleted file mode 100644 index b36a6f1f..00000000 --- a/twitter_openapi_python_generated/docs/GetLikes200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetLikes200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetLikes200Response from a JSON string -get_likes200_response_instance = GetLikes200Response.from_json(json) -# print the JSON string representation of the object -print(GetLikes200Response.to_json()) - -# convert the object into a dict -get_likes200_response_dict = get_likes200_response_instance.to_dict() -# create an instance of GetLikes200Response from a dict -get_likes200_response_from_dict = GetLikes200Response.from_dict(get_likes200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetListLatestTweetsTimeline200Response.md b/twitter_openapi_python_generated/docs/GetListLatestTweetsTimeline200Response.md deleted file mode 100644 index 224aef1c..00000000 --- a/twitter_openapi_python_generated/docs/GetListLatestTweetsTimeline200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetListLatestTweetsTimeline200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_list_latest_tweets_timeline200_response import GetListLatestTweetsTimeline200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetListLatestTweetsTimeline200Response from a JSON string -get_list_latest_tweets_timeline200_response_instance = GetListLatestTweetsTimeline200Response.from_json(json) -# print the JSON string representation of the object -print(GetListLatestTweetsTimeline200Response.to_json()) - -# convert the object into a dict -get_list_latest_tweets_timeline200_response_dict = get_list_latest_tweets_timeline200_response_instance.to_dict() -# create an instance of GetListLatestTweetsTimeline200Response from a dict -get_list_latest_tweets_timeline200_response_from_dict = GetListLatestTweetsTimeline200Response.from_dict(get_list_latest_tweets_timeline200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetProfileSpotlightsQuery200Response.md b/twitter_openapi_python_generated/docs/GetProfileSpotlightsQuery200Response.md deleted file mode 100644 index 415b09d0..00000000 --- a/twitter_openapi_python_generated/docs/GetProfileSpotlightsQuery200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetProfileSpotlightsQuery200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_profile_spotlights_query200_response import GetProfileSpotlightsQuery200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetProfileSpotlightsQuery200Response from a JSON string -get_profile_spotlights_query200_response_instance = GetProfileSpotlightsQuery200Response.from_json(json) -# print the JSON string representation of the object -print(GetProfileSpotlightsQuery200Response.to_json()) - -# convert the object into a dict -get_profile_spotlights_query200_response_dict = get_profile_spotlights_query200_response_instance.to_dict() -# create an instance of GetProfileSpotlightsQuery200Response from a dict -get_profile_spotlights_query200_response_from_dict = GetProfileSpotlightsQuery200Response.from_dict(get_profile_spotlights_query200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetRetweeters200Response.md b/twitter_openapi_python_generated/docs/GetRetweeters200Response.md deleted file mode 100644 index ceb0e2c3..00000000 --- a/twitter_openapi_python_generated/docs/GetRetweeters200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetRetweeters200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_retweeters200_response import GetRetweeters200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetRetweeters200Response from a JSON string -get_retweeters200_response_instance = GetRetweeters200Response.from_json(json) -# print the JSON string representation of the object -print(GetRetweeters200Response.to_json()) - -# convert the object into a dict -get_retweeters200_response_dict = get_retweeters200_response_instance.to_dict() -# create an instance of GetRetweeters200Response from a dict -get_retweeters200_response_from_dict = GetRetweeters200Response.from_dict(get_retweeters200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetSearchTimeline200Response.md b/twitter_openapi_python_generated/docs/GetSearchTimeline200Response.md deleted file mode 100644 index 9de09e4f..00000000 --- a/twitter_openapi_python_generated/docs/GetSearchTimeline200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetSearchTimeline200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_search_timeline200_response import GetSearchTimeline200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSearchTimeline200Response from a JSON string -get_search_timeline200_response_instance = GetSearchTimeline200Response.from_json(json) -# print the JSON string representation of the object -print(GetSearchTimeline200Response.to_json()) - -# convert the object into a dict -get_search_timeline200_response_dict = get_search_timeline200_response_instance.to_dict() -# create an instance of GetSearchTimeline200Response from a dict -get_search_timeline200_response_from_dict = GetSearchTimeline200Response.from_dict(get_search_timeline200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetTweetDetail200Response.md b/twitter_openapi_python_generated/docs/GetTweetDetail200Response.md deleted file mode 100644 index cca808e1..00000000 --- a/twitter_openapi_python_generated/docs/GetTweetDetail200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetTweetDetail200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_tweet_detail200_response import GetTweetDetail200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTweetDetail200Response from a JSON string -get_tweet_detail200_response_instance = GetTweetDetail200Response.from_json(json) -# print the JSON string representation of the object -print(GetTweetDetail200Response.to_json()) - -# convert the object into a dict -get_tweet_detail200_response_dict = get_tweet_detail200_response_instance.to_dict() -# create an instance of GetTweetDetail200Response from a dict -get_tweet_detail200_response_from_dict = GetTweetDetail200Response.from_dict(get_tweet_detail200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetTweetResultByRestId200Response.md b/twitter_openapi_python_generated/docs/GetTweetResultByRestId200Response.md deleted file mode 100644 index 170fa8ac..00000000 --- a/twitter_openapi_python_generated/docs/GetTweetResultByRestId200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetTweetResultByRestId200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_tweet_result_by_rest_id200_response import GetTweetResultByRestId200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTweetResultByRestId200Response from a JSON string -get_tweet_result_by_rest_id200_response_instance = GetTweetResultByRestId200Response.from_json(json) -# print the JSON string representation of the object -print(GetTweetResultByRestId200Response.to_json()) - -# convert the object into a dict -get_tweet_result_by_rest_id200_response_dict = get_tweet_result_by_rest_id200_response_instance.to_dict() -# create an instance of GetTweetResultByRestId200Response from a dict -get_tweet_result_by_rest_id200_response_from_dict = GetTweetResultByRestId200Response.from_dict(get_tweet_result_by_rest_id200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetUserByRestId200Response.md b/twitter_openapi_python_generated/docs/GetUserByRestId200Response.md deleted file mode 100644 index a12d09cf..00000000 --- a/twitter_openapi_python_generated/docs/GetUserByRestId200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetUserByRestId200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_user_by_rest_id200_response import GetUserByRestId200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetUserByRestId200Response from a JSON string -get_user_by_rest_id200_response_instance = GetUserByRestId200Response.from_json(json) -# print the JSON string representation of the object -print(GetUserByRestId200Response.to_json()) - -# convert the object into a dict -get_user_by_rest_id200_response_dict = get_user_by_rest_id200_response_instance.to_dict() -# create an instance of GetUserByRestId200Response from a dict -get_user_by_rest_id200_response_from_dict = GetUserByRestId200Response.from_dict(get_user_by_rest_id200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetUserHighlightsTweets200Response.md b/twitter_openapi_python_generated/docs/GetUserHighlightsTweets200Response.md deleted file mode 100644 index cb1fb1a3..00000000 --- a/twitter_openapi_python_generated/docs/GetUserHighlightsTweets200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetUserHighlightsTweets200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_user_highlights_tweets200_response import GetUserHighlightsTweets200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetUserHighlightsTweets200Response from a JSON string -get_user_highlights_tweets200_response_instance = GetUserHighlightsTweets200Response.from_json(json) -# print the JSON string representation of the object -print(GetUserHighlightsTweets200Response.to_json()) - -# convert the object into a dict -get_user_highlights_tweets200_response_dict = get_user_highlights_tweets200_response_instance.to_dict() -# create an instance of GetUserHighlightsTweets200Response from a dict -get_user_highlights_tweets200_response_from_dict = GetUserHighlightsTweets200Response.from_dict(get_user_highlights_tweets200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/GetUsersByRestIds200Response.md b/twitter_openapi_python_generated/docs/GetUsersByRestIds200Response.md deleted file mode 100644 index 675ef2ec..00000000 --- a/twitter_openapi_python_generated/docs/GetUsersByRestIds200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# GetUsersByRestIds200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.get_users_by_rest_ids200_response import GetUsersByRestIds200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of GetUsersByRestIds200Response from a JSON string -get_users_by_rest_ids200_response_instance = GetUsersByRestIds200Response.from_json(json) -# print the JSON string representation of the object -print(GetUsersByRestIds200Response.to_json()) - -# convert the object into a dict -get_users_by_rest_ids200_response_dict = get_users_by_rest_ids200_response_instance.to_dict() -# create an instance of GetUsersByRestIds200Response from a dict -get_users_by_rest_ids200_response_from_dict = GetUsersByRestIds200Response.from_dict(get_users_by_rest_ids200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/HomeTimelineResponseData.md b/twitter_openapi_python_generated/docs/HomeTimelineResponseData.md index dbfdd766..f02c962f 100644 --- a/twitter_openapi_python_generated/docs/HomeTimelineResponseData.md +++ b/twitter_openapi_python_generated/docs/HomeTimelineResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**home** | [**HomeTimelineHome**](HomeTimelineHome.md) | | +**home** | [**HomeTimelineHome**](HomeTimelineHome.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/ListLatestTweetsTimelineResponse.md b/twitter_openapi_python_generated/docs/ListLatestTweetsTimelineResponse.md index ee521ae0..43015129 100644 --- a/twitter_openapi_python_generated/docs/ListLatestTweetsTimelineResponse.md +++ b/twitter_openapi_python_generated/docs/ListLatestTweetsTimelineResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**ListTweetsTimelineData**](ListTweetsTimelineData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/ListTweetsTimelineData.md b/twitter_openapi_python_generated/docs/ListTweetsTimelineData.md index 2a044167..65730ea6 100644 --- a/twitter_openapi_python_generated/docs/ListTweetsTimelineData.md +++ b/twitter_openapi_python_generated/docs/ListTweetsTimelineData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**list** | [**ListTweetsTimelineList**](ListTweetsTimelineList.md) | | +**list** | [**ListTweetsTimelineList**](ListTweetsTimelineList.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/OtherApi.md b/twitter_openapi_python_generated/docs/OtherApi.md index 1ccb7f3c..59455b30 100644 --- a/twitter_openapi_python_generated/docs/OtherApi.md +++ b/twitter_openapi_python_generated/docs/OtherApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **other** -> OtherResponse other() +> OtherObjectAll other() @@ -18,6 +18,7 @@ This is not an actual endpoint * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -41,7 +42,7 @@ This is not an actual endpoint ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.other_response import OtherResponse +from twitter_openapi_python_generated.models.other_object_all import OtherObjectAll from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -68,6 +69,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -208,11 +215,11 @@ This endpoint does not need any parameter. ### Return type -[**OtherResponse**](OtherResponse.md) +[**OtherObjectAll**](OtherObjectAll.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/OtherResponse.md b/twitter_openapi_python_generated/docs/OtherObjectAll.md similarity index 53% rename from twitter_openapi_python_generated/docs/OtherResponse.md rename to twitter_openapi_python_generated/docs/OtherObjectAll.md index 45dc510d..542c827b 100644 --- a/twitter_openapi_python_generated/docs/OtherResponse.md +++ b/twitter_openapi_python_generated/docs/OtherObjectAll.md @@ -1,4 +1,4 @@ -# OtherResponse +# OtherObjectAll ## Properties @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from twitter_openapi_python_generated.models.other_response import OtherResponse +from twitter_openapi_python_generated.models.other_object_all import OtherObjectAll # TODO update the JSON string below json = "{}" -# create an instance of OtherResponse from a JSON string -other_response_instance = OtherResponse.from_json(json) +# create an instance of OtherObjectAll from a JSON string +other_object_all_instance = OtherObjectAll.from_json(json) # print the JSON string representation of the object -print(OtherResponse.to_json()) +print(OtherObjectAll.to_json()) # convert the object into a dict -other_response_dict = other_response_instance.to_dict() -# create an instance of OtherResponse from a dict -other_response_from_dict = OtherResponse.from_dict(other_response_dict) +other_object_all_dict = other_object_all_instance.to_dict() +# create an instance of OtherObjectAll from a dict +other_object_all_from_dict = OtherObjectAll.from_dict(other_object_all_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/twitter_openapi_python_generated/docs/PostApi.md b/twitter_openapi_python_generated/docs/PostApi.md index 5219e5fe..40d4a34d 100644 --- a/twitter_openapi_python_generated/docs/PostApi.md +++ b/twitter_openapi_python_generated/docs/PostApi.md @@ -15,7 +15,7 @@ Method | HTTP request | Description # **post_create_bookmark** -> PostCreateBookmark200Response post_create_bookmark(path_query_id, post_create_bookmark_request) +> CreateBookmarkResponse post_create_bookmark(path_query_id, post_create_bookmark_request) @@ -25,6 +25,7 @@ create Bookmark * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -48,7 +49,7 @@ create Bookmark ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response +from twitter_openapi_python_generated.models.create_bookmark_response import CreateBookmarkResponse from twitter_openapi_python_generated.models.post_create_bookmark_request import PostCreateBookmarkRequest from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -76,6 +77,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -222,11 +229,11 @@ Name | Type | Description | Notes ### Return type -[**PostCreateBookmark200Response**](PostCreateBookmark200Response.md) +[**CreateBookmarkResponse**](CreateBookmarkResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -242,7 +249,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **post_create_retweet** -> PostCreateRetweet200Response post_create_retweet(path_query_id, post_create_retweet_request) +> CreateRetweetResponse post_create_retweet(path_query_id, post_create_retweet_request) @@ -252,6 +259,7 @@ create Retweet * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -275,7 +283,7 @@ create Retweet ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_create_retweet200_response import PostCreateRetweet200Response +from twitter_openapi_python_generated.models.create_retweet_response import CreateRetweetResponse from twitter_openapi_python_generated.models.post_create_retweet_request import PostCreateRetweetRequest from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -303,6 +311,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -449,11 +463,11 @@ Name | Type | Description | Notes ### Return type -[**PostCreateRetweet200Response**](PostCreateRetweet200Response.md) +[**CreateRetweetResponse**](CreateRetweetResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -469,7 +483,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **post_create_tweet** -> PostCreateTweet200Response post_create_tweet(path_query_id, post_create_tweet_request) +> CreateTweetResponse post_create_tweet(path_query_id, post_create_tweet_request) @@ -479,6 +493,7 @@ create Tweet * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -502,7 +517,7 @@ create Tweet ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_create_tweet200_response import PostCreateTweet200Response +from twitter_openapi_python_generated.models.create_tweet_response import CreateTweetResponse from twitter_openapi_python_generated.models.post_create_tweet_request import PostCreateTweetRequest from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -530,6 +545,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -676,11 +697,11 @@ Name | Type | Description | Notes ### Return type -[**PostCreateTweet200Response**](PostCreateTweet200Response.md) +[**CreateTweetResponse**](CreateTweetResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -696,7 +717,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **post_delete_bookmark** -> PostDeleteBookmark200Response post_delete_bookmark(path_query_id, post_delete_bookmark_request) +> DeleteBookmarkResponse post_delete_bookmark(path_query_id, post_delete_bookmark_request) @@ -706,6 +727,7 @@ delete Bookmark * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -729,7 +751,7 @@ delete Bookmark ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_delete_bookmark200_response import PostDeleteBookmark200Response +from twitter_openapi_python_generated.models.delete_bookmark_response import DeleteBookmarkResponse from twitter_openapi_python_generated.models.post_delete_bookmark_request import PostDeleteBookmarkRequest from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -757,6 +779,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -903,11 +931,11 @@ Name | Type | Description | Notes ### Return type -[**PostDeleteBookmark200Response**](PostDeleteBookmark200Response.md) +[**DeleteBookmarkResponse**](DeleteBookmarkResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -923,7 +951,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **post_delete_retweet** -> PostDeleteRetweet200Response post_delete_retweet(path_query_id, post_delete_retweet_request) +> DeleteRetweetResponse post_delete_retweet(path_query_id, post_delete_retweet_request) @@ -933,6 +961,7 @@ delete Retweet * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -956,7 +985,7 @@ delete Retweet ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_delete_retweet200_response import PostDeleteRetweet200Response +from twitter_openapi_python_generated.models.delete_retweet_response import DeleteRetweetResponse from twitter_openapi_python_generated.models.post_delete_retweet_request import PostDeleteRetweetRequest from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -984,6 +1013,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1130,11 +1165,11 @@ Name | Type | Description | Notes ### Return type -[**PostDeleteRetweet200Response**](PostDeleteRetweet200Response.md) +[**DeleteRetweetResponse**](DeleteRetweetResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -1150,7 +1185,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **post_delete_tweet** -> PostDeleteTweet200Response post_delete_tweet(path_query_id, post_delete_tweet_request) +> DeleteTweetResponse post_delete_tweet(path_query_id, post_delete_tweet_request) @@ -1160,6 +1195,7 @@ delete Retweet * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -1183,7 +1219,7 @@ delete Retweet ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_delete_tweet200_response import PostDeleteTweet200Response +from twitter_openapi_python_generated.models.delete_tweet_response import DeleteTweetResponse from twitter_openapi_python_generated.models.post_delete_tweet_request import PostDeleteTweetRequest from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -1211,6 +1247,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1357,11 +1399,11 @@ Name | Type | Description | Notes ### Return type -[**PostDeleteTweet200Response**](PostDeleteTweet200Response.md) +[**DeleteTweetResponse**](DeleteTweetResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -1377,7 +1419,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **post_favorite_tweet** -> PostFavoriteTweet200Response post_favorite_tweet(path_query_id, post_favorite_tweet_request) +> FavoriteTweetResponse post_favorite_tweet(path_query_id, post_favorite_tweet_request) @@ -1387,6 +1429,7 @@ favorite Tweet * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -1410,7 +1453,7 @@ favorite Tweet ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_favorite_tweet200_response import PostFavoriteTweet200Response +from twitter_openapi_python_generated.models.favorite_tweet_response import FavoriteTweetResponse from twitter_openapi_python_generated.models.post_favorite_tweet_request import PostFavoriteTweetRequest from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -1438,6 +1481,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1584,11 +1633,11 @@ Name | Type | Description | Notes ### Return type -[**PostFavoriteTweet200Response**](PostFavoriteTweet200Response.md) +[**FavoriteTweetResponse**](FavoriteTweetResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -1604,7 +1653,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **post_unfavorite_tweet** -> PostUnfavoriteTweet200Response post_unfavorite_tweet(path_query_id, post_unfavorite_tweet_request) +> UnfavoriteTweetResponse post_unfavorite_tweet(path_query_id, post_unfavorite_tweet_request) @@ -1614,6 +1663,7 @@ unfavorite Tweet * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -1637,8 +1687,8 @@ unfavorite Tweet ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.post_unfavorite_tweet200_response import PostUnfavoriteTweet200Response from twitter_openapi_python_generated.models.post_unfavorite_tweet_request import PostUnfavoriteTweetRequest +from twitter_openapi_python_generated.models.unfavorite_tweet_response import UnfavoriteTweetResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -1665,6 +1715,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1811,11 +1867,11 @@ Name | Type | Description | Notes ### Return type -[**PostUnfavoriteTweet200Response**](PostUnfavoriteTweet200Response.md) +[**UnfavoriteTweetResponse**](UnfavoriteTweetResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/PostCreateBookmark200Response.md b/twitter_openapi_python_generated/docs/PostCreateBookmark200Response.md deleted file mode 100644 index 6cbf991e..00000000 --- a/twitter_openapi_python_generated/docs/PostCreateBookmark200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostCreateBookmark200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCreateBookmark200Response from a JSON string -post_create_bookmark200_response_instance = PostCreateBookmark200Response.from_json(json) -# print the JSON string representation of the object -print(PostCreateBookmark200Response.to_json()) - -# convert the object into a dict -post_create_bookmark200_response_dict = post_create_bookmark200_response_instance.to_dict() -# create an instance of PostCreateBookmark200Response from a dict -post_create_bookmark200_response_from_dict = PostCreateBookmark200Response.from_dict(post_create_bookmark200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/PostCreateRetweet200Response.md b/twitter_openapi_python_generated/docs/PostCreateRetweet200Response.md deleted file mode 100644 index 278ddc79..00000000 --- a/twitter_openapi_python_generated/docs/PostCreateRetweet200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostCreateRetweet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_create_retweet200_response import PostCreateRetweet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCreateRetweet200Response from a JSON string -post_create_retweet200_response_instance = PostCreateRetweet200Response.from_json(json) -# print the JSON string representation of the object -print(PostCreateRetweet200Response.to_json()) - -# convert the object into a dict -post_create_retweet200_response_dict = post_create_retweet200_response_instance.to_dict() -# create an instance of PostCreateRetweet200Response from a dict -post_create_retweet200_response_from_dict = PostCreateRetweet200Response.from_dict(post_create_retweet200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/PostCreateTweet200Response.md b/twitter_openapi_python_generated/docs/PostCreateTweet200Response.md deleted file mode 100644 index 9ae67ad6..00000000 --- a/twitter_openapi_python_generated/docs/PostCreateTweet200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostCreateTweet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_create_tweet200_response import PostCreateTweet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostCreateTweet200Response from a JSON string -post_create_tweet200_response_instance = PostCreateTweet200Response.from_json(json) -# print the JSON string representation of the object -print(PostCreateTweet200Response.to_json()) - -# convert the object into a dict -post_create_tweet200_response_dict = post_create_tweet200_response_instance.to_dict() -# create an instance of PostCreateTweet200Response from a dict -post_create_tweet200_response_from_dict = PostCreateTweet200Response.from_dict(post_create_tweet200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/PostDeleteBookmark200Response.md b/twitter_openapi_python_generated/docs/PostDeleteBookmark200Response.md deleted file mode 100644 index ea7c1e8a..00000000 --- a/twitter_openapi_python_generated/docs/PostDeleteBookmark200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostDeleteBookmark200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_delete_bookmark200_response import PostDeleteBookmark200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeleteBookmark200Response from a JSON string -post_delete_bookmark200_response_instance = PostDeleteBookmark200Response.from_json(json) -# print the JSON string representation of the object -print(PostDeleteBookmark200Response.to_json()) - -# convert the object into a dict -post_delete_bookmark200_response_dict = post_delete_bookmark200_response_instance.to_dict() -# create an instance of PostDeleteBookmark200Response from a dict -post_delete_bookmark200_response_from_dict = PostDeleteBookmark200Response.from_dict(post_delete_bookmark200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/PostDeleteRetweet200Response.md b/twitter_openapi_python_generated/docs/PostDeleteRetweet200Response.md deleted file mode 100644 index 14fcd884..00000000 --- a/twitter_openapi_python_generated/docs/PostDeleteRetweet200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostDeleteRetweet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_delete_retweet200_response import PostDeleteRetweet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeleteRetweet200Response from a JSON string -post_delete_retweet200_response_instance = PostDeleteRetweet200Response.from_json(json) -# print the JSON string representation of the object -print(PostDeleteRetweet200Response.to_json()) - -# convert the object into a dict -post_delete_retweet200_response_dict = post_delete_retweet200_response_instance.to_dict() -# create an instance of PostDeleteRetweet200Response from a dict -post_delete_retweet200_response_from_dict = PostDeleteRetweet200Response.from_dict(post_delete_retweet200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/PostDeleteTweet200Response.md b/twitter_openapi_python_generated/docs/PostDeleteTweet200Response.md deleted file mode 100644 index 7e75267f..00000000 --- a/twitter_openapi_python_generated/docs/PostDeleteTweet200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostDeleteTweet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_delete_tweet200_response import PostDeleteTweet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostDeleteTweet200Response from a JSON string -post_delete_tweet200_response_instance = PostDeleteTweet200Response.from_json(json) -# print the JSON string representation of the object -print(PostDeleteTweet200Response.to_json()) - -# convert the object into a dict -post_delete_tweet200_response_dict = post_delete_tweet200_response_instance.to_dict() -# create an instance of PostDeleteTweet200Response from a dict -post_delete_tweet200_response_from_dict = PostDeleteTweet200Response.from_dict(post_delete_tweet200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/PostFavoriteTweet200Response.md b/twitter_openapi_python_generated/docs/PostFavoriteTweet200Response.md deleted file mode 100644 index 47542b19..00000000 --- a/twitter_openapi_python_generated/docs/PostFavoriteTweet200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostFavoriteTweet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_favorite_tweet200_response import PostFavoriteTweet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostFavoriteTweet200Response from a JSON string -post_favorite_tweet200_response_instance = PostFavoriteTweet200Response.from_json(json) -# print the JSON string representation of the object -print(PostFavoriteTweet200Response.to_json()) - -# convert the object into a dict -post_favorite_tweet200_response_dict = post_favorite_tweet200_response_instance.to_dict() -# create an instance of PostFavoriteTweet200Response from a dict -post_favorite_tweet200_response_from_dict = PostFavoriteTweet200Response.from_dict(post_favorite_tweet200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/PostUnfavoriteTweet200Response.md b/twitter_openapi_python_generated/docs/PostUnfavoriteTweet200Response.md deleted file mode 100644 index 973b4c75..00000000 --- a/twitter_openapi_python_generated/docs/PostUnfavoriteTweet200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# PostUnfavoriteTweet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**ErrorsData**](ErrorsData.md) | | -**errors** | [**List[Error]**](Error.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.post_unfavorite_tweet200_response import PostUnfavoriteTweet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of PostUnfavoriteTweet200Response from a JSON string -post_unfavorite_tweet200_response_instance = PostUnfavoriteTweet200Response.from_json(json) -# print the JSON string representation of the object -print(PostUnfavoriteTweet200Response.to_json()) - -# convert the object into a dict -post_unfavorite_tweet200_response_dict = post_unfavorite_tweet200_response_instance.to_dict() -# create an instance of PostUnfavoriteTweet200Response from a dict -post_unfavorite_tweet200_response_from_dict = PostUnfavoriteTweet200Response.from_dict(post_unfavorite_tweet200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/ProfileResponse.md b/twitter_openapi_python_generated/docs/ProfileResponse.md index a1bcee08..1d5f34f6 100644 --- a/twitter_openapi_python_generated/docs/ProfileResponse.md +++ b/twitter_openapi_python_generated/docs/ProfileResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**ProfileResponseData**](ProfileResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/ProfileResponseData.md b/twitter_openapi_python_generated/docs/ProfileResponseData.md index 69e0a7b4..dabc8e95 100644 --- a/twitter_openapi_python_generated/docs/ProfileResponseData.md +++ b/twitter_openapi_python_generated/docs/ProfileResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_result_by_screen_name** | [**UserResultByScreenName**](UserResultByScreenName.md) | | +**user_result_by_screen_name** | [**UserResultByScreenName**](UserResultByScreenName.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/SearchTimelineData.md b/twitter_openapi_python_generated/docs/SearchTimelineData.md index 1bcbdb58..b234b718 100644 --- a/twitter_openapi_python_generated/docs/SearchTimelineData.md +++ b/twitter_openapi_python_generated/docs/SearchTimelineData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**search_by_raw_query** | [**SearchByRawQuery**](SearchByRawQuery.md) | | +**search_by_raw_query** | [**SearchByRawQuery**](SearchByRawQuery.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/SearchTimelineResponse.md b/twitter_openapi_python_generated/docs/SearchTimelineResponse.md index 3bf4b410..49c91a53 100644 --- a/twitter_openapi_python_generated/docs/SearchTimelineResponse.md +++ b/twitter_openapi_python_generated/docs/SearchTimelineResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**SearchTimelineData**](SearchTimelineData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/SensitiveMediaWarning.md b/twitter_openapi_python_generated/docs/SensitiveMediaWarning.md index 86019426..3d378011 100644 --- a/twitter_openapi_python_generated/docs/SensitiveMediaWarning.md +++ b/twitter_openapi_python_generated/docs/SensitiveMediaWarning.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**adult_content** | **bool** | | -**graphic_violence** | **bool** | | -**other** | **bool** | | +**adult_content** | **bool** | | [optional] +**graphic_violence** | **bool** | | [optional] +**other** | **bool** | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TimelineResponse.md b/twitter_openapi_python_generated/docs/TimelineResponse.md index 376a2a36..0899b0b1 100644 --- a/twitter_openapi_python_generated/docs/TimelineResponse.md +++ b/twitter_openapi_python_generated/docs/TimelineResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**HomeTimelineResponseData**](HomeTimelineResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetApi.md b/twitter_openapi_python_generated/docs/TweetApi.md index acee6b98..f11118d7 100644 --- a/twitter_openapi_python_generated/docs/TweetApi.md +++ b/twitter_openapi_python_generated/docs/TweetApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description # **get_bookmarks** -> GetBookmarks200Response get_bookmarks(path_query_id, variables, features) +> BookmarksResponse get_bookmarks(path_query_id, variables, features) @@ -28,6 +28,7 @@ get bookmarks * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -51,7 +52,7 @@ get bookmarks ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_bookmarks200_response import GetBookmarks200Response +from twitter_openapi_python_generated.models.bookmarks_response import BookmarksResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -78,6 +79,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -226,11 +233,11 @@ Name | Type | Description | Notes ### Return type -[**GetBookmarks200Response**](GetBookmarks200Response.md) +[**BookmarksResponse**](BookmarksResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -246,7 +253,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_home_latest_timeline** -> GetHomeLatestTimeline200Response get_home_latest_timeline(path_query_id, variables, features) +> TimelineResponse get_home_latest_timeline(path_query_id, variables, features) @@ -256,6 +263,7 @@ get tweet list of timeline * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -279,7 +287,7 @@ get tweet list of timeline ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_home_latest_timeline200_response import GetHomeLatestTimeline200Response +from twitter_openapi_python_generated.models.timeline_response import TimelineResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -306,6 +314,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -454,11 +468,11 @@ Name | Type | Description | Notes ### Return type -[**GetHomeLatestTimeline200Response**](GetHomeLatestTimeline200Response.md) +[**TimelineResponse**](TimelineResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -474,7 +488,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_home_timeline** -> GetHomeLatestTimeline200Response get_home_timeline(path_query_id, variables, features) +> TimelineResponse get_home_timeline(path_query_id, variables, features) @@ -484,6 +498,7 @@ get tweet list of timeline * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -507,7 +522,7 @@ get tweet list of timeline ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_home_latest_timeline200_response import GetHomeLatestTimeline200Response +from twitter_openapi_python_generated.models.timeline_response import TimelineResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -534,6 +549,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -682,11 +703,11 @@ Name | Type | Description | Notes ### Return type -[**GetHomeLatestTimeline200Response**](GetHomeLatestTimeline200Response.md) +[**TimelineResponse**](TimelineResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -702,7 +723,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_likes** -> GetLikes200Response get_likes(path_query_id, variables, features, field_toggles) +> UserTweetsResponse get_likes(path_query_id, variables, features, field_toggles) @@ -712,6 +733,7 @@ get user likes tweets * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -735,7 +757,7 @@ get user likes tweets ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response +from twitter_openapi_python_generated.models.user_tweets_response import UserTweetsResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -762,6 +784,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -912,11 +940,11 @@ Name | Type | Description | Notes ### Return type -[**GetLikes200Response**](GetLikes200Response.md) +[**UserTweetsResponse**](UserTweetsResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -932,7 +960,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_list_latest_tweets_timeline** -> GetListLatestTweetsTimeline200Response get_list_latest_tweets_timeline(path_query_id, variables, features) +> ListLatestTweetsTimelineResponse get_list_latest_tweets_timeline(path_query_id, variables, features) @@ -942,6 +970,7 @@ get tweet list of timeline * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -965,7 +994,7 @@ get tweet list of timeline ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_list_latest_tweets_timeline200_response import GetListLatestTweetsTimeline200Response +from twitter_openapi_python_generated.models.list_latest_tweets_timeline_response import ListLatestTweetsTimelineResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -992,6 +1021,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1140,11 +1175,11 @@ Name | Type | Description | Notes ### Return type -[**GetListLatestTweetsTimeline200Response**](GetListLatestTweetsTimeline200Response.md) +[**ListLatestTweetsTimelineResponse**](ListLatestTweetsTimelineResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -1160,7 +1195,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_search_timeline** -> GetSearchTimeline200Response get_search_timeline(path_query_id, variables, features) +> SearchTimelineResponse get_search_timeline(path_query_id, variables, features) @@ -1170,6 +1205,7 @@ search tweet list. product:[Top, Latest, People, Photos, Videos] * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -1193,7 +1229,7 @@ search tweet list. product:[Top, Latest, People, Photos, Videos] ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_search_timeline200_response import GetSearchTimeline200Response +from twitter_openapi_python_generated.models.search_timeline_response import SearchTimelineResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -1220,6 +1256,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1368,11 +1410,11 @@ Name | Type | Description | Notes ### Return type -[**GetSearchTimeline200Response**](GetSearchTimeline200Response.md) +[**SearchTimelineResponse**](SearchTimelineResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -1388,7 +1430,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_tweet_detail** -> GetTweetDetail200Response get_tweet_detail(path_query_id, variables, features, field_toggles) +> TweetDetailResponse get_tweet_detail(path_query_id, variables, features, field_toggles) @@ -1398,6 +1440,7 @@ get TweetDetail * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -1421,7 +1464,7 @@ get TweetDetail ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_tweet_detail200_response import GetTweetDetail200Response +from twitter_openapi_python_generated.models.tweet_detail_response import TweetDetailResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -1448,6 +1491,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1598,11 +1647,11 @@ Name | Type | Description | Notes ### Return type -[**GetTweetDetail200Response**](GetTweetDetail200Response.md) +[**TweetDetailResponse**](TweetDetailResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -1618,7 +1667,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_highlights_tweets** -> GetUserHighlightsTweets200Response get_user_highlights_tweets(path_query_id, variables, features) +> UserHighlightsTweetsResponse get_user_highlights_tweets(path_query_id, variables, features) @@ -1628,6 +1677,7 @@ get user highlights tweets * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -1651,7 +1701,7 @@ get user highlights tweets ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_user_highlights_tweets200_response import GetUserHighlightsTweets200Response +from twitter_openapi_python_generated.models.user_highlights_tweets_response import UserHighlightsTweetsResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -1678,6 +1728,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1826,11 +1882,11 @@ Name | Type | Description | Notes ### Return type -[**GetUserHighlightsTweets200Response**](GetUserHighlightsTweets200Response.md) +[**UserHighlightsTweetsResponse**](UserHighlightsTweetsResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -1846,7 +1902,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_media** -> GetLikes200Response get_user_media(path_query_id, variables, features, field_toggles) +> UserTweetsResponse get_user_media(path_query_id, variables, features, field_toggles) @@ -1856,6 +1912,7 @@ get user media tweets * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -1879,7 +1936,7 @@ get user media tweets ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response +from twitter_openapi_python_generated.models.user_tweets_response import UserTweetsResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -1906,6 +1963,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -2056,11 +2119,11 @@ Name | Type | Description | Notes ### Return type -[**GetLikes200Response**](GetLikes200Response.md) +[**UserTweetsResponse**](UserTweetsResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -2076,7 +2139,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_tweets** -> GetLikes200Response get_user_tweets(path_query_id, variables, features, field_toggles) +> UserTweetsResponse get_user_tweets(path_query_id, variables, features, field_toggles) @@ -2086,6 +2149,7 @@ get user tweets * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -2109,7 +2173,7 @@ get user tweets ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response +from twitter_openapi_python_generated.models.user_tweets_response import UserTweetsResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -2136,6 +2200,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -2286,11 +2356,11 @@ Name | Type | Description | Notes ### Return type -[**GetLikes200Response**](GetLikes200Response.md) +[**UserTweetsResponse**](UserTweetsResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -2306,7 +2376,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_tweets_and_replies** -> GetLikes200Response get_user_tweets_and_replies(path_query_id, variables, features, field_toggles) +> UserTweetsResponse get_user_tweets_and_replies(path_query_id, variables, features, field_toggles) @@ -2316,6 +2386,7 @@ get user replies tweets * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -2339,7 +2410,7 @@ get user replies tweets ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response +from twitter_openapi_python_generated.models.user_tweets_response import UserTweetsResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -2366,6 +2437,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -2516,11 +2593,11 @@ Name | Type | Description | Notes ### Return type -[**GetLikes200Response**](GetLikes200Response.md) +[**UserTweetsResponse**](UserTweetsResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/TweetDetailResponse.md b/twitter_openapi_python_generated/docs/TweetDetailResponse.md index 1e8e8dd0..76e462a1 100644 --- a/twitter_openapi_python_generated/docs/TweetDetailResponse.md +++ b/twitter_openapi_python_generated/docs/TweetDetailResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**TweetDetailResponseData**](TweetDetailResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetDetailResponseData.md b/twitter_openapi_python_generated/docs/TweetDetailResponseData.md index 2ddb581e..c60b0abf 100644 --- a/twitter_openapi_python_generated/docs/TweetDetailResponseData.md +++ b/twitter_openapi_python_generated/docs/TweetDetailResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**threaded_conversation_with_injections_v2** | [**Timeline**](Timeline.md) | | +**threaded_conversation_with_injections_v2** | [**Timeline**](Timeline.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetFavoritersResponse.md b/twitter_openapi_python_generated/docs/TweetFavoritersResponse.md index 078da8a3..ab82752c 100644 --- a/twitter_openapi_python_generated/docs/TweetFavoritersResponse.md +++ b/twitter_openapi_python_generated/docs/TweetFavoritersResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**TweetFavoritersResponseData**](TweetFavoritersResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetFavoritersResponseData.md b/twitter_openapi_python_generated/docs/TweetFavoritersResponseData.md index 6061a506..6eb18106 100644 --- a/twitter_openapi_python_generated/docs/TweetFavoritersResponseData.md +++ b/twitter_openapi_python_generated/docs/TweetFavoritersResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**favoriters_timeline** | [**TimelineV2**](TimelineV2.md) | | +**favoriters_timeline** | [**TimelineV2**](TimelineV2.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetResultByRestIdData.md b/twitter_openapi_python_generated/docs/TweetResultByRestIdData.md index de2f8623..69491209 100644 --- a/twitter_openapi_python_generated/docs/TweetResultByRestIdData.md +++ b/twitter_openapi_python_generated/docs/TweetResultByRestIdData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**tweet_result** | [**ItemResult**](ItemResult.md) | | +**tweet_result** | [**ItemResult**](ItemResult.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetResultByRestIdResponse.md b/twitter_openapi_python_generated/docs/TweetResultByRestIdResponse.md index bcf27959..1c18f5a4 100644 --- a/twitter_openapi_python_generated/docs/TweetResultByRestIdResponse.md +++ b/twitter_openapi_python_generated/docs/TweetResultByRestIdResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**TweetResultByRestIdData**](TweetResultByRestIdData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetRetweetersResponse.md b/twitter_openapi_python_generated/docs/TweetRetweetersResponse.md index 1a3c78b6..f23c919c 100644 --- a/twitter_openapi_python_generated/docs/TweetRetweetersResponse.md +++ b/twitter_openapi_python_generated/docs/TweetRetweetersResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**TweetRetweetersResponseData**](TweetRetweetersResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TweetRetweetersResponseData.md b/twitter_openapi_python_generated/docs/TweetRetweetersResponseData.md index 9fb8523f..5883ec00 100644 --- a/twitter_openapi_python_generated/docs/TweetRetweetersResponseData.md +++ b/twitter_openapi_python_generated/docs/TweetRetweetersResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**retweeters_timeline** | [**TimelineV2**](TimelineV2.md) | | +**retweeters_timeline** | [**TimelineV2**](TimelineV2.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/TypeName.md b/twitter_openapi_python_generated/docs/TypeName.md index 6e9e2399..31b799ff 100644 --- a/twitter_openapi_python_generated/docs/TypeName.md +++ b/twitter_openapi_python_generated/docs/TypeName.md @@ -39,6 +39,8 @@ * `COMMUNITYJOINACTION` (value: `'CommunityJoinAction'`) +* `COMMUNITYJOINACTIONUNAVAILABLE` (value: `'CommunityJoinActionUnavailable'`) + * `COMMUNITYLEAVEACTIONUNAVAILABLE` (value: `'CommunityLeaveActionUnavailable'`) * `COMMUNITYTWEETPINACTIONUNAVAILABLE` (value: `'CommunityTweetPinActionUnavailable'`) diff --git a/twitter_openapi_python_generated/docs/UnfavoriteTweet.md b/twitter_openapi_python_generated/docs/UnfavoriteTweet.md index 97d689c6..a25db593 100644 --- a/twitter_openapi_python_generated/docs/UnfavoriteTweet.md +++ b/twitter_openapi_python_generated/docs/UnfavoriteTweet.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**unfavorite_tweet** | **str** | | +**unfavorite_tweet** | **str** | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UnfavoriteTweetResponse.md b/twitter_openapi_python_generated/docs/UnfavoriteTweetResponse.md new file mode 100644 index 00000000..e7cb051e --- /dev/null +++ b/twitter_openapi_python_generated/docs/UnfavoriteTweetResponse.md @@ -0,0 +1,30 @@ +# UnfavoriteTweetResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**UnfavoriteTweet**](UnfavoriteTweet.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] + +## Example + +```python +from twitter_openapi_python_generated.models.unfavorite_tweet_response import UnfavoriteTweetResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UnfavoriteTweetResponse from a JSON string +unfavorite_tweet_response_instance = UnfavoriteTweetResponse.from_json(json) +# print the JSON string representation of the object +print(UnfavoriteTweetResponse.to_json()) + +# convert the object into a dict +unfavorite_tweet_response_dict = unfavorite_tweet_response_instance.to_dict() +# create an instance of UnfavoriteTweetResponse from a dict +unfavorite_tweet_response_from_dict = UnfavoriteTweetResponse.from_dict(unfavorite_tweet_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/twitter_openapi_python_generated/docs/UnfavoriteTweetResponseData.md b/twitter_openapi_python_generated/docs/UnfavoriteTweetResponseData.md deleted file mode 100644 index b6c4ea96..00000000 --- a/twitter_openapi_python_generated/docs/UnfavoriteTweetResponseData.md +++ /dev/null @@ -1,29 +0,0 @@ -# UnfavoriteTweetResponseData - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**UnfavoriteTweet**](UnfavoriteTweet.md) | | - -## Example - -```python -from twitter_openapi_python_generated.models.unfavorite_tweet_response_data import UnfavoriteTweetResponseData - -# TODO update the JSON string below -json = "{}" -# create an instance of UnfavoriteTweetResponseData from a JSON string -unfavorite_tweet_response_data_instance = UnfavoriteTweetResponseData.from_json(json) -# print the JSON string representation of the object -print(UnfavoriteTweetResponseData.to_json()) - -# convert the object into a dict -unfavorite_tweet_response_data_dict = unfavorite_tweet_response_data_instance.to_dict() -# create an instance of UnfavoriteTweetResponseData from a dict -unfavorite_tweet_response_data_from_dict = UnfavoriteTweetResponseData.from_dict(unfavorite_tweet_response_data_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/twitter_openapi_python_generated/docs/User.md b/twitter_openapi_python_generated/docs/User.md index 321b63f5..70a42542 100644 --- a/twitter_openapi_python_generated/docs/User.md +++ b/twitter_openapi_python_generated/docs/User.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **typename** | [**TypeName**](TypeName.md) | | -**affiliates_highlighted_label** | **Dict[str, object]** | | +**affiliates_highlighted_label** | **Dict[str, object]** | | [optional] **business_account** | **Dict[str, object]** | | [optional] **creator_subscriptions_count** | **int** | | [optional] **has_graduated_access** | **bool** | | [optional] diff --git a/twitter_openapi_python_generated/docs/UserApi.md b/twitter_openapi_python_generated/docs/UserApi.md index feec0875..1d2d696a 100644 --- a/twitter_openapi_python_generated/docs/UserApi.md +++ b/twitter_openapi_python_generated/docs/UserApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **get_user_by_rest_id** -> GetUserByRestId200Response get_user_by_rest_id(path_query_id, variables, features) +> UserResponse get_user_by_rest_id(path_query_id, variables, features) @@ -19,6 +19,7 @@ get user by rest id * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -42,7 +43,7 @@ get user by rest id ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_user_by_rest_id200_response import GetUserByRestId200Response +from twitter_openapi_python_generated.models.user_response import UserResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -69,6 +70,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -217,11 +224,11 @@ Name | Type | Description | Notes ### Return type -[**GetUserByRestId200Response**](GetUserByRestId200Response.md) +[**UserResponse**](UserResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -237,7 +244,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_user_by_screen_name** -> GetUserByRestId200Response get_user_by_screen_name(path_query_id, variables, features, field_toggles) +> UserResponse get_user_by_screen_name(path_query_id, variables, features, field_toggles) @@ -247,6 +254,7 @@ get user by screen name * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -270,7 +278,7 @@ get user by screen name ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_user_by_rest_id200_response import GetUserByRestId200Response +from twitter_openapi_python_generated.models.user_response import UserResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -297,6 +305,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -447,11 +461,11 @@ Name | Type | Description | Notes ### Return type -[**GetUserByRestId200Response**](GetUserByRestId200Response.md) +[**UserResponse**](UserResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/UserHighlightsTweetsData.md b/twitter_openapi_python_generated/docs/UserHighlightsTweetsData.md index f722d3f0..df25e9b0 100644 --- a/twitter_openapi_python_generated/docs/UserHighlightsTweetsData.md +++ b/twitter_openapi_python_generated/docs/UserHighlightsTweetsData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | [**UserHighlightsTweetsUser**](UserHighlightsTweetsUser.md) | | +**user** | [**UserHighlightsTweetsUser**](UserHighlightsTweetsUser.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UserHighlightsTweetsResponse.md b/twitter_openapi_python_generated/docs/UserHighlightsTweetsResponse.md index 3e47e889..52a82d96 100644 --- a/twitter_openapi_python_generated/docs/UserHighlightsTweetsResponse.md +++ b/twitter_openapi_python_generated/docs/UserHighlightsTweetsResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UserHighlightsTweetsData**](UserHighlightsTweetsData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UserLegacyExtendedProfileBirthdate.md b/twitter_openapi_python_generated/docs/UserLegacyExtendedProfileBirthdate.md index 037672f0..3818a24e 100644 --- a/twitter_openapi_python_generated/docs/UserLegacyExtendedProfileBirthdate.md +++ b/twitter_openapi_python_generated/docs/UserLegacyExtendedProfileBirthdate.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **day** | **int** | | **month** | **int** | | **visibility** | **str** | | -**year** | **int** | | +**year** | **int** | | [optional] **year_visibility** | **str** | | ## Example diff --git a/twitter_openapi_python_generated/docs/UserListApi.md b/twitter_openapi_python_generated/docs/UserListApi.md index 57fbd4e1..6c750482 100644 --- a/twitter_openapi_python_generated/docs/UserListApi.md +++ b/twitter_openapi_python_generated/docs/UserListApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **get_favoriters** -> GetFavoriters200Response get_favoriters(path_query_id, variables, features) +> TweetFavoritersResponse get_favoriters(path_query_id, variables, features) @@ -22,6 +22,7 @@ get tweet favoriters * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -45,7 +46,7 @@ get tweet favoriters ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_favoriters200_response import GetFavoriters200Response +from twitter_openapi_python_generated.models.tweet_favoriters_response import TweetFavoritersResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -72,6 +73,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -220,11 +227,11 @@ Name | Type | Description | Notes ### Return type -[**GetFavoriters200Response**](GetFavoriters200Response.md) +[**TweetFavoritersResponse**](TweetFavoritersResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -240,7 +247,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_followers** -> GetFollowers200Response get_followers(path_query_id, variables, features) +> FollowResponse get_followers(path_query_id, variables, features) @@ -250,6 +257,7 @@ get user list of followers * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -273,7 +281,7 @@ get user list of followers ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response +from twitter_openapi_python_generated.models.follow_response import FollowResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -300,6 +308,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -448,11 +462,11 @@ Name | Type | Description | Notes ### Return type -[**GetFollowers200Response**](GetFollowers200Response.md) +[**FollowResponse**](FollowResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -468,7 +482,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_followers_you_know** -> GetFollowers200Response get_followers_you_know(path_query_id, variables, features) +> FollowResponse get_followers_you_know(path_query_id, variables, features) @@ -478,6 +492,7 @@ get followers you know * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -501,7 +516,7 @@ get followers you know ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response +from twitter_openapi_python_generated.models.follow_response import FollowResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -528,6 +543,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -676,11 +697,11 @@ Name | Type | Description | Notes ### Return type -[**GetFollowers200Response**](GetFollowers200Response.md) +[**FollowResponse**](FollowResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -696,7 +717,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_following** -> GetFollowers200Response get_following(path_query_id, variables, features) +> FollowResponse get_following(path_query_id, variables, features) @@ -706,6 +727,7 @@ get user list of following * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -729,7 +751,7 @@ get user list of following ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response +from twitter_openapi_python_generated.models.follow_response import FollowResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -756,6 +778,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -904,11 +932,11 @@ Name | Type | Description | Notes ### Return type -[**GetFollowers200Response**](GetFollowers200Response.md) +[**FollowResponse**](FollowResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -924,7 +952,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_retweeters** -> GetRetweeters200Response get_retweeters(path_query_id, variables, features) +> TweetRetweetersResponse get_retweeters(path_query_id, variables, features) @@ -934,6 +962,7 @@ get tweet retweeters * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -957,7 +986,7 @@ get tweet retweeters ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_retweeters200_response import GetRetweeters200Response +from twitter_openapi_python_generated.models.tweet_retweeters_response import TweetRetweetersResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -984,6 +1013,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -1132,11 +1167,11 @@ Name | Type | Description | Notes ### Return type -[**GetRetweeters200Response**](GetRetweeters200Response.md) +[**TweetRetweetersResponse**](TweetRetweetersResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/UserResponse.md b/twitter_openapi_python_generated/docs/UserResponse.md index fb08c8a2..89bcd0c1 100644 --- a/twitter_openapi_python_generated/docs/UserResponse.md +++ b/twitter_openapi_python_generated/docs/UserResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UserResponseData**](UserResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UserTipJarSettings.md b/twitter_openapi_python_generated/docs/UserTipJarSettings.md index 4c71ea75..eefd7fb3 100644 --- a/twitter_openapi_python_generated/docs/UserTipJarSettings.md +++ b/twitter_openapi_python_generated/docs/UserTipJarSettings.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **gofundme_handle** | **str** | | [optional] **is_enabled** | **bool** | | [optional] **patreon_handle** | **str** | | [optional] +**pay_pal_handle** | **str** | | [optional] **venmo_handle** | **str** | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UserTweetsData.md b/twitter_openapi_python_generated/docs/UserTweetsData.md index 75a36123..80d0ab17 100644 --- a/twitter_openapi_python_generated/docs/UserTweetsData.md +++ b/twitter_openapi_python_generated/docs/UserTweetsData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | [**UserTweetsUser**](UserTweetsUser.md) | | +**user** | [**UserTweetsUser**](UserTweetsUser.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UserTweetsResponse.md b/twitter_openapi_python_generated/docs/UserTweetsResponse.md index d9f51b01..1780ddc7 100644 --- a/twitter_openapi_python_generated/docs/UserTweetsResponse.md +++ b/twitter_openapi_python_generated/docs/UserTweetsResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UserTweetsData**](UserTweetsData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UserUnion.md b/twitter_openapi_python_generated/docs/UserUnion.md index 3c3e2f3e..97db5f0e 100644 --- a/twitter_openapi_python_generated/docs/UserUnion.md +++ b/twitter_openapi_python_generated/docs/UserUnion.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **typename** | [**TypeName**](TypeName.md) | | -**affiliates_highlighted_label** | **Dict[str, object]** | | +**affiliates_highlighted_label** | **Dict[str, object]** | | [optional] **business_account** | **Dict[str, object]** | | [optional] **creator_subscriptions_count** | **int** | | [optional] **has_graduated_access** | **bool** | | [optional] diff --git a/twitter_openapi_python_generated/docs/UserVerificationInfoReason.md b/twitter_openapi_python_generated/docs/UserVerificationInfoReason.md index 5a6320ed..9b1ecf71 100644 --- a/twitter_openapi_python_generated/docs/UserVerificationInfoReason.md +++ b/twitter_openapi_python_generated/docs/UserVerificationInfoReason.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | [**UserVerificationInfoReasonDescription**](UserVerificationInfoReasonDescription.md) | | -**override_verified_year** | **int** | | +**override_verified_year** | **int** | | [optional] **verified_since_msec** | **str** | | ## Example diff --git a/twitter_openapi_python_generated/docs/UsersApi.md b/twitter_openapi_python_generated/docs/UsersApi.md index 1dbda618..1f80ecee 100644 --- a/twitter_openapi_python_generated/docs/UsersApi.md +++ b/twitter_openapi_python_generated/docs/UsersApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **get_users_by_rest_ids** -> GetUsersByRestIds200Response get_users_by_rest_ids(path_query_id, variables, features) +> UsersResponse get_users_by_rest_ids(path_query_id, variables, features) @@ -18,6 +18,7 @@ get users by rest ids * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -41,7 +42,7 @@ get users by rest ids ```python import twitter_openapi_python_generated -from twitter_openapi_python_generated.models.get_users_by_rest_ids200_response import GetUsersByRestIds200Response +from twitter_openapi_python_generated.models.users_response import UsersResponse from twitter_openapi_python_generated.rest import ApiException from pprint import pprint @@ -68,6 +69,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -216,11 +223,11 @@ Name | Type | Description | Notes ### Return type -[**GetUsersByRestIds200Response**](GetUsersByRestIds200Response.md) +[**UsersResponse**](UsersResponse.md) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/UsersResponse.md b/twitter_openapi_python_generated/docs/UsersResponse.md index 257b2270..f5bcfdd6 100644 --- a/twitter_openapi_python_generated/docs/UsersResponse.md +++ b/twitter_openapi_python_generated/docs/UsersResponse.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**UsersResponseData**](UsersResponseData.md) | | +**errors** | [**List[ErrorResponse]**](ErrorResponse.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/UsersResponseData.md b/twitter_openapi_python_generated/docs/UsersResponseData.md index ac28ab7f..057dba45 100644 --- a/twitter_openapi_python_generated/docs/UsersResponseData.md +++ b/twitter_openapi_python_generated/docs/UsersResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**users** | [**List[UserResults]**](UserResults.md) | | +**users** | [**List[UserResults]**](UserResults.md) | | [optional] ## Example diff --git a/twitter_openapi_python_generated/docs/V11GetApi.md b/twitter_openapi_python_generated/docs/V11GetApi.md index 09e23530..279291d0 100644 --- a/twitter_openapi_python_generated/docs/V11GetApi.md +++ b/twitter_openapi_python_generated/docs/V11GetApi.md @@ -19,6 +19,7 @@ get friends following list * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -68,6 +69,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -246,7 +253,7 @@ void (empty response body) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -272,6 +279,7 @@ get search typeahead * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -321,6 +329,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -477,7 +491,7 @@ void (empty response body) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/V11PostApi.md b/twitter_openapi_python_generated/docs/V11PostApi.md index 1310e48a..811bf032 100644 --- a/twitter_openapi_python_generated/docs/V11PostApi.md +++ b/twitter_openapi_python_generated/docs/V11PostApi.md @@ -19,6 +19,7 @@ post create friendships * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -68,6 +69,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -240,7 +247,7 @@ void (empty response body) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers @@ -266,6 +273,7 @@ post destroy friendships * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -315,6 +323,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -487,7 +501,7 @@ void (empty response body) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/docs/V20GetApi.md b/twitter_openapi_python_generated/docs/V20GetApi.md index d716c8ee..1359d736 100644 --- a/twitter_openapi_python_generated/docs/V20GetApi.md +++ b/twitter_openapi_python_generated/docs/V20GetApi.md @@ -18,6 +18,7 @@ get search adaptive * Api Key Authentication (Accept): * Api Key Authentication (ClientLanguage): +* Api Key Authentication (Priority): * Api Key Authentication (Referer): * Api Key Authentication (SecFetchDest): * Api Key Authentication (SecChUaPlatform): @@ -67,6 +68,12 @@ configuration.api_key['ClientLanguage'] = os.environ["API_KEY"] # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix['ClientLanguage'] = 'Bearer' +# Configure API key authorization: Priority +configuration.api_key['Priority'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Priority'] = 'Bearer' + # Configure API key authorization: Referer configuration.api_key['Referer'] = os.environ["API_KEY"] @@ -285,7 +292,7 @@ void (empty response body) ### Authorization -[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) +[Accept](../README.md#Accept), [ClientLanguage](../README.md#ClientLanguage), [Priority](../README.md#Priority), [Referer](../README.md#Referer), [SecFetchDest](../README.md#SecFetchDest), [SecChUaPlatform](../README.md#SecChUaPlatform), [SecFetchMode](../README.md#SecFetchMode), [CsrfToken](../README.md#CsrfToken), [ClientUuid](../README.md#ClientUuid), [BearerAuth](../README.md#BearerAuth), [GuestToken](../README.md#GuestToken), [SecChUa](../README.md#SecChUa), [CookieGt0](../README.md#CookieGt0), [ClientTransactionId](../README.md#ClientTransactionId), [ActiveUser](../README.md#ActiveUser), [CookieCt0](../README.md#CookieCt0), [UserAgent](../README.md#UserAgent), [AcceptLanguage](../README.md#AcceptLanguage), [SecFetchSite](../README.md#SecFetchSite), [AuthType](../README.md#AuthType), [CookieAuthToken](../README.md#CookieAuthToken), [SecChUaMobile](../README.md#SecChUaMobile), [AcceptEncoding](../README.md#AcceptEncoding) ### HTTP request headers diff --git a/twitter_openapi_python_generated/pyproject.toml b/twitter_openapi_python_generated/pyproject.toml index dc45750e..823fad67 100644 --- a/twitter_openapi_python_generated/pyproject.toml +++ b/twitter_openapi_python_generated/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "twitter_openapi_python_generated" -version = "0.0.24" +version = "0.0.27" description = "Twitter OpenAPI" authors = ["OpenAPI Generator Community "] license = "custom license or AGPL-3.0-or-later" @@ -49,7 +49,7 @@ warn_unused_ignores = true ## Getting these passing should be easy strict_equality = true -strict_concatenate = true +extra_checks = true ## Strongly recommend enabling this one as soon as you can check_untyped_defs = true @@ -70,3 +70,20 @@ disallow_any_generics = true # ### This one can be tricky to get passing if you use a lot of untyped libraries #warn_return_any = true + +[[tool.mypy.overrides]] +module = [ + "twitter_openapi_python_generated.configuration", +] +warn_unused_ignores = true +strict_equality = true +extra_checks = true +check_untyped_defs = true +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true +disallow_untyped_calls = true +disallow_incomplete_defs = true +disallow_untyped_defs = true +no_implicit_reexport = true +warn_return_any = true diff --git a/twitter_openapi_python_generated/setup.py b/twitter_openapi_python_generated/setup.py index 180f9ef1..d056d40c 100644 --- a/twitter_openapi_python_generated/setup.py +++ b/twitter_openapi_python_generated/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "twitter_openapi_python_generated" -VERSION = "0.0.24" +VERSION = "0.0.27" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/twitter_openapi_python_generated/test/test_author_community_relationship.py b/twitter_openapi_python_generated/test/test_author_community_relationship.py index 4a2f8865..78bbe661 100644 --- a/twitter_openapi_python_generated/test/test_author_community_relationship.py +++ b/twitter_openapi_python_generated/test/test_author_community_relationship.py @@ -43,8 +43,7 @@ def make_instance(self, include_optional) -> AuthorCommunityRelationship: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -109,8 +108,7 @@ def make_instance(self, include_optional) -> AuthorCommunityRelationship: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_birdwatch_pivot.py b/twitter_openapi_python_generated/test/test_birdwatch_pivot.py index 5139a838..a6e1a5d9 100644 --- a/twitter_openapi_python_generated/test/test_birdwatch_pivot.py +++ b/twitter_openapi_python_generated/test/test_birdwatch_pivot.py @@ -75,34 +75,7 @@ def make_instance(self, include_optional) -> BirdwatchPivot: else: return BirdwatchPivot( destination_url = '', - footer = twitter_openapi_python_generated.models.birdwatch_pivot_footer.BirdwatchPivotFooter( - entities = [ - twitter_openapi_python_generated.models.birdwatch_entity.BirdwatchEntity( - from_index = 56, - ref = twitter_openapi_python_generated.models.birdwatch_entity_ref.BirdwatchEntityRef( - text = '', - type = 'TimelineUrl', - url = '', - url_type = 'ExternalUrl', ), - to_index = 56, ) - ], - text = '', ), icon_type = 'BirdwatchV1Icon', - note = twitter_openapi_python_generated.models.birdwatch_pivot_note.BirdwatchPivotNote( - rest_id = '4', ), - shorttitle = '', - subtitle = twitter_openapi_python_generated.models.birdwatch_pivot_subtitle.BirdwatchPivotSubtitle( - entities = [ - twitter_openapi_python_generated.models.birdwatch_entity.BirdwatchEntity( - from_index = 56, - ref = twitter_openapi_python_generated.models.birdwatch_entity_ref.BirdwatchEntityRef( - text = '', - type = 'TimelineUrl', - url = '', - url_type = 'ExternalUrl', ), - to_index = 56, ) - ], - text = '', ), title = '', ) """ diff --git a/twitter_openapi_python_generated/test/test_bookmarks_response.py b/twitter_openapi_python_generated/test/test_bookmarks_response.py index 37ea398b..1cf722fc 100644 --- a/twitter_openapi_python_generated/test/test_bookmarks_response.py +++ b/twitter_openapi_python_generated/test/test_bookmarks_response.py @@ -43,18 +43,37 @@ def make_instance(self, include_optional) -> BookmarksResponse: null ], metadata = { }, - response_objects = { }, ), ), ) + response_objects = { }, ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return BookmarksResponse( - data = twitter_openapi_python_generated.models.bookmarks_response_data.BookmarksResponseData( - bookmark_timeline_v2 = twitter_openapi_python_generated.models.bookmarks_timeline.BookmarksTimeline( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_community.py b/twitter_openapi_python_generated/test/test_community.py index 8ea138c9..ca65127e 100644 --- a/twitter_openapi_python_generated/test/test_community.py +++ b/twitter_openapi_python_generated/test/test_community.py @@ -42,8 +42,7 @@ def make_instance(self, include_optional) -> Community: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -104,8 +103,7 @@ def make_instance(self, include_optional) -> Community: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_community_actions.py b/twitter_openapi_python_generated/test/test_community_actions.py index c00a1666..fd5aff4b 100644 --- a/twitter_openapi_python_generated/test/test_community_actions.py +++ b/twitter_openapi_python_generated/test/test_community_actions.py @@ -39,8 +39,7 @@ def make_instance(self, include_optional) -> CommunityActions: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = 'TimelineTweet', ), + join_action_result = None, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = 'TimelineTweet', message = '', diff --git a/twitter_openapi_python_generated/test/test_community_data.py b/twitter_openapi_python_generated/test/test_community_data.py index 408dbece..7c3c250c 100644 --- a/twitter_openapi_python_generated/test/test_community_data.py +++ b/twitter_openapi_python_generated/test/test_community_data.py @@ -41,10 +41,9 @@ def make_instance(self, include_optional) -> CommunityData: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = 'TimelineTweet', ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( - __typename = , + __typename = 'TimelineTweet', message = '', reason = 'ViewerNotMember', ), pin_action_result = twitter_openapi_python_generated.models.community_pin_action_result.CommunityPinActionResult( @@ -105,10 +104,9 @@ def make_instance(self, include_optional) -> CommunityData: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = 'TimelineTweet', ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( - __typename = , + __typename = 'TimelineTweet', message = '', reason = 'ViewerNotMember', ), pin_action_result = twitter_openapi_python_generated.models.community_pin_action_result.CommunityPinActionResult( diff --git a/twitter_openapi_python_generated/test/test_community_join_action_result.py b/twitter_openapi_python_generated/test/test_community_join_action.py similarity index 71% rename from twitter_openapi_python_generated/test/test_community_join_action_result.py rename to twitter_openapi_python_generated/test/test_community_join_action.py index a7e7120a..c0a894ce 100644 --- a/twitter_openapi_python_generated/test/test_community_join_action_result.py +++ b/twitter_openapi_python_generated/test/test_community_join_action.py @@ -15,10 +15,10 @@ import unittest -from twitter_openapi_python_generated.models.community_join_action_result import CommunityJoinActionResult +from twitter_openapi_python_generated.models.community_join_action import CommunityJoinAction -class TestCommunityJoinActionResult(unittest.TestCase): - """CommunityJoinActionResult unit test stubs""" +class TestCommunityJoinAction(unittest.TestCase): + """CommunityJoinAction unit test stubs""" def setUp(self): pass @@ -26,26 +26,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> CommunityJoinActionResult: - """Test CommunityJoinActionResult + def make_instance(self, include_optional) -> CommunityJoinAction: + """Test CommunityJoinAction include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `CommunityJoinActionResult` + # uncomment below to create an instance of `CommunityJoinAction` """ - model = CommunityJoinActionResult() + model = CommunityJoinAction() if include_optional: - return CommunityJoinActionResult( + return CommunityJoinAction( typename = 'TimelineTweet' ) else: - return CommunityJoinActionResult( + return CommunityJoinAction( typename = 'TimelineTweet', ) """ - def testCommunityJoinActionResult(self): - """Test CommunityJoinActionResult""" + def testCommunityJoinAction(self): + """Test CommunityJoinAction""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/twitter_openapi_python_generated/test/test_community_join_action_result_union.py b/twitter_openapi_python_generated/test/test_community_join_action_result_union.py new file mode 100644 index 00000000..cdcacbcf --- /dev/null +++ b/twitter_openapi_python_generated/test/test_community_join_action_result_union.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Twitter OpenAPI + + Twitter OpenAPI(Swagger) specification + + The version of the OpenAPI document: 0.0.1 + Contact: yuki@yuki0311.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from twitter_openapi_python_generated.models.community_join_action_result_union import CommunityJoinActionResultUnion + +class TestCommunityJoinActionResultUnion(unittest.TestCase): + """CommunityJoinActionResultUnion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommunityJoinActionResultUnion: + """Test CommunityJoinActionResultUnion + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommunityJoinActionResultUnion` + """ + model = CommunityJoinActionResultUnion() + if include_optional: + return CommunityJoinActionResultUnion( + typename = 'TimelineTweet', + message = '', + reason = 'ViewerRequestRequired' + ) + else: + return CommunityJoinActionResultUnion( + typename = 'TimelineTweet', + message = '', + reason = 'ViewerRequestRequired', + ) + """ + + def testCommunityJoinActionResultUnion(self): + """Test CommunityJoinActionResultUnion""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/twitter_openapi_python_generated/test/test_community_join_action_unavailable.py b/twitter_openapi_python_generated/test/test_community_join_action_unavailable.py new file mode 100644 index 00000000..3aba9bcc --- /dev/null +++ b/twitter_openapi_python_generated/test/test_community_join_action_unavailable.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Twitter OpenAPI + + Twitter OpenAPI(Swagger) specification + + The version of the OpenAPI document: 0.0.1 + Contact: yuki@yuki0311.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from twitter_openapi_python_generated.models.community_join_action_unavailable import CommunityJoinActionUnavailable + +class TestCommunityJoinActionUnavailable(unittest.TestCase): + """CommunityJoinActionUnavailable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CommunityJoinActionUnavailable: + """Test CommunityJoinActionUnavailable + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CommunityJoinActionUnavailable` + """ + model = CommunityJoinActionUnavailable() + if include_optional: + return CommunityJoinActionUnavailable( + typename = 'TimelineTweet', + message = '', + reason = 'ViewerRequestRequired' + ) + else: + return CommunityJoinActionUnavailable( + typename = 'TimelineTweet', + message = '', + reason = 'ViewerRequestRequired', + ) + """ + + def testCommunityJoinActionUnavailable(self): + """Test CommunityJoinActionUnavailable""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/twitter_openapi_python_generated/test/test_community_relationship.py b/twitter_openapi_python_generated/test/test_community_relationship.py index 93ad6c54..57babe01 100644 --- a/twitter_openapi_python_generated/test/test_community_relationship.py +++ b/twitter_openapi_python_generated/test/test_community_relationship.py @@ -40,10 +40,9 @@ def make_instance(self, include_optional) -> CommunityRelationship: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = 'TimelineTweet', ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( - __typename = , + __typename = 'TimelineTweet', message = '', reason = 'ViewerNotMember', ), pin_action_result = twitter_openapi_python_generated.models.community_pin_action_result.CommunityPinActionResult( @@ -60,10 +59,9 @@ def make_instance(self, include_optional) -> CommunityRelationship: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = 'TimelineTweet', ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( - __typename = , + __typename = 'TimelineTweet', message = '', reason = 'ViewerNotMember', ), pin_action_result = twitter_openapi_python_generated.models.community_pin_action_result.CommunityPinActionResult( diff --git a/twitter_openapi_python_generated/test/test_create_bookmark_response.py b/twitter_openapi_python_generated/test/test_create_bookmark_response.py index d22e0b55..bc981f12 100644 --- a/twitter_openapi_python_generated/test/test_create_bookmark_response.py +++ b/twitter_openapi_python_generated/test/test_create_bookmark_response.py @@ -37,7 +37,34 @@ def make_instance(self, include_optional) -> CreateBookmarkResponse: if include_optional: return CreateBookmarkResponse( data = twitter_openapi_python_generated.models.create_bookmark_response_data.CreateBookmarkResponseData( - tweet_bookmark_put = '', ) + tweet_bookmark_put = '', ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return CreateBookmarkResponse( diff --git a/twitter_openapi_python_generated/test/test_create_bookmark_response_data.py b/twitter_openapi_python_generated/test/test_create_bookmark_response_data.py index 0fb6d61d..6a2d1b85 100644 --- a/twitter_openapi_python_generated/test/test_create_bookmark_response_data.py +++ b/twitter_openapi_python_generated/test/test_create_bookmark_response_data.py @@ -40,7 +40,6 @@ def make_instance(self, include_optional) -> CreateBookmarkResponseData: ) else: return CreateBookmarkResponseData( - tweet_bookmark_put = '', ) """ diff --git a/twitter_openapi_python_generated/test/test_create_retweet_response.py b/twitter_openapi_python_generated/test/test_create_retweet_response.py index 7834eecc..cad6e5b4 100644 --- a/twitter_openapi_python_generated/test/test_create_retweet_response.py +++ b/twitter_openapi_python_generated/test/test_create_retweet_response.py @@ -42,7 +42,34 @@ def make_instance(self, include_optional) -> CreateRetweetResponse: result = twitter_openapi_python_generated.models.retweet.Retweet( legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( full_text = '', ), - rest_id = '4', ), ), ), ) + rest_id = '4', ), ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return CreateRetweetResponse( diff --git a/twitter_openapi_python_generated/test/test_create_retweet_response_data.py b/twitter_openapi_python_generated/test/test_create_retweet_response_data.py index 91c372cc..7a004c2c 100644 --- a/twitter_openapi_python_generated/test/test_create_retweet_response_data.py +++ b/twitter_openapi_python_generated/test/test_create_retweet_response_data.py @@ -45,12 +45,6 @@ def make_instance(self, include_optional) -> CreateRetweetResponseData: ) else: return CreateRetweetResponseData( - create_retweet = twitter_openapi_python_generated.models.create_retweet_response_result.CreateRetweetResponseResult( - retweet_results = twitter_openapi_python_generated.models.create_retweet.CreateRetweet( - result = twitter_openapi_python_generated.models.retweet.Retweet( - legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( - full_text = '', ), - rest_id = '4', ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_create_tweet.py b/twitter_openapi_python_generated/test/test_create_tweet.py index 21648311..59982c5e 100644 --- a/twitter_openapi_python_generated/test/test_create_tweet.py +++ b/twitter_openapi_python_generated/test/test_create_tweet.py @@ -74,8 +74,7 @@ def make_instance(self, include_optional) -> CreateTweet: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -513,8 +512,7 @@ def make_instance(self, include_optional) -> CreateTweet: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_create_tweet_response.py b/twitter_openapi_python_generated/test/test_create_tweet_response.py index 0dcf3dfd..8ae2a6f2 100644 --- a/twitter_openapi_python_generated/test/test_create_tweet_response.py +++ b/twitter_openapi_python_generated/test/test_create_tweet_response.py @@ -77,8 +77,7 @@ def make_instance(self, include_optional) -> CreateTweetResponse: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -474,7 +473,34 @@ def make_instance(self, include_optional) -> CreateTweetResponse: unmention_data = { }, views = twitter_openapi_python_generated.models.tweet_view.TweetView( count = '4', - state = 'Enabled', ), ), ), ), ) + state = 'Enabled', ), ), ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return CreateTweetResponse( @@ -519,8 +545,7 @@ def make_instance(self, include_optional) -> CreateTweetResponse: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_create_tweet_response_data.py b/twitter_openapi_python_generated/test/test_create_tweet_response_data.py index 4da9dd89..9a2e12ca 100644 --- a/twitter_openapi_python_generated/test/test_create_tweet_response_data.py +++ b/twitter_openapi_python_generated/test/test_create_tweet_response_data.py @@ -76,8 +76,7 @@ def make_instance(self, include_optional) -> CreateTweetResponseData: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -477,444 +476,6 @@ def make_instance(self, include_optional) -> CreateTweetResponseData: ) else: return CreateTweetResponseData( - create_tweet = twitter_openapi_python_generated.models.create_tweet_response_result.CreateTweetResponseResult( - tweet_results = twitter_openapi_python_generated.models.create_tweet.CreateTweet( - result = twitter_openapi_python_generated.models.tweet.Tweet( - __typename = 'TimelineTweet', - article = twitter_openapi_python_generated.models.article.Article( - article_results = twitter_openapi_python_generated.models.article_results.ArticleResults( - result = twitter_openapi_python_generated.models.article_result.ArticleResult( - cover_media = twitter_openapi_python_generated.models.article_cover_media.ArticleCoverMedia( - id = '', - media_id = '4', - media_info = twitter_openapi_python_generated.models.article_cover_media_info.ArticleCoverMediaInfo( - color_info = twitter_openapi_python_generated.models.article_cover_media_color_info.ArticleCoverMediaColorInfo( - palette = [ - twitter_openapi_python_generated.models.article_cover_media_color_info_palette.ArticleCoverMediaColorInfoPalette( - percentage = 1.337, - rgb = twitter_openapi_python_generated.models.article_cover_media_color_info_palette_rgb.ArticleCoverMediaColorInfoPaletteRGB( - blue = 56, - green = 56, - red = 56, ), ) - ], ), - original_img_height = 56, - original_img_url = '', - original_img_width = 56, ), - media_key = '', ), - id = '', - lifecycle_state = twitter_openapi_python_generated.models.article_lifecycle_state.ArticleLifecycleState( - modified_at_secs = 56, ), - metadata = twitter_openapi_python_generated.models.article_metadata.ArticleMetadata( - first_published_at_secs = 56, ), - preview_text = '', - rest_id = '4', - title = '', ), ), ), - author_community_relationship = twitter_openapi_python_generated.models.author_community_relationship.AuthorCommunityRelationship( - community_results = twitter_openapi_python_generated.models.community.Community( - result = twitter_openapi_python_generated.models.community_data.CommunityData( - __typename = 'TimelineTweet', - actions = twitter_openapi_python_generated.models.community_actions.CommunityActions( - delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( - __typename = , - reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), - leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( - __typename = , - message = '', - reason = 'ViewerNotMember', ), - pin_action_result = twitter_openapi_python_generated.models.community_pin_action_result.CommunityPinActionResult( - __typename = , ), - unpin_action_result = twitter_openapi_python_generated.models.community_unpin_action_result.CommunityUnpinActionResult( - __typename = , ), ), - admin_results = twitter_openapi_python_generated.models.user_results.UserResults(), - created_at = 56, - creator_results = twitter_openapi_python_generated.models.user_results.UserResults(), - custom_banner_media = { }, - default_banner_media = { }, - description = '', - id_str = '4', - invites_policy = 'MemberInvitesAllowed', - invites_result = twitter_openapi_python_generated.models.community_invites_result.CommunityInvitesResult( - __typename = , - message = '', - reason = 'Unavailable', ), - is_pinned = True, - join_policy = 'Open', - join_requests_result = twitter_openapi_python_generated.models.community_join_requests_result.CommunityJoinRequestsResult( - __typename = , ), - member_count = 56, - members_facepile_results = [ - - ], - moderator_count = 56, - name = '', - primary_community_topic = twitter_openapi_python_generated.models.primary_community_topic.PrimaryCommunityTopic( - topic_id = '4', - topic_name = '', ), - question = '', - role = 'NonMember', - rules = [ - twitter_openapi_python_generated.models.community_rule.CommunityRule( - description = '', - name = '', - rest_id = '4', ) - ], - search_tags = [ - '' - ], - show_only_users_to_display = [ - '' - ], - urls = twitter_openapi_python_generated.models.community_urls.CommunityUrls( - permalink = twitter_openapi_python_generated.models.community_urls_permalink.CommunityUrlsPermalink( - url = '', ), ), - viewer_relationship = { }, ), ), - role = 'Member', - user_results = , ), - birdwatch_pivot = twitter_openapi_python_generated.models.birdwatch_pivot.BirdwatchPivot( - call_to_action = twitter_openapi_python_generated.models.birdwatch_pivot_call_to_action.BirdwatchPivotCallToAction( - destination_url = '', - prompt = '', - title = '', ), - destination_url = '', - footer = twitter_openapi_python_generated.models.birdwatch_pivot_footer.BirdwatchPivotFooter( - entities = [ - twitter_openapi_python_generated.models.birdwatch_entity.BirdwatchEntity( - from_index = 56, - ref = twitter_openapi_python_generated.models.birdwatch_entity_ref.BirdwatchEntityRef( - text = '', - type = 'TimelineUrl', - url = '', - url_type = 'ExternalUrl', ), - to_index = 56, ) - ], - text = '', ), - icon_type = 'BirdwatchV1Icon', - note = twitter_openapi_python_generated.models.birdwatch_pivot_note.BirdwatchPivotNote( - rest_id = '4', ), - shorttitle = '', - subtitle = twitter_openapi_python_generated.models.birdwatch_pivot_subtitle.BirdwatchPivotSubtitle( - entities = [ - twitter_openapi_python_generated.models.birdwatch_entity.BirdwatchEntity( - from_index = 56, - ref = twitter_openapi_python_generated.models.birdwatch_entity_ref.BirdwatchEntityRef( - text = '', - type = 'TimelineUrl', - url = '', - url_type = 'ExternalUrl', ), - to_index = 56, ) - ], - text = '', ), - title = '', - visual_style = 'Default', ), - card = twitter_openapi_python_generated.models.tweet_card.TweetCard( - legacy = twitter_openapi_python_generated.models.tweet_card_legacy.TweetCardLegacy( - binding_values = [ - twitter_openapi_python_generated.models.tweet_card_legacy_binding_value.TweetCardLegacyBindingValue( - key = '', - value = twitter_openapi_python_generated.models.tweet_card_legacy_binding_value_data.TweetCardLegacyBindingValueData( - boolean_value = True, - image_color_value = { }, - image_value = twitter_openapi_python_generated.models.tweet_card_legacy_binding_value_data_image.TweetCardLegacyBindingValueDataImage( - alt = '', - height = 56, - url = '', - width = 56, ), - scribe_key = '', - string_value = '', - type = '', - user_value = twitter_openapi_python_generated.models.user_value.UserValue( - id_str = '4', ), ), ) - ], - card_platform = twitter_openapi_python_generated.models.tweet_card_platform_data.TweetCardPlatformData( - platform = twitter_openapi_python_generated.models.tweet_card_platform.TweetCardPlatform( - audience = twitter_openapi_python_generated.models.tweet_card_platform_audience.TweetCardPlatformAudience( - name = 'production', ), - device = twitter_openapi_python_generated.models.tweet_card_platform_device.TweetCardPlatformDevice( - name = '', - version = '4', ), ), ), - name = '', - url = '', - user_refs_results = [ - - ], ), - rest_id = '', ), - community_relationship = twitter_openapi_python_generated.models.community_relationship.CommunityRelationship( - actions = twitter_openapi_python_generated.models.community_actions.CommunityActions(), - id = '', - moderation_state = { }, - rest_id = '4', ), - community_results = twitter_openapi_python_generated.models.community.Community( - result = twitter_openapi_python_generated.models.community_data.CommunityData( - __typename = , - actions = , - admin_results = , - created_at = 56, - creator_results = , - description = '', - id_str = '4', - invites_policy = 'MemberInvitesAllowed', - invites_result = twitter_openapi_python_generated.models.community_invites_result.CommunityInvitesResult( - __typename = , - message = '', - reason = 'Unavailable', ), - is_pinned = True, - join_policy = 'Open', - member_count = 56, - members_facepile_results = [ - - ], - moderator_count = 56, - name = '', - question = '', - role = 'NonMember', - rules = [ - twitter_openapi_python_generated.models.community_rule.CommunityRule( - description = '', - name = '', - rest_id = '4', ) - ], - search_tags = [ - '' - ], ), ), - core = twitter_openapi_python_generated.models.user_result_core.UserResultCore( - user_results = , ), - edit_control = twitter_openapi_python_generated.models.tweet_edit_control.TweetEditControl( - edit_control_initial = twitter_openapi_python_generated.models.tweet_edit_control_initial.TweetEditControlInitial( - edit_tweet_ids = [ - '4' - ], - editable_until_msecs = '4', - edits_remaining = '4', - is_edit_eligible = True, ), - edit_tweet_ids = [ - '4' - ], - editable_until_msecs = '4', - edits_remaining = '4', - initial_tweet_id = '4', - is_edit_eligible = True, ), - edit_prespective = twitter_openapi_python_generated.models.tweet_edit_prespective.TweetEditPrespective( - favorited = True, - retweeted = True, ), - has_birdwatch_notes = True, - is_translatable = True, - legacy = twitter_openapi_python_generated.models.tweet_legacy.TweetLegacy( - bookmark_count = 56, - bookmarked = True, - conversation_control = { }, - conversation_id_str = '4', - created_at = 'Sat Dec 31 23:59:59 +0000 2023', - display_text_range = [ - 56 - ], - entities = twitter_openapi_python_generated.models.entities.Entities( - hashtags = [ - { } - ], - media = [ - twitter_openapi_python_generated.models.media.Media( - additional_media_info = twitter_openapi_python_generated.models.additional_media_info.AdditionalMediaInfo( - call_to_actions = twitter_openapi_python_generated.models.additional_media_info_call_to_actions.AdditionalMediaInfoCallToActions( - visit_site = twitter_openapi_python_generated.models.additional_media_info_call_to_actions_url.AdditionalMediaInfoCallToActionsUrl( - url = '', ), - watch_now = twitter_openapi_python_generated.models.additional_media_info_call_to_actions_url.AdditionalMediaInfoCallToActionsUrl( - url = '', ), ), - description = '', - embeddable = True, - monetizable = True, - source_user = twitter_openapi_python_generated.models.user_result_core.UserResultCore( - user_results = , ), - title = '', ), - allow_download_status = twitter_openapi_python_generated.models.allow_download_status.AllowDownloadStatus( - allow_download = True, ), - display_url = '', - expanded_url = '', - ext_alt_text = '', - ext_media_availability = twitter_openapi_python_generated.models.ext_media_availability.ExtMediaAvailability( - reason = '', - status = 'Available', ), - features = twitter_openapi_python_generated.models.features.features(), - id_str = '4', - indices = [ - 56 - ], - media_key = '', - media_results = twitter_openapi_python_generated.models.media_results.MediaResults( - result = twitter_openapi_python_generated.models.media_result.MediaResult( - media_key = '', ), ), - media_url_https = '', - original_info = twitter_openapi_python_generated.models.media_original_info.MediaOriginalInfo( - focus_rects = [ - twitter_openapi_python_generated.models.media_original_info_focus_rect.MediaOriginalInfoFocusRect( - h = 56, - w = 56, - x = 56, - y = 56, ) - ], - height = 56, - width = 56, ), - sensitive_media_warning = twitter_openapi_python_generated.models.sensitive_media_warning.SensitiveMediaWarning( - adult_content = True, - graphic_violence = True, - other = True, ), - sizes = twitter_openapi_python_generated.models.media_sizes.MediaSizes( - large = twitter_openapi_python_generated.models.media_size.MediaSize( - h = 56, - resize = 'crop', - w = 56, ), - medium = twitter_openapi_python_generated.models.media_size.MediaSize( - h = 56, - resize = 'crop', - w = 56, ), - small = , - thumb = , ), - source_status_id_str = '4', - source_user_id_str = '4', - type = 'photo', - url = '', - video_info = twitter_openapi_python_generated.models.media_video_info.MediaVideoInfo( - aspect_ratio = [ - 56 - ], - duration_millis = 56, - variants = [ - twitter_openapi_python_generated.models.media_video_info_variant.MediaVideoInfoVariant( - bitrate = 56, - content_type = '', - url = '', ) - ], ), ) - ], - symbols = [ - { } - ], - timestamps = [ - twitter_openapi_python_generated.models.timestamp.Timestamp( - indices = [ - 56 - ], - seconds = 56, - text = '', ) - ], - urls = [ - twitter_openapi_python_generated.models.url.Url( - display_url = '', - expanded_url = '', - indices = , - url = '', ) - ], - user_mentions = [ - { } - ], ), - extended_entities = twitter_openapi_python_generated.models.extended_entities.ExtendedEntities( - media = [ - twitter_openapi_python_generated.models.media_extended.MediaExtended( - display_url = '', - expanded_url = '', - ext_alt_text = '', - features = twitter_openapi_python_generated.models.features.features(), - id_str = '4', - indices = , - media_stats = twitter_openapi_python_generated.models.media_stats.MediaStats( - view_count = 56, ), - media_key = '', - media_url_https = '', - original_info = twitter_openapi_python_generated.models.media_original_info.MediaOriginalInfo( - height = 56, - width = 56, ), - sizes = twitter_openapi_python_generated.models.media_sizes.MediaSizes( - large = , - medium = , - small = , - thumb = , ), - source_status_id_str = '4', - source_user_id_str = '4', - type = 'photo', - url = '', ) - ], ), - favorite_count = 56, - favorited = True, - full_text = '', - id_str = '4', - in_reply_to_screen_name = '', - in_reply_to_status_id_str = '4', - in_reply_to_user_id_str = '4', - is_quote_status = True, - lang = '', - limited_actions = 'limited_replies', - place = { }, - possibly_sensitive = True, - possibly_sensitive_editable = True, - quote_count = 56, - quoted_status_id_str = '4', - quoted_status_permalink = twitter_openapi_python_generated.models.quoted_status_permalink.QuotedStatusPermalink( - display = '', - expanded = '', - url = '', ), - reply_count = 56, - retweet_count = 56, - retweeted = True, - retweeted_status_result = twitter_openapi_python_generated.models.item_result.ItemResult(), - scopes = twitter_openapi_python_generated.models.tweet_legacy_scopes.TweetLegacyScopes( - followers = True, ), - self_thread = twitter_openapi_python_generated.models.self_thread.SelfThread( - id_str = '4', ), - user_id_str = '4', ), - note_tweet = twitter_openapi_python_generated.models.note_tweet.NoteTweet( - is_expandable = True, - note_tweet_results = twitter_openapi_python_generated.models.note_tweet_result.NoteTweetResult( - result = twitter_openapi_python_generated.models.note_tweet_result_data.NoteTweetResultData( - entity_set = twitter_openapi_python_generated.models.entities.Entities( - hashtags = [ - { } - ], - symbols = [ - { } - ], - urls = [ - twitter_openapi_python_generated.models.url.Url( - display_url = '', - expanded_url = '', - indices = , - url = '', ) - ], - user_mentions = [ - { } - ], ), - id = 'zA9LCSLv1C1ylmgd0/Y2TA5TkIRHRRA401iz1CiIykN3HUO6XMsJPGh8AsaLONiNuo2ZPKNpkAmJHONf1Elbsh0SR//=', - richtext = twitter_openapi_python_generated.models.note_tweet_result_rich_text.NoteTweetResultRichText( - richtext_tags = [ - twitter_openapi_python_generated.models.note_tweet_result_rich_text_tag.NoteTweetResultRichTextTag( - from_index = 56, - richtext_types = [ - 'Bold' - ], - to_index = 56, ) - ], ), - text = '', ), ), ), - previous_counts = twitter_openapi_python_generated.models.tweet_previous_counts.TweetPreviousCounts( - bookmark_count = 56, - favorite_count = 56, - quote_count = 56, - reply_count = 56, - retweet_count = 56, ), - quick_promote_eligibility = twitter_openapi_python_generated.models.quick_promote_eligibility.quick_promote_eligibility(), - quoted_ref_result = twitter_openapi_python_generated.models.quoted_ref_result.QuotedRefResult(), - quoted_status_result = twitter_openapi_python_generated.models.item_result.ItemResult(), - rest_id = '4', - source = '', - super_follows_reply_user_result = twitter_openapi_python_generated.models.super_follows_reply_user_result.SuperFollowsReplyUserResult( - result = twitter_openapi_python_generated.models.super_follows_reply_user_result_data.SuperFollowsReplyUserResultData( - __typename = , - legacy = twitter_openapi_python_generated.models.super_follows_reply_user_result_legacy.SuperFollowsReplyUserResultLegacy( - screen_name = '', ), ), ), - unified_card = twitter_openapi_python_generated.models.unified_card.UnifiedCard( - card_fetch_state = 'NoCard', ), - unmention_data = { }, - views = twitter_openapi_python_generated.models.tweet_view.TweetView( - count = '4', - state = 'Enabled', ), ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_create_tweet_response_result.py b/twitter_openapi_python_generated/test/test_create_tweet_response_result.py index da89c83d..76bfec75 100644 --- a/twitter_openapi_python_generated/test/test_create_tweet_response_result.py +++ b/twitter_openapi_python_generated/test/test_create_tweet_response_result.py @@ -75,8 +75,7 @@ def make_instance(self, include_optional) -> CreateTweetResponseResult: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -515,8 +514,7 @@ def make_instance(self, include_optional) -> CreateTweetResponseResult: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_delete_bookmark_response.py b/twitter_openapi_python_generated/test/test_delete_bookmark_response.py index d85d90b1..bcf3a9a7 100644 --- a/twitter_openapi_python_generated/test/test_delete_bookmark_response.py +++ b/twitter_openapi_python_generated/test/test_delete_bookmark_response.py @@ -37,7 +37,34 @@ def make_instance(self, include_optional) -> DeleteBookmarkResponse: if include_optional: return DeleteBookmarkResponse( data = twitter_openapi_python_generated.models.delete_bookmark_response_data.DeleteBookmarkResponseData( - tweet_bookmark_delete = '', ) + tweet_bookmark_delete = '', ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return DeleteBookmarkResponse( diff --git a/twitter_openapi_python_generated/test/test_delete_bookmark_response_data.py b/twitter_openapi_python_generated/test/test_delete_bookmark_response_data.py index 9bce3343..f891de37 100644 --- a/twitter_openapi_python_generated/test/test_delete_bookmark_response_data.py +++ b/twitter_openapi_python_generated/test/test_delete_bookmark_response_data.py @@ -40,7 +40,6 @@ def make_instance(self, include_optional) -> DeleteBookmarkResponseData: ) else: return DeleteBookmarkResponseData( - tweet_bookmark_delete = '', ) """ diff --git a/twitter_openapi_python_generated/test/test_delete_retweet_response.py b/twitter_openapi_python_generated/test/test_delete_retweet_response.py index 9db4268f..f6473530 100644 --- a/twitter_openapi_python_generated/test/test_delete_retweet_response.py +++ b/twitter_openapi_python_generated/test/test_delete_retweet_response.py @@ -37,22 +37,53 @@ def make_instance(self, include_optional) -> DeleteRetweetResponse: if include_optional: return DeleteRetweetResponse( data = twitter_openapi_python_generated.models.delete_retweet_response_data.DeleteRetweetResponseData( - create_retweet = twitter_openapi_python_generated.models.create_retweet_response_result.CreateRetweetResponseResult( - retweet_results = twitter_openapi_python_generated.models.create_retweet.CreateRetweet( - result = twitter_openapi_python_generated.models.retweet.Retweet( - legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( - full_text = '', ), - rest_id = '4', ), ), ), ) + create_retweet = twitter_openapi_python_generated.models.delete_retweet_response_result.DeleteRetweetResponseResult( + retweet_results = twitter_openapi_python_generated.models.delete_retweet.DeleteRetweet( + result = [ + twitter_openapi_python_generated.models.retweet.Retweet( + legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( + full_text = '', ), + rest_id = '4', ) + ], ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return DeleteRetweetResponse( data = twitter_openapi_python_generated.models.delete_retweet_response_data.DeleteRetweetResponseData( - create_retweet = twitter_openapi_python_generated.models.create_retweet_response_result.CreateRetweetResponseResult( - retweet_results = twitter_openapi_python_generated.models.create_retweet.CreateRetweet( - result = twitter_openapi_python_generated.models.retweet.Retweet( - legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( - full_text = '', ), - rest_id = '4', ), ), ), ), + create_retweet = twitter_openapi_python_generated.models.delete_retweet_response_result.DeleteRetweetResponseResult( + retweet_results = twitter_openapi_python_generated.models.delete_retweet.DeleteRetweet( + result = [ + twitter_openapi_python_generated.models.retweet.Retweet( + legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( + full_text = '', ), + rest_id = '4', ) + ], ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_delete_retweet_response_data.py b/twitter_openapi_python_generated/test/test_delete_retweet_response_data.py index 76a8fe67..fd7d8b6f 100644 --- a/twitter_openapi_python_generated/test/test_delete_retweet_response_data.py +++ b/twitter_openapi_python_generated/test/test_delete_retweet_response_data.py @@ -36,12 +36,14 @@ def make_instance(self, include_optional) -> DeleteRetweetResponseData: model = DeleteRetweetResponseData() if include_optional: return DeleteRetweetResponseData( - create_retweet = twitter_openapi_python_generated.models.create_retweet_response_result.CreateRetweetResponseResult( - retweet_results = twitter_openapi_python_generated.models.create_retweet.CreateRetweet( - result = twitter_openapi_python_generated.models.retweet.Retweet( - legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( - full_text = '', ), - rest_id = '4', ), ), ) + create_retweet = twitter_openapi_python_generated.models.delete_retweet_response_result.DeleteRetweetResponseResult( + retweet_results = twitter_openapi_python_generated.models.delete_retweet.DeleteRetweet( + result = [ + twitter_openapi_python_generated.models.retweet.Retweet( + legacy = twitter_openapi_python_generated.models.retweet_legacy.Retweet_legacy( + full_text = '', ), + rest_id = '4', ) + ], ), ) ) else: return DeleteRetweetResponseData( diff --git a/twitter_openapi_python_generated/test/test_delete_tweet_response.py b/twitter_openapi_python_generated/test/test_delete_tweet_response.py index ce4e54a8..5002d0c5 100644 --- a/twitter_openapi_python_generated/test/test_delete_tweet_response.py +++ b/twitter_openapi_python_generated/test/test_delete_tweet_response.py @@ -38,7 +38,34 @@ def make_instance(self, include_optional) -> DeleteTweetResponse: return DeleteTweetResponse( data = twitter_openapi_python_generated.models.delete_tweet_response_data.DeleteTweetResponseData( delete_retweet = twitter_openapi_python_generated.models.delete_tweet_response_result.DeleteTweetResponseResult( - tweet_results = twitter_openapi_python_generated.models.tweet_results.tweet_results(), ), ) + tweet_results = twitter_openapi_python_generated.models.tweet_results.tweet_results(), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return DeleteTweetResponse( diff --git a/twitter_openapi_python_generated/test/test_error.py b/twitter_openapi_python_generated/test/test_error_response.py similarity index 83% rename from twitter_openapi_python_generated/test/test_error.py rename to twitter_openapi_python_generated/test/test_error_response.py index cd4a3e52..daa1ff67 100644 --- a/twitter_openapi_python_generated/test/test_error.py +++ b/twitter_openapi_python_generated/test/test_error_response.py @@ -15,10 +15,10 @@ import unittest -from twitter_openapi_python_generated.models.error import Error +from twitter_openapi_python_generated.models.error_response import ErrorResponse -class TestError(unittest.TestCase): - """Error unit test stubs""" +class TestErrorResponse(unittest.TestCase): + """ErrorResponse unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Error: - """Test Error + def make_instance(self, include_optional) -> ErrorResponse: + """Test ErrorResponse include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Error` + # uncomment below to create an instance of `ErrorResponse` """ - model = Error() + model = ErrorResponse() if include_optional: - return Error( + return ErrorResponse( code = 56, extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( code = 56, @@ -54,7 +54,7 @@ def make_instance(self, include_optional) -> Error: message = '', name = '', path = [ - '' + null ], retry_after = 56, source = '', @@ -62,7 +62,7 @@ def make_instance(self, include_optional) -> Error: trace_id = 'bf325375e030fccb', ) ) else: - return Error( + return ErrorResponse( code = 56, extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( code = 56, @@ -81,7 +81,7 @@ def make_instance(self, include_optional) -> Error: message = '', name = '', path = [ - '' + null ], source = '', tracing = twitter_openapi_python_generated.models.tracing.Tracing( @@ -89,8 +89,8 @@ def make_instance(self, include_optional) -> Error: ) """ - def testError(self): - """Test Error""" + def testErrorResponse(self): + """Test ErrorResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/twitter_openapi_python_generated/test/test_errors_data.py b/twitter_openapi_python_generated/test/test_errors_data.py deleted file mode 100644 index 39ed8f92..00000000 --- a/twitter_openapi_python_generated/test/test_errors_data.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.errors_data import ErrorsData - -class TestErrorsData(unittest.TestCase): - """ErrorsData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ErrorsData: - """Test ErrorsData - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ErrorsData` - """ - model = ErrorsData() - if include_optional: - return ErrorsData( - user = 'dummy' - ) - else: - return ErrorsData( - ) - """ - - def testErrorsData(self): - """Test ErrorsData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_favorite_tweet.py b/twitter_openapi_python_generated/test/test_favorite_tweet.py index 792ee571..a0d3a418 100644 --- a/twitter_openapi_python_generated/test/test_favorite_tweet.py +++ b/twitter_openapi_python_generated/test/test_favorite_tweet.py @@ -40,7 +40,6 @@ def make_instance(self, include_optional) -> FavoriteTweet: ) else: return FavoriteTweet( - favorite_tweet = '', ) """ diff --git a/twitter_openapi_python_generated/test/test_errors.py b/twitter_openapi_python_generated/test/test_favorite_tweet_response.py similarity index 52% rename from twitter_openapi_python_generated/test/test_errors.py rename to twitter_openapi_python_generated/test/test_favorite_tweet_response.py index 9efac09f..134bdfde 100644 --- a/twitter_openapi_python_generated/test/test_errors.py +++ b/twitter_openapi_python_generated/test/test_favorite_tweet_response.py @@ -15,10 +15,10 @@ import unittest -from twitter_openapi_python_generated.models.errors import Errors +from twitter_openapi_python_generated.models.favorite_tweet_response import FavoriteTweetResponse -class TestErrors(unittest.TestCase): - """Errors unit test stubs""" +class TestFavoriteTweetResponse(unittest.TestCase): + """FavoriteTweetResponse unit test stubs""" def setUp(self): pass @@ -26,20 +26,20 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Errors: - """Test Errors + def make_instance(self, include_optional) -> FavoriteTweetResponse: + """Test FavoriteTweetResponse include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Errors` + # uncomment below to create an instance of `FavoriteTweetResponse` """ - model = Errors() + model = FavoriteTweetResponse() if include_optional: - return Errors( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), + return FavoriteTweetResponse( + data = twitter_openapi_python_generated.models.favorite_tweet.FavoriteTweet( + favorite_tweet = '', ), errors = [ - twitter_openapi_python_generated.models.error.Error( + twitter_openapi_python_generated.models.error_response.ErrorResponse( code = 56, extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( code = 56, @@ -58,7 +58,7 @@ def make_instance(self, include_optional) -> Errors: message = '', name = '', path = [ - '' + null ], retry_after = 56, source = '', @@ -67,39 +67,14 @@ def make_instance(self, include_optional) -> Errors: ] ) else: - return Errors( - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], + return FavoriteTweetResponse( + data = twitter_openapi_python_generated.models.favorite_tweet.FavoriteTweet( + favorite_tweet = '', ), ) """ - def testErrors(self): - """Test Errors""" + def testFavoriteTweetResponse(self): + """Test FavoriteTweetResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/twitter_openapi_python_generated/test/test_favorite_tweet_response_data.py b/twitter_openapi_python_generated/test/test_favorite_tweet_response_data.py deleted file mode 100644 index 24cf8589..00000000 --- a/twitter_openapi_python_generated/test/test_favorite_tweet_response_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.favorite_tweet_response_data import FavoriteTweetResponseData - -class TestFavoriteTweetResponseData(unittest.TestCase): - """FavoriteTweetResponseData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FavoriteTweetResponseData: - """Test FavoriteTweetResponseData - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FavoriteTweetResponseData` - """ - model = FavoriteTweetResponseData() - if include_optional: - return FavoriteTweetResponseData( - data = twitter_openapi_python_generated.models.favorite_tweet.FavoriteTweet( - favorite_tweet = '', ) - ) - else: - return FavoriteTweetResponseData( - data = twitter_openapi_python_generated.models.favorite_tweet.FavoriteTweet( - favorite_tweet = '', ), - ) - """ - - def testFavoriteTweetResponseData(self): - """Test FavoriteTweetResponseData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_follow_response.py b/twitter_openapi_python_generated/test/test_follow_response.py index 1efd04ef..57d8bf65 100644 --- a/twitter_openapi_python_generated/test/test_follow_response.py +++ b/twitter_openapi_python_generated/test/test_follow_response.py @@ -46,7 +46,34 @@ def make_instance(self, include_optional) -> FollowResponse: null ], metadata = { }, - response_objects = { }, ), ), ), ), ) + response_objects = { }, ), ), ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return FollowResponse( diff --git a/twitter_openapi_python_generated/test/test_follow_response_data.py b/twitter_openapi_python_generated/test/test_follow_response_data.py index ab26137c..67ea663b 100644 --- a/twitter_openapi_python_generated/test/test_follow_response_data.py +++ b/twitter_openapi_python_generated/test/test_follow_response_data.py @@ -49,16 +49,6 @@ def make_instance(self, include_optional) -> FollowResponseData: ) else: return FollowResponseData( - user = twitter_openapi_python_generated.models.follow_response_user.FollowResponseUser( - result = twitter_openapi_python_generated.models.follow_response_result.FollowResponseResult( - __typename = 'TimelineTweet', - timeline = twitter_openapi_python_generated.models.follow_timeline.FollowTimeline( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_get_bookmarks200_response.py b/twitter_openapi_python_generated/test/test_get_bookmarks200_response.py deleted file mode 100644 index b68fd519..00000000 --- a/twitter_openapi_python_generated/test/test_get_bookmarks200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_bookmarks200_response import GetBookmarks200Response - -class TestGetBookmarks200Response(unittest.TestCase): - """GetBookmarks200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetBookmarks200Response: - """Test GetBookmarks200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetBookmarks200Response` - """ - model = GetBookmarks200Response() - if include_optional: - return GetBookmarks200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetBookmarks200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetBookmarks200Response(self): - """Test GetBookmarks200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_favoriters200_response.py b/twitter_openapi_python_generated/test/test_get_favoriters200_response.py deleted file mode 100644 index ea122aa4..00000000 --- a/twitter_openapi_python_generated/test/test_get_favoriters200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_favoriters200_response import GetFavoriters200Response - -class TestGetFavoriters200Response(unittest.TestCase): - """GetFavoriters200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetFavoriters200Response: - """Test GetFavoriters200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetFavoriters200Response` - """ - model = GetFavoriters200Response() - if include_optional: - return GetFavoriters200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetFavoriters200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetFavoriters200Response(self): - """Test GetFavoriters200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_followers200_response.py b/twitter_openapi_python_generated/test/test_get_followers200_response.py deleted file mode 100644 index 4159dd1e..00000000 --- a/twitter_openapi_python_generated/test/test_get_followers200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response - -class TestGetFollowers200Response(unittest.TestCase): - """GetFollowers200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetFollowers200Response: - """Test GetFollowers200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetFollowers200Response` - """ - model = GetFollowers200Response() - if include_optional: - return GetFollowers200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetFollowers200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetFollowers200Response(self): - """Test GetFollowers200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_home_latest_timeline200_response.py b/twitter_openapi_python_generated/test/test_get_home_latest_timeline200_response.py deleted file mode 100644 index 015c2676..00000000 --- a/twitter_openapi_python_generated/test/test_get_home_latest_timeline200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_home_latest_timeline200_response import GetHomeLatestTimeline200Response - -class TestGetHomeLatestTimeline200Response(unittest.TestCase): - """GetHomeLatestTimeline200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetHomeLatestTimeline200Response: - """Test GetHomeLatestTimeline200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetHomeLatestTimeline200Response` - """ - model = GetHomeLatestTimeline200Response() - if include_optional: - return GetHomeLatestTimeline200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetHomeLatestTimeline200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetHomeLatestTimeline200Response(self): - """Test GetHomeLatestTimeline200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_likes200_response.py b/twitter_openapi_python_generated/test/test_get_likes200_response.py deleted file mode 100644 index 80220304..00000000 --- a/twitter_openapi_python_generated/test/test_get_likes200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response - -class TestGetLikes200Response(unittest.TestCase): - """GetLikes200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetLikes200Response: - """Test GetLikes200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetLikes200Response` - """ - model = GetLikes200Response() - if include_optional: - return GetLikes200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetLikes200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetLikes200Response(self): - """Test GetLikes200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_list_latest_tweets_timeline200_response.py b/twitter_openapi_python_generated/test/test_get_list_latest_tweets_timeline200_response.py deleted file mode 100644 index 597c08e2..00000000 --- a/twitter_openapi_python_generated/test/test_get_list_latest_tweets_timeline200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_list_latest_tweets_timeline200_response import GetListLatestTweetsTimeline200Response - -class TestGetListLatestTweetsTimeline200Response(unittest.TestCase): - """GetListLatestTweetsTimeline200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetListLatestTweetsTimeline200Response: - """Test GetListLatestTweetsTimeline200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetListLatestTweetsTimeline200Response` - """ - model = GetListLatestTweetsTimeline200Response() - if include_optional: - return GetListLatestTweetsTimeline200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetListLatestTweetsTimeline200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetListLatestTweetsTimeline200Response(self): - """Test GetListLatestTweetsTimeline200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_profile_spotlights_query200_response.py b/twitter_openapi_python_generated/test/test_get_profile_spotlights_query200_response.py deleted file mode 100644 index 28dae400..00000000 --- a/twitter_openapi_python_generated/test/test_get_profile_spotlights_query200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_profile_spotlights_query200_response import GetProfileSpotlightsQuery200Response - -class TestGetProfileSpotlightsQuery200Response(unittest.TestCase): - """GetProfileSpotlightsQuery200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetProfileSpotlightsQuery200Response: - """Test GetProfileSpotlightsQuery200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetProfileSpotlightsQuery200Response` - """ - model = GetProfileSpotlightsQuery200Response() - if include_optional: - return GetProfileSpotlightsQuery200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetProfileSpotlightsQuery200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetProfileSpotlightsQuery200Response(self): - """Test GetProfileSpotlightsQuery200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_retweeters200_response.py b/twitter_openapi_python_generated/test/test_get_retweeters200_response.py deleted file mode 100644 index 5d40a693..00000000 --- a/twitter_openapi_python_generated/test/test_get_retweeters200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_retweeters200_response import GetRetweeters200Response - -class TestGetRetweeters200Response(unittest.TestCase): - """GetRetweeters200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetRetweeters200Response: - """Test GetRetweeters200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetRetweeters200Response` - """ - model = GetRetweeters200Response() - if include_optional: - return GetRetweeters200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetRetweeters200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetRetweeters200Response(self): - """Test GetRetweeters200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_search_timeline200_response.py b/twitter_openapi_python_generated/test/test_get_search_timeline200_response.py deleted file mode 100644 index 2dd0f2db..00000000 --- a/twitter_openapi_python_generated/test/test_get_search_timeline200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_search_timeline200_response import GetSearchTimeline200Response - -class TestGetSearchTimeline200Response(unittest.TestCase): - """GetSearchTimeline200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSearchTimeline200Response: - """Test GetSearchTimeline200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetSearchTimeline200Response` - """ - model = GetSearchTimeline200Response() - if include_optional: - return GetSearchTimeline200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetSearchTimeline200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetSearchTimeline200Response(self): - """Test GetSearchTimeline200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_tweet_detail200_response.py b/twitter_openapi_python_generated/test/test_get_tweet_detail200_response.py deleted file mode 100644 index 287a1125..00000000 --- a/twitter_openapi_python_generated/test/test_get_tweet_detail200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_tweet_detail200_response import GetTweetDetail200Response - -class TestGetTweetDetail200Response(unittest.TestCase): - """GetTweetDetail200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTweetDetail200Response: - """Test GetTweetDetail200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTweetDetail200Response` - """ - model = GetTweetDetail200Response() - if include_optional: - return GetTweetDetail200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetTweetDetail200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetTweetDetail200Response(self): - """Test GetTweetDetail200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_tweet_result_by_rest_id200_response.py b/twitter_openapi_python_generated/test/test_get_tweet_result_by_rest_id200_response.py deleted file mode 100644 index 329bbc64..00000000 --- a/twitter_openapi_python_generated/test/test_get_tweet_result_by_rest_id200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_tweet_result_by_rest_id200_response import GetTweetResultByRestId200Response - -class TestGetTweetResultByRestId200Response(unittest.TestCase): - """GetTweetResultByRestId200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetTweetResultByRestId200Response: - """Test GetTweetResultByRestId200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetTweetResultByRestId200Response` - """ - model = GetTweetResultByRestId200Response() - if include_optional: - return GetTweetResultByRestId200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetTweetResultByRestId200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetTweetResultByRestId200Response(self): - """Test GetTweetResultByRestId200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_user_by_rest_id200_response.py b/twitter_openapi_python_generated/test/test_get_user_by_rest_id200_response.py deleted file mode 100644 index 8331e733..00000000 --- a/twitter_openapi_python_generated/test/test_get_user_by_rest_id200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_user_by_rest_id200_response import GetUserByRestId200Response - -class TestGetUserByRestId200Response(unittest.TestCase): - """GetUserByRestId200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetUserByRestId200Response: - """Test GetUserByRestId200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetUserByRestId200Response` - """ - model = GetUserByRestId200Response() - if include_optional: - return GetUserByRestId200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetUserByRestId200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetUserByRestId200Response(self): - """Test GetUserByRestId200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_user_highlights_tweets200_response.py b/twitter_openapi_python_generated/test/test_get_user_highlights_tweets200_response.py deleted file mode 100644 index bf7671a9..00000000 --- a/twitter_openapi_python_generated/test/test_get_user_highlights_tweets200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_user_highlights_tweets200_response import GetUserHighlightsTweets200Response - -class TestGetUserHighlightsTweets200Response(unittest.TestCase): - """GetUserHighlightsTweets200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetUserHighlightsTweets200Response: - """Test GetUserHighlightsTweets200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetUserHighlightsTweets200Response` - """ - model = GetUserHighlightsTweets200Response() - if include_optional: - return GetUserHighlightsTweets200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetUserHighlightsTweets200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetUserHighlightsTweets200Response(self): - """Test GetUserHighlightsTweets200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_get_users_by_rest_ids200_response.py b/twitter_openapi_python_generated/test/test_get_users_by_rest_ids200_response.py deleted file mode 100644 index ff56a908..00000000 --- a/twitter_openapi_python_generated/test/test_get_users_by_rest_ids200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.get_users_by_rest_ids200_response import GetUsersByRestIds200Response - -class TestGetUsersByRestIds200Response(unittest.TestCase): - """GetUsersByRestIds200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetUsersByRestIds200Response: - """Test GetUsersByRestIds200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetUsersByRestIds200Response` - """ - model = GetUsersByRestIds200Response() - if include_optional: - return GetUsersByRestIds200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return GetUsersByRestIds200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testGetUsersByRestIds200Response(self): - """Test GetUsersByRestIds200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_home_timeline_response_data.py b/twitter_openapi_python_generated/test/test_home_timeline_response_data.py index 05659848..3b54400f 100644 --- a/twitter_openapi_python_generated/test/test_home_timeline_response_data.py +++ b/twitter_openapi_python_generated/test/test_home_timeline_response_data.py @@ -46,13 +46,6 @@ def make_instance(self, include_optional) -> HomeTimelineResponseData: ) else: return HomeTimelineResponseData( - home = twitter_openapi_python_generated.models.home_timeline_home.HomeTimelineHome( - home_timeline_urt = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_list_latest_tweets_timeline_response.py b/twitter_openapi_python_generated/test/test_list_latest_tweets_timeline_response.py index 6526be3b..d2d0401b 100644 --- a/twitter_openapi_python_generated/test/test_list_latest_tweets_timeline_response.py +++ b/twitter_openapi_python_generated/test/test_list_latest_tweets_timeline_response.py @@ -44,7 +44,34 @@ def make_instance(self, include_optional) -> ListLatestTweetsTimelineResponse: null ], metadata = { }, - response_objects = { }, ), ), ), ) + response_objects = { }, ), ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return ListLatestTweetsTimelineResponse( diff --git a/twitter_openapi_python_generated/test/test_list_tweets_timeline_data.py b/twitter_openapi_python_generated/test/test_list_tweets_timeline_data.py index f96856d4..1d5316ff 100644 --- a/twitter_openapi_python_generated/test/test_list_tweets_timeline_data.py +++ b/twitter_openapi_python_generated/test/test_list_tweets_timeline_data.py @@ -47,14 +47,6 @@ def make_instance(self, include_optional) -> ListTweetsTimelineData: ) else: return ListTweetsTimelineData( - list = twitter_openapi_python_generated.models.list_tweets_timeline_list.ListTweetsTimelineList( - tweets_timeline = twitter_openapi_python_generated.models.list_tweets_timeline.ListTweetsTimeline( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_other_response.py b/twitter_openapi_python_generated/test/test_other_object_all.py similarity index 80% rename from twitter_openapi_python_generated/test/test_other_response.py rename to twitter_openapi_python_generated/test/test_other_object_all.py index 75df67a6..2d5c0011 100644 --- a/twitter_openapi_python_generated/test/test_other_response.py +++ b/twitter_openapi_python_generated/test/test_other_object_all.py @@ -15,10 +15,10 @@ import unittest -from twitter_openapi_python_generated.models.other_response import OtherResponse +from twitter_openapi_python_generated.models.other_object_all import OtherObjectAll -class TestOtherResponse(unittest.TestCase): - """OtherResponse unit test stubs""" +class TestOtherObjectAll(unittest.TestCase): + """OtherObjectAll unit test stubs""" def setUp(self): pass @@ -26,16 +26,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OtherResponse: - """Test OtherResponse + def make_instance(self, include_optional) -> OtherObjectAll: + """Test OtherObjectAll include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OtherResponse` + # uncomment below to create an instance of `OtherObjectAll` """ - model = OtherResponse() + model = OtherObjectAll() if include_optional: - return OtherResponse( + return OtherObjectAll( session = twitter_openapi_python_generated.models.session.Session( sso_init_tokens = twitter_openapi_python_generated.models.sso_init_tokens.SsoInitTokens(), communities_actions = twitter_openapi_python_generated.models.communities_actions.CommunitiesActions( @@ -56,12 +56,12 @@ def make_instance(self, include_optional) -> OtherResponse: user_id = '4', ) ) else: - return OtherResponse( + return OtherObjectAll( ) """ - def testOtherResponse(self): - """Test OtherResponse""" + def testOtherObjectAll(self): + """Test OtherObjectAll""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/twitter_openapi_python_generated/test/test_post_create_bookmark200_response.py b/twitter_openapi_python_generated/test/test_post_create_bookmark200_response.py deleted file mode 100644 index 0dae7695..00000000 --- a/twitter_openapi_python_generated/test/test_post_create_bookmark200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response - -class TestPostCreateBookmark200Response(unittest.TestCase): - """PostCreateBookmark200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCreateBookmark200Response: - """Test PostCreateBookmark200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCreateBookmark200Response` - """ - model = PostCreateBookmark200Response() - if include_optional: - return PostCreateBookmark200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostCreateBookmark200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostCreateBookmark200Response(self): - """Test PostCreateBookmark200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_post_create_retweet200_response.py b/twitter_openapi_python_generated/test/test_post_create_retweet200_response.py deleted file mode 100644 index 2b09bdfd..00000000 --- a/twitter_openapi_python_generated/test/test_post_create_retweet200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_create_retweet200_response import PostCreateRetweet200Response - -class TestPostCreateRetweet200Response(unittest.TestCase): - """PostCreateRetweet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCreateRetweet200Response: - """Test PostCreateRetweet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCreateRetweet200Response` - """ - model = PostCreateRetweet200Response() - if include_optional: - return PostCreateRetweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostCreateRetweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostCreateRetweet200Response(self): - """Test PostCreateRetweet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_post_create_tweet200_response.py b/twitter_openapi_python_generated/test/test_post_create_tweet200_response.py deleted file mode 100644 index 022287be..00000000 --- a/twitter_openapi_python_generated/test/test_post_create_tweet200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_create_tweet200_response import PostCreateTweet200Response - -class TestPostCreateTweet200Response(unittest.TestCase): - """PostCreateTweet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostCreateTweet200Response: - """Test PostCreateTweet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostCreateTweet200Response` - """ - model = PostCreateTweet200Response() - if include_optional: - return PostCreateTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostCreateTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostCreateTweet200Response(self): - """Test PostCreateTweet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_post_delete_bookmark200_response.py b/twitter_openapi_python_generated/test/test_post_delete_bookmark200_response.py deleted file mode 100644 index 2c9b2bc3..00000000 --- a/twitter_openapi_python_generated/test/test_post_delete_bookmark200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_delete_bookmark200_response import PostDeleteBookmark200Response - -class TestPostDeleteBookmark200Response(unittest.TestCase): - """PostDeleteBookmark200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeleteBookmark200Response: - """Test PostDeleteBookmark200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeleteBookmark200Response` - """ - model = PostDeleteBookmark200Response() - if include_optional: - return PostDeleteBookmark200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostDeleteBookmark200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostDeleteBookmark200Response(self): - """Test PostDeleteBookmark200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_post_delete_retweet200_response.py b/twitter_openapi_python_generated/test/test_post_delete_retweet200_response.py deleted file mode 100644 index 01854dec..00000000 --- a/twitter_openapi_python_generated/test/test_post_delete_retweet200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_delete_retweet200_response import PostDeleteRetweet200Response - -class TestPostDeleteRetweet200Response(unittest.TestCase): - """PostDeleteRetweet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeleteRetweet200Response: - """Test PostDeleteRetweet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeleteRetweet200Response` - """ - model = PostDeleteRetweet200Response() - if include_optional: - return PostDeleteRetweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostDeleteRetweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostDeleteRetweet200Response(self): - """Test PostDeleteRetweet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_post_delete_tweet200_response.py b/twitter_openapi_python_generated/test/test_post_delete_tweet200_response.py deleted file mode 100644 index 134d6eac..00000000 --- a/twitter_openapi_python_generated/test/test_post_delete_tweet200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_delete_tweet200_response import PostDeleteTweet200Response - -class TestPostDeleteTweet200Response(unittest.TestCase): - """PostDeleteTweet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostDeleteTweet200Response: - """Test PostDeleteTweet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostDeleteTweet200Response` - """ - model = PostDeleteTweet200Response() - if include_optional: - return PostDeleteTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostDeleteTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostDeleteTweet200Response(self): - """Test PostDeleteTweet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_post_favorite_tweet200_response.py b/twitter_openapi_python_generated/test/test_post_favorite_tweet200_response.py deleted file mode 100644 index a92055c3..00000000 --- a/twitter_openapi_python_generated/test/test_post_favorite_tweet200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_favorite_tweet200_response import PostFavoriteTweet200Response - -class TestPostFavoriteTweet200Response(unittest.TestCase): - """PostFavoriteTweet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostFavoriteTweet200Response: - """Test PostFavoriteTweet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostFavoriteTweet200Response` - """ - model = PostFavoriteTweet200Response() - if include_optional: - return PostFavoriteTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostFavoriteTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostFavoriteTweet200Response(self): - """Test PostFavoriteTweet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_post_unfavorite_tweet200_response.py b/twitter_openapi_python_generated/test/test_post_unfavorite_tweet200_response.py deleted file mode 100644 index 4e1ada66..00000000 --- a/twitter_openapi_python_generated/test/test_post_unfavorite_tweet200_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.post_unfavorite_tweet200_response import PostUnfavoriteTweet200Response - -class TestPostUnfavoriteTweet200Response(unittest.TestCase): - """PostUnfavoriteTweet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> PostUnfavoriteTweet200Response: - """Test PostUnfavoriteTweet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `PostUnfavoriteTweet200Response` - """ - model = PostUnfavoriteTweet200Response() - if include_optional: - return PostUnfavoriteTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ] - ) - else: - return PostUnfavoriteTweet200Response( - data = twitter_openapi_python_generated.models.errors_data.ErrorsData( - user = 'dummy', ), - errors = [ - twitter_openapi_python_generated.models.error.Error( - code = 56, - extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( - code = 56, - kind = '', - name = '', - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ), - kind = '', - locations = [ - twitter_openapi_python_generated.models.location.Location( - column = 56, - line = 56, ) - ], - message = '', - name = '', - path = [ - '' - ], - retry_after = 56, - source = '', - tracing = twitter_openapi_python_generated.models.tracing.Tracing( - trace_id = 'bf325375e030fccb', ), ) - ], - ) - """ - - def testPostUnfavoriteTweet200Response(self): - """Test PostUnfavoriteTweet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_profile_response.py b/twitter_openapi_python_generated/test/test_profile_response.py index 6c782d99..e358f799 100644 --- a/twitter_openapi_python_generated/test/test_profile_response.py +++ b/twitter_openapi_python_generated/test/test_profile_response.py @@ -51,7 +51,34 @@ def make_instance(self, include_optional) -> ProfileResponse: protected = True, screen_name = '', ), profilemodules = { }, - rest_id = '4', ), ), ) + rest_id = '4', ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return ProfileResponse( diff --git a/twitter_openapi_python_generated/test/test_profile_response_data.py b/twitter_openapi_python_generated/test/test_profile_response_data.py index 837a9a6c..28148b9e 100644 --- a/twitter_openapi_python_generated/test/test_profile_response_data.py +++ b/twitter_openapi_python_generated/test/test_profile_response_data.py @@ -54,21 +54,6 @@ def make_instance(self, include_optional) -> ProfileResponseData: ) else: return ProfileResponseData( - user_result_by_screen_name = twitter_openapi_python_generated.models.user_result_by_screen_name.UserResultByScreenName( - id = 'zA9LCSLv1C1ylmgd0/Y2TA5TkIRHRRA401iz1CiIykN3HUO6XMsJPGh8AsaLONiNuo2ZPKNpkAmJHONf1Elbsh0SR//=', - result = twitter_openapi_python_generated.models.user_result_by_screen_name_result.UserResultByScreenNameResult( - __typename = 'TimelineTweet', - id = 'G', - legacy = twitter_openapi_python_generated.models.user_result_by_screen_name_legacy.UserResultByScreenNameLegacy( - blocked_by = True, - blocking = True, - followed_by = True, - following = True, - name = '', - protected = True, - screen_name = '', ), - profilemodules = { }, - rest_id = '4', ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_search_timeline_data.py b/twitter_openapi_python_generated/test/test_search_timeline_data.py index 4dda23a2..16d23fa1 100644 --- a/twitter_openapi_python_generated/test/test_search_timeline_data.py +++ b/twitter_openapi_python_generated/test/test_search_timeline_data.py @@ -47,14 +47,6 @@ def make_instance(self, include_optional) -> SearchTimelineData: ) else: return SearchTimelineData( - search_by_raw_query = twitter_openapi_python_generated.models.search_by_raw_query.SearchByRawQuery( - search_timeline = twitter_openapi_python_generated.models.search_timeline.SearchTimeline( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_search_timeline_response.py b/twitter_openapi_python_generated/test/test_search_timeline_response.py index 89aa97dc..ec9f6362 100644 --- a/twitter_openapi_python_generated/test/test_search_timeline_response.py +++ b/twitter_openapi_python_generated/test/test_search_timeline_response.py @@ -44,7 +44,34 @@ def make_instance(self, include_optional) -> SearchTimelineResponse: null ], metadata = { }, - response_objects = { }, ), ), ), ) + response_objects = { }, ), ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return SearchTimelineResponse( diff --git a/twitter_openapi_python_generated/test/test_sensitive_media_warning.py b/twitter_openapi_python_generated/test/test_sensitive_media_warning.py index f318bae0..397229e8 100644 --- a/twitter_openapi_python_generated/test/test_sensitive_media_warning.py +++ b/twitter_openapi_python_generated/test/test_sensitive_media_warning.py @@ -42,9 +42,6 @@ def make_instance(self, include_optional) -> SensitiveMediaWarning: ) else: return SensitiveMediaWarning( - adult_content = True, - graphic_violence = True, - other = True, ) """ diff --git a/twitter_openapi_python_generated/test/test_timeline_response.py b/twitter_openapi_python_generated/test/test_timeline_response.py index dedd75dd..c8572271 100644 --- a/twitter_openapi_python_generated/test/test_timeline_response.py +++ b/twitter_openapi_python_generated/test/test_timeline_response.py @@ -43,7 +43,34 @@ def make_instance(self, include_optional) -> TimelineResponse: null ], metadata = { }, - response_objects = { }, ), ), ) + response_objects = { }, ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return TimelineResponse( diff --git a/twitter_openapi_python_generated/test/test_tweet.py b/twitter_openapi_python_generated/test/test_tweet.py index ec321143..8a31a2e8 100644 --- a/twitter_openapi_python_generated/test/test_tweet.py +++ b/twitter_openapi_python_generated/test/test_tweet.py @@ -74,8 +74,7 @@ def make_instance(self, include_optional) -> Tweet: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -203,10 +202,9 @@ def make_instance(self, include_optional) -> Tweet: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = 'TimelineTweet', ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( - __typename = , + __typename = 'TimelineTweet', message = '', reason = 'ViewerNotMember', ), pin_action_result = twitter_openapi_python_generated.models.community_pin_action_result.CommunityPinActionResult( @@ -223,8 +221,7 @@ def make_instance(self, include_optional) -> Tweet: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_tweet_detail_response.py b/twitter_openapi_python_generated/test/test_tweet_detail_response.py index 0862626f..e94bd34b 100644 --- a/twitter_openapi_python_generated/test/test_tweet_detail_response.py +++ b/twitter_openapi_python_generated/test/test_tweet_detail_response.py @@ -42,7 +42,34 @@ def make_instance(self, include_optional) -> TweetDetailResponse: null ], metadata = { }, - response_objects = { }, ), ) + response_objects = { }, ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return TweetDetailResponse( diff --git a/twitter_openapi_python_generated/test/test_tweet_detail_response_data.py b/twitter_openapi_python_generated/test/test_tweet_detail_response_data.py index b64ac6b4..4a27ddbc 100644 --- a/twitter_openapi_python_generated/test/test_tweet_detail_response_data.py +++ b/twitter_openapi_python_generated/test/test_tweet_detail_response_data.py @@ -45,12 +45,6 @@ def make_instance(self, include_optional) -> TweetDetailResponseData: ) else: return TweetDetailResponseData( - threaded_conversation_with_injections_v2 = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ) """ diff --git a/twitter_openapi_python_generated/test/test_tweet_favoriters_response.py b/twitter_openapi_python_generated/test/test_tweet_favoriters_response.py index a79adba3..56fb55e8 100644 --- a/twitter_openapi_python_generated/test/test_tweet_favoriters_response.py +++ b/twitter_openapi_python_generated/test/test_tweet_favoriters_response.py @@ -43,7 +43,34 @@ def make_instance(self, include_optional) -> TweetFavoritersResponse: null ], metadata = { }, - response_objects = { }, ), ), ) + response_objects = { }, ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return TweetFavoritersResponse( diff --git a/twitter_openapi_python_generated/test/test_tweet_favoriters_response_data.py b/twitter_openapi_python_generated/test/test_tweet_favoriters_response_data.py index 11829e43..8fe07738 100644 --- a/twitter_openapi_python_generated/test/test_tweet_favoriters_response_data.py +++ b/twitter_openapi_python_generated/test/test_tweet_favoriters_response_data.py @@ -46,13 +46,6 @@ def make_instance(self, include_optional) -> TweetFavoritersResponseData: ) else: return TweetFavoritersResponseData( - favoriters_timeline = twitter_openapi_python_generated.models.timeline_v2.TimelineV2( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_data.py b/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_data.py index 7805b75d..5aab14be 100644 --- a/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_data.py +++ b/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_data.py @@ -42,9 +42,6 @@ def make_instance(self, include_optional) -> TweetResultByRestIdData: ) else: return TweetResultByRestIdData( - tweet_result = twitter_openapi_python_generated.models.item_result.ItemResult( - __typename = 'TimelineTweet', - result = null, ), ) """ diff --git a/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_response.py b/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_response.py index 85bc1cc5..4afbc1dd 100644 --- a/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_response.py +++ b/twitter_openapi_python_generated/test/test_tweet_result_by_rest_id_response.py @@ -39,7 +39,34 @@ def make_instance(self, include_optional) -> TweetResultByRestIdResponse: data = twitter_openapi_python_generated.models.tweet_result_by_rest_id_data.TweetResultByRestIdData( tweet_result = twitter_openapi_python_generated.models.item_result.ItemResult( __typename = 'TimelineTweet', - result = null, ), ) + result = null, ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return TweetResultByRestIdResponse( diff --git a/twitter_openapi_python_generated/test/test_tweet_retweeters_response.py b/twitter_openapi_python_generated/test/test_tweet_retweeters_response.py index 24b128ce..2934e76f 100644 --- a/twitter_openapi_python_generated/test/test_tweet_retweeters_response.py +++ b/twitter_openapi_python_generated/test/test_tweet_retweeters_response.py @@ -43,7 +43,34 @@ def make_instance(self, include_optional) -> TweetRetweetersResponse: null ], metadata = { }, - response_objects = { }, ), ), ) + response_objects = { }, ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return TweetRetweetersResponse( diff --git a/twitter_openapi_python_generated/test/test_tweet_retweeters_response_data.py b/twitter_openapi_python_generated/test/test_tweet_retweeters_response_data.py index 1620f5bf..a3a44d09 100644 --- a/twitter_openapi_python_generated/test/test_tweet_retweeters_response_data.py +++ b/twitter_openapi_python_generated/test/test_tweet_retweeters_response_data.py @@ -46,13 +46,6 @@ def make_instance(self, include_optional) -> TweetRetweetersResponseData: ) else: return TweetRetweetersResponseData( - retweeters_timeline = twitter_openapi_python_generated.models.timeline_v2.TimelineV2( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_tweet_union.py b/twitter_openapi_python_generated/test/test_tweet_union.py index 0876f2af..1f142557 100644 --- a/twitter_openapi_python_generated/test/test_tweet_union.py +++ b/twitter_openapi_python_generated/test/test_tweet_union.py @@ -74,8 +74,7 @@ def make_instance(self, include_optional) -> TweetUnion: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -203,10 +202,9 @@ def make_instance(self, include_optional) -> TweetUnion: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = 'TimelineTweet', ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( - __typename = , + __typename = 'TimelineTweet', message = '', reason = 'ViewerNotMember', ), pin_action_result = twitter_openapi_python_generated.models.community_pin_action_result.CommunityPinActionResult( @@ -223,8 +221,7 @@ def make_instance(self, include_optional) -> TweetUnion: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = 'TimelineTweet', reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -672,8 +669,7 @@ def make_instance(self, include_optional) -> TweetUnion: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -1141,8 +1137,7 @@ def make_instance(self, include_optional) -> TweetUnion: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_tweet_with_visibility_results.py b/twitter_openapi_python_generated/test/test_tweet_with_visibility_results.py index 42ef2180..89086610 100644 --- a/twitter_openapi_python_generated/test/test_tweet_with_visibility_results.py +++ b/twitter_openapi_python_generated/test/test_tweet_with_visibility_results.py @@ -103,8 +103,7 @@ def make_instance(self, include_optional) -> TweetWithVisibilityResults: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', @@ -570,8 +569,7 @@ def make_instance(self, include_optional) -> TweetWithVisibilityResults: delete_action_result = twitter_openapi_python_generated.models.community_delete_action_result.CommunityDeleteActionResult( __typename = , reason = 'Unavailable', ), - join_action_result = twitter_openapi_python_generated.models.community_join_action_result.CommunityJoinActionResult( - __typename = , ), + join_action_result = null, leave_action_result = twitter_openapi_python_generated.models.community_leave_action_result.CommunityLeaveActionResult( __typename = , message = '', diff --git a/twitter_openapi_python_generated/test/test_unfavorite_tweet.py b/twitter_openapi_python_generated/test/test_unfavorite_tweet.py index 5f281885..97dac06b 100644 --- a/twitter_openapi_python_generated/test/test_unfavorite_tweet.py +++ b/twitter_openapi_python_generated/test/test_unfavorite_tweet.py @@ -40,7 +40,6 @@ def make_instance(self, include_optional) -> UnfavoriteTweet: ) else: return UnfavoriteTweet( - unfavorite_tweet = '', ) """ diff --git a/twitter_openapi_python_generated/test/test_unfavorite_tweet_response.py b/twitter_openapi_python_generated/test/test_unfavorite_tweet_response.py new file mode 100644 index 00000000..42d3aa4a --- /dev/null +++ b/twitter_openapi_python_generated/test/test_unfavorite_tweet_response.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + Twitter OpenAPI + + Twitter OpenAPI(Swagger) specification + + The version of the OpenAPI document: 0.0.1 + Contact: yuki@yuki0311.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from twitter_openapi_python_generated.models.unfavorite_tweet_response import UnfavoriteTweetResponse + +class TestUnfavoriteTweetResponse(unittest.TestCase): + """UnfavoriteTweetResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UnfavoriteTweetResponse: + """Test UnfavoriteTweetResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UnfavoriteTweetResponse` + """ + model = UnfavoriteTweetResponse() + if include_optional: + return UnfavoriteTweetResponse( + data = twitter_openapi_python_generated.models.unfavorite_tweet.UnfavoriteTweet( + unfavorite_tweet = '', ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] + ) + else: + return UnfavoriteTweetResponse( + data = twitter_openapi_python_generated.models.unfavorite_tweet.UnfavoriteTweet( + unfavorite_tweet = '', ), + ) + """ + + def testUnfavoriteTweetResponse(self): + """Test UnfavoriteTweetResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/twitter_openapi_python_generated/test/test_unfavorite_tweet_response_data.py b/twitter_openapi_python_generated/test/test_unfavorite_tweet_response_data.py deleted file mode 100644 index 975bee2b..00000000 --- a/twitter_openapi_python_generated/test/test_unfavorite_tweet_response_data.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from twitter_openapi_python_generated.models.unfavorite_tweet_response_data import UnfavoriteTweetResponseData - -class TestUnfavoriteTweetResponseData(unittest.TestCase): - """UnfavoriteTweetResponseData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UnfavoriteTweetResponseData: - """Test UnfavoriteTweetResponseData - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UnfavoriteTweetResponseData` - """ - model = UnfavoriteTweetResponseData() - if include_optional: - return UnfavoriteTweetResponseData( - data = twitter_openapi_python_generated.models.unfavorite_tweet.UnfavoriteTweet( - unfavorite_tweet = '', ) - ) - else: - return UnfavoriteTweetResponseData( - data = twitter_openapi_python_generated.models.unfavorite_tweet.UnfavoriteTweet( - unfavorite_tweet = '', ), - ) - """ - - def testUnfavoriteTweetResponseData(self): - """Test UnfavoriteTweetResponseData""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/twitter_openapi_python_generated/test/test_user.py b/twitter_openapi_python_generated/test/test_user.py index ad483b20..02d95c83 100644 --- a/twitter_openapi_python_generated/test/test_user.py +++ b/twitter_openapi_python_generated/test/test_user.py @@ -125,6 +125,7 @@ def make_instance(self, include_optional) -> User: gofundme_handle = '', is_enabled = True, patreon_handle = '', + pay_pal_handle = '', venmo_handle = '', ), user_seed_tweet_count = 56, verification_info = twitter_openapi_python_generated.models.user_verification_info.UserVerificationInfo( @@ -146,7 +147,6 @@ def make_instance(self, include_optional) -> User: else: return User( typename = 'TimelineTweet', - affiliates_highlighted_label = { }, id = 'zA9LCSLv1C1ylmgd0/Y2TA5TkIRHRRA401iz1CiIykN3HUO6XMsJPGh8AsaLONiNuo2ZPKNpkAmJHONf1Elbsh0SR//=', is_blue_verified = True, legacy = twitter_openapi_python_generated.models.user_legacy.UserLegacy( diff --git a/twitter_openapi_python_generated/test/test_user_highlights_tweets_data.py b/twitter_openapi_python_generated/test/test_user_highlights_tweets_data.py index 42afd2dd..525f2543 100644 --- a/twitter_openapi_python_generated/test/test_user_highlights_tweets_data.py +++ b/twitter_openapi_python_generated/test/test_user_highlights_tweets_data.py @@ -49,16 +49,6 @@ def make_instance(self, include_optional) -> UserHighlightsTweetsData: ) else: return UserHighlightsTweetsData( - user = twitter_openapi_python_generated.models.user_highlights_tweets_user.UserHighlightsTweetsUser( - result = twitter_openapi_python_generated.models.user_highlights_tweets_result.UserHighlightsTweetsResult( - __typename = 'TimelineTweet', - timeline = twitter_openapi_python_generated.models.user_highlights_tweets_timeline.UserHighlightsTweetsTimeline( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_user_highlights_tweets_response.py b/twitter_openapi_python_generated/test/test_user_highlights_tweets_response.py index 9577cf43..4381d47b 100644 --- a/twitter_openapi_python_generated/test/test_user_highlights_tweets_response.py +++ b/twitter_openapi_python_generated/test/test_user_highlights_tweets_response.py @@ -46,7 +46,34 @@ def make_instance(self, include_optional) -> UserHighlightsTweetsResponse: null ], metadata = { }, - response_objects = { }, ), ), ), ), ) + response_objects = { }, ), ), ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return UserHighlightsTweetsResponse( diff --git a/twitter_openapi_python_generated/test/test_user_legacy_extended_profile_birthdate.py b/twitter_openapi_python_generated/test/test_user_legacy_extended_profile_birthdate.py index 29da0cc2..0d345a8d 100644 --- a/twitter_openapi_python_generated/test/test_user_legacy_extended_profile_birthdate.py +++ b/twitter_openapi_python_generated/test/test_user_legacy_extended_profile_birthdate.py @@ -47,7 +47,6 @@ def make_instance(self, include_optional) -> UserLegacyExtendedProfileBirthdate: day = 56, month = 56, visibility = 'Self', - year = 56, year_visibility = 'Self', ) """ diff --git a/twitter_openapi_python_generated/test/test_user_response.py b/twitter_openapi_python_generated/test/test_user_response.py index 1b193dc1..45a28b09 100644 --- a/twitter_openapi_python_generated/test/test_user_response.py +++ b/twitter_openapi_python_generated/test/test_user_response.py @@ -38,7 +38,34 @@ def make_instance(self, include_optional) -> UserResponse: return UserResponse( data = twitter_openapi_python_generated.models.user_response_data.UserResponseData( user = twitter_openapi_python_generated.models.user_results.UserResults( - result = null, ), ) + result = null, ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return UserResponse( diff --git a/twitter_openapi_python_generated/test/test_user_tip_jar_settings.py b/twitter_openapi_python_generated/test/test_user_tip_jar_settings.py index 9d464234..4af44883 100644 --- a/twitter_openapi_python_generated/test/test_user_tip_jar_settings.py +++ b/twitter_openapi_python_generated/test/test_user_tip_jar_settings.py @@ -43,6 +43,7 @@ def make_instance(self, include_optional) -> UserTipJarSettings: gofundme_handle = '', is_enabled = True, patreon_handle = '', + pay_pal_handle = '', venmo_handle = '' ) else: diff --git a/twitter_openapi_python_generated/test/test_user_tweets_data.py b/twitter_openapi_python_generated/test/test_user_tweets_data.py index fcd4e211..a8b8e2a3 100644 --- a/twitter_openapi_python_generated/test/test_user_tweets_data.py +++ b/twitter_openapi_python_generated/test/test_user_tweets_data.py @@ -49,16 +49,6 @@ def make_instance(self, include_optional) -> UserTweetsData: ) else: return UserTweetsData( - user = twitter_openapi_python_generated.models.user_tweets_user.UserTweetsUser( - result = twitter_openapi_python_generated.models.user_tweets_result.UserTweetsResult( - __typename = 'TimelineTweet', - timeline_v2 = twitter_openapi_python_generated.models.timeline_v2.TimelineV2( - timeline = twitter_openapi_python_generated.models.timeline.Timeline( - instructions = [ - null - ], - metadata = { }, - response_objects = { }, ), ), ), ), ) """ diff --git a/twitter_openapi_python_generated/test/test_user_tweets_response.py b/twitter_openapi_python_generated/test/test_user_tweets_response.py index 23f30332..623b2dec 100644 --- a/twitter_openapi_python_generated/test/test_user_tweets_response.py +++ b/twitter_openapi_python_generated/test/test_user_tweets_response.py @@ -46,7 +46,34 @@ def make_instance(self, include_optional) -> UserTweetsResponse: null ], metadata = { }, - response_objects = { }, ), ), ), ), ) + response_objects = { }, ), ), ), ), ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return UserTweetsResponse( diff --git a/twitter_openapi_python_generated/test/test_user_union.py b/twitter_openapi_python_generated/test/test_user_union.py index a88c4e69..59f75c28 100644 --- a/twitter_openapi_python_generated/test/test_user_union.py +++ b/twitter_openapi_python_generated/test/test_user_union.py @@ -125,6 +125,7 @@ def make_instance(self, include_optional) -> UserUnion: gofundme_handle = '', is_enabled = True, patreon_handle = '', + pay_pal_handle = '', venmo_handle = '', ), user_seed_tweet_count = 56, verification_info = twitter_openapi_python_generated.models.user_verification_info.UserVerificationInfo( @@ -148,7 +149,6 @@ def make_instance(self, include_optional) -> UserUnion: else: return UserUnion( typename = 'TimelineTweet', - affiliates_highlighted_label = { }, id = 'zA9LCSLv1C1ylmgd0/Y2TA5TkIRHRRA401iz1CiIykN3HUO6XMsJPGh8AsaLONiNuo2ZPKNpkAmJHONf1Elbsh0SR//=', is_blue_verified = True, legacy = twitter_openapi_python_generated.models.user_legacy.UserLegacy( diff --git a/twitter_openapi_python_generated/test/test_user_verification_info_reason.py b/twitter_openapi_python_generated/test/test_user_verification_info_reason.py index bfecc66b..cdcac763 100644 --- a/twitter_openapi_python_generated/test/test_user_verification_info_reason.py +++ b/twitter_openapi_python_generated/test/test_user_verification_info_reason.py @@ -61,7 +61,6 @@ def make_instance(self, include_optional) -> UserVerificationInfoReason: to_index = 56, ) ], text = '', ), - override_verified_year = 56, verified_since_msec = '-80728', ) """ diff --git a/twitter_openapi_python_generated/test/test_users_response.py b/twitter_openapi_python_generated/test/test_users_response.py index e1124786..4f9e9e04 100644 --- a/twitter_openapi_python_generated/test/test_users_response.py +++ b/twitter_openapi_python_generated/test/test_users_response.py @@ -40,7 +40,34 @@ def make_instance(self, include_optional) -> UsersResponse: users = [ twitter_openapi_python_generated.models.user_results.UserResults( result = null, ) - ], ) + ], ), + errors = [ + twitter_openapi_python_generated.models.error_response.ErrorResponse( + code = 56, + extensions = twitter_openapi_python_generated.models.error_extensions.ErrorExtensions( + code = 56, + kind = '', + name = '', + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ), + kind = '', + locations = [ + twitter_openapi_python_generated.models.location.Location( + column = 56, + line = 56, ) + ], + message = '', + name = '', + path = [ + null + ], + retry_after = 56, + source = '', + tracing = twitter_openapi_python_generated.models.tracing.Tracing( + trace_id = 'bf325375e030fccb', ), ) + ] ) else: return UsersResponse( diff --git a/twitter_openapi_python_generated/test/test_users_response_data.py b/twitter_openapi_python_generated/test/test_users_response_data.py index 73ad756c..fa139654 100644 --- a/twitter_openapi_python_generated/test/test_users_response_data.py +++ b/twitter_openapi_python_generated/test/test_users_response_data.py @@ -43,10 +43,6 @@ def make_instance(self, include_optional) -> UsersResponseData: ) else: return UsersResponseData( - users = [ - twitter_openapi_python_generated.models.user_results.UserResults( - result = null, ) - ], ) """ diff --git a/twitter_openapi_python_generated/tools/openapi-generator-config.yaml b/twitter_openapi_python_generated/tools/openapi-generator-config.yaml index 0a1a6284..84f8ee28 100644 --- a/twitter_openapi_python_generated/tools/openapi-generator-config.yaml +++ b/twitter_openapi_python_generated/tools/openapi-generator-config.yaml @@ -2,7 +2,7 @@ inputSpec: twitter-openapi/dist/compatible/openapi-3.0.yaml outputDir: . packageName: twitter_openapi_python_generated -packageVersion: 0.0.24 +packageVersion: 0.0.27 packageUrl: https://github.com/fa0311/twitter_openapi_python_generated projectName: twitter_openapi_python_generated projectKeywords: twitter_openapi_python_generated diff --git a/twitter_openapi_python_generated/tools/win/init.ps1 b/twitter_openapi_python_generated/tools/win/init.ps1 index c3c285e8..36891a23 100644 --- a/twitter_openapi_python_generated/tools/win/init.ps1 +++ b/twitter_openapi_python_generated/tools/win/init.ps1 @@ -1 +1 @@ -Invoke-WebRequest -OutFile tools/openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.9.0/openapi-generator-cli-7.9.0.jar +Invoke-WebRequest -OutFile tools/openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.10.0/openapi-generator-cli-7.10.0.jar diff --git a/twitter_openapi_python_generated/twitter-openapi b/twitter_openapi_python_generated/twitter-openapi index 4b271509..1c33ce5c 160000 --- a/twitter_openapi_python_generated/twitter-openapi +++ b/twitter_openapi_python_generated/twitter-openapi @@ -1 +1 @@ -Subproject commit 4b27150977e1bdd807de8969dc0ddd7918ac9923 +Subproject commit 1c33ce5cb054e37d4cbc02bd37bb80644aea26fa diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/__init__.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/__init__.py index 9d30614b..ee6195c1 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/__init__.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "0.0.24" +__version__ = "0.0.27" # import apis into sdk package from twitter_openapi_python_generated.api.default_api import DefaultApi @@ -74,7 +74,9 @@ from twitter_openapi_python_generated.models.community_data import CommunityData from twitter_openapi_python_generated.models.community_delete_action_result import CommunityDeleteActionResult from twitter_openapi_python_generated.models.community_invites_result import CommunityInvitesResult -from twitter_openapi_python_generated.models.community_join_action_result import CommunityJoinActionResult +from twitter_openapi_python_generated.models.community_join_action import CommunityJoinAction +from twitter_openapi_python_generated.models.community_join_action_result_union import CommunityJoinActionResultUnion +from twitter_openapi_python_generated.models.community_join_action_unavailable import CommunityJoinActionUnavailable from twitter_openapi_python_generated.models.community_join_requests_result import CommunityJoinRequestsResult from twitter_openapi_python_generated.models.community_leave_action_result import CommunityLeaveActionResult from twitter_openapi_python_generated.models.community_pin_action_result import CommunityPinActionResult @@ -112,34 +114,18 @@ from twitter_openapi_python_generated.models.display_treatment import DisplayTreatment from twitter_openapi_python_generated.models.display_type import DisplayType from twitter_openapi_python_generated.models.entities import Entities -from twitter_openapi_python_generated.models.error import Error from twitter_openapi_python_generated.models.error_extensions import ErrorExtensions -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.errors_data import ErrorsData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.ext_media_availability import ExtMediaAvailability from twitter_openapi_python_generated.models.extended_entities import ExtendedEntities from twitter_openapi_python_generated.models.favorite_tweet import FavoriteTweet -from twitter_openapi_python_generated.models.favorite_tweet_response_data import FavoriteTweetResponseData +from twitter_openapi_python_generated.models.favorite_tweet_response import FavoriteTweetResponse from twitter_openapi_python_generated.models.feedback_info import FeedbackInfo from twitter_openapi_python_generated.models.follow_response import FollowResponse from twitter_openapi_python_generated.models.follow_response_data import FollowResponseData from twitter_openapi_python_generated.models.follow_response_result import FollowResponseResult from twitter_openapi_python_generated.models.follow_response_user import FollowResponseUser from twitter_openapi_python_generated.models.follow_timeline import FollowTimeline -from twitter_openapi_python_generated.models.get_bookmarks200_response import GetBookmarks200Response -from twitter_openapi_python_generated.models.get_favoriters200_response import GetFavoriters200Response -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response -from twitter_openapi_python_generated.models.get_home_latest_timeline200_response import GetHomeLatestTimeline200Response -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response -from twitter_openapi_python_generated.models.get_list_latest_tweets_timeline200_response import GetListLatestTweetsTimeline200Response -from twitter_openapi_python_generated.models.get_profile_spotlights_query200_response import GetProfileSpotlightsQuery200Response -from twitter_openapi_python_generated.models.get_retweeters200_response import GetRetweeters200Response -from twitter_openapi_python_generated.models.get_search_timeline200_response import GetSearchTimeline200Response -from twitter_openapi_python_generated.models.get_tweet_detail200_response import GetTweetDetail200Response -from twitter_openapi_python_generated.models.get_tweet_result_by_rest_id200_response import GetTweetResultByRestId200Response -from twitter_openapi_python_generated.models.get_user_by_rest_id200_response import GetUserByRestId200Response -from twitter_openapi_python_generated.models.get_user_highlights_tweets200_response import GetUserHighlightsTweets200Response -from twitter_openapi_python_generated.models.get_users_by_rest_ids200_response import GetUsersByRestIds200Response from twitter_openapi_python_generated.models.highlight import Highlight from twitter_openapi_python_generated.models.home_timeline_home import HomeTimelineHome from twitter_openapi_python_generated.models.home_timeline_response_data import HomeTimelineResponseData @@ -175,14 +161,11 @@ from twitter_openapi_python_generated.models.note_tweet_result_rich_text import NoteTweetResultRichText from twitter_openapi_python_generated.models.note_tweet_result_rich_text_tag import NoteTweetResultRichTextTag from twitter_openapi_python_generated.models.one_factor_login_eligibility import OneFactorLoginEligibility -from twitter_openapi_python_generated.models.other_response import OtherResponse -from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response +from twitter_openapi_python_generated.models.other_object_all import OtherObjectAll from twitter_openapi_python_generated.models.post_create_bookmark_request import PostCreateBookmarkRequest from twitter_openapi_python_generated.models.post_create_bookmark_request_variables import PostCreateBookmarkRequestVariables -from twitter_openapi_python_generated.models.post_create_retweet200_response import PostCreateRetweet200Response from twitter_openapi_python_generated.models.post_create_retweet_request import PostCreateRetweetRequest from twitter_openapi_python_generated.models.post_create_retweet_request_variables import PostCreateRetweetRequestVariables -from twitter_openapi_python_generated.models.post_create_tweet200_response import PostCreateTweet200Response from twitter_openapi_python_generated.models.post_create_tweet_request import PostCreateTweetRequest from twitter_openapi_python_generated.models.post_create_tweet_request_features import PostCreateTweetRequestFeatures from twitter_openapi_python_generated.models.post_create_tweet_request_variables import PostCreateTweetRequestVariables @@ -190,16 +173,11 @@ from twitter_openapi_python_generated.models.post_create_tweet_request_variables_media import PostCreateTweetRequestVariablesMedia from twitter_openapi_python_generated.models.post_create_tweet_request_variables_media_media_entities_inner import PostCreateTweetRequestVariablesMediaMediaEntitiesInner from twitter_openapi_python_generated.models.post_create_tweet_request_variables_reply import PostCreateTweetRequestVariablesReply -from twitter_openapi_python_generated.models.post_delete_bookmark200_response import PostDeleteBookmark200Response from twitter_openapi_python_generated.models.post_delete_bookmark_request import PostDeleteBookmarkRequest -from twitter_openapi_python_generated.models.post_delete_retweet200_response import PostDeleteRetweet200Response from twitter_openapi_python_generated.models.post_delete_retweet_request import PostDeleteRetweetRequest from twitter_openapi_python_generated.models.post_delete_retweet_request_variables import PostDeleteRetweetRequestVariables -from twitter_openapi_python_generated.models.post_delete_tweet200_response import PostDeleteTweet200Response from twitter_openapi_python_generated.models.post_delete_tweet_request import PostDeleteTweetRequest -from twitter_openapi_python_generated.models.post_favorite_tweet200_response import PostFavoriteTweet200Response from twitter_openapi_python_generated.models.post_favorite_tweet_request import PostFavoriteTweetRequest -from twitter_openapi_python_generated.models.post_unfavorite_tweet200_response import PostUnfavoriteTweet200Response from twitter_openapi_python_generated.models.post_unfavorite_tweet_request import PostUnfavoriteTweetRequest from twitter_openapi_python_generated.models.primary_community_topic import PrimaryCommunityTopic from twitter_openapi_python_generated.models.profile_response import ProfileResponse @@ -290,7 +268,7 @@ from twitter_openapi_python_generated.models.tweet_with_visibility_results import TweetWithVisibilityResults from twitter_openapi_python_generated.models.type_name import TypeName from twitter_openapi_python_generated.models.unfavorite_tweet import UnfavoriteTweet -from twitter_openapi_python_generated.models.unfavorite_tweet_response_data import UnfavoriteTweetResponseData +from twitter_openapi_python_generated.models.unfavorite_tweet_response import UnfavoriteTweetResponse from twitter_openapi_python_generated.models.unified_card import UnifiedCard from twitter_openapi_python_generated.models.url import Url from twitter_openapi_python_generated.models.urt_endpoint_options import UrtEndpointOptions diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/default_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/default_api.py index c54ed889..37329a36 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/default_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/default_api.py @@ -18,8 +18,8 @@ from typing_extensions import Annotated from pydantic import StrictStr -from twitter_openapi_python_generated.models.get_profile_spotlights_query200_response import GetProfileSpotlightsQuery200Response -from twitter_openapi_python_generated.models.get_tweet_result_by_rest_id200_response import GetTweetResultByRestId200Response +from twitter_openapi_python_generated.models.profile_response import ProfileResponse +from twitter_openapi_python_generated.models.tweet_result_by_rest_id_response import TweetResultByRestIdResponse from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized from twitter_openapi_python_generated.api_response import ApiResponse @@ -57,7 +57,7 @@ def get_profile_spotlights_query( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetProfileSpotlightsQuery200Response: + ) -> ProfileResponse: """get_profile_spotlights_query get user by screen name @@ -101,7 +101,7 @@ def get_profile_spotlights_query( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProfileSpotlightsQuery200Response", + '200': "ProfileResponse", } response_data = self.api_client.call_api( *_param, @@ -132,7 +132,7 @@ def get_profile_spotlights_query_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetProfileSpotlightsQuery200Response]: + ) -> ApiResponse[ProfileResponse]: """get_profile_spotlights_query get user by screen name @@ -176,7 +176,7 @@ def get_profile_spotlights_query_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProfileSpotlightsQuery200Response", + '200': "ProfileResponse", } response_data = self.api_client.call_api( *_param, @@ -251,7 +251,7 @@ def get_profile_spotlights_query_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetProfileSpotlightsQuery200Response", + '200': "ProfileResponse", } response_data = self.api_client.call_api( *_param, @@ -315,6 +315,7 @@ def _get_profile_spotlights_query_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -374,7 +375,7 @@ def get_tweet_result_by_rest_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetTweetResultByRestId200Response: + ) -> TweetResultByRestIdResponse: """get_tweet_result_by_rest_id get TweetResultByRestId @@ -421,7 +422,7 @@ def get_tweet_result_by_rest_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTweetResultByRestId200Response", + '200': "TweetResultByRestIdResponse", } response_data = self.api_client.call_api( *_param, @@ -453,7 +454,7 @@ def get_tweet_result_by_rest_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetTweetResultByRestId200Response]: + ) -> ApiResponse[TweetResultByRestIdResponse]: """get_tweet_result_by_rest_id get TweetResultByRestId @@ -500,7 +501,7 @@ def get_tweet_result_by_rest_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTweetResultByRestId200Response", + '200': "TweetResultByRestIdResponse", } response_data = self.api_client.call_api( *_param, @@ -579,7 +580,7 @@ def get_tweet_result_by_rest_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTweetResultByRestId200Response", + '200': "TweetResultByRestIdResponse", } response_data = self.api_client.call_api( *_param, @@ -648,6 +649,7 @@ def _get_tweet_result_by_rest_id_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/other_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/other_api.py index a0111b9d..fbebaca5 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/other_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/other_api.py @@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from twitter_openapi_python_generated.models.other_response import OtherResponse +from twitter_openapi_python_generated.models.other_object_all import OtherObjectAll from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized from twitter_openapi_python_generated.api_response import ApiResponse @@ -52,7 +52,7 @@ def other( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OtherResponse: + ) -> OtherObjectAll: """other This is not an actual endpoint @@ -87,7 +87,7 @@ def other( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OtherResponse", + '200': "OtherObjectAll", } response_data = self.api_client.call_api( *_param, @@ -115,7 +115,7 @@ def other_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OtherResponse]: + ) -> ApiResponse[OtherObjectAll]: """other This is not an actual endpoint @@ -150,7 +150,7 @@ def other_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OtherResponse", + '200': "OtherObjectAll", } response_data = self.api_client.call_api( *_param, @@ -213,7 +213,7 @@ def other_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OtherResponse", + '200': "OtherObjectAll", } response_data = self.api_client.call_api( *_param, @@ -264,6 +264,7 @@ def _other_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/post_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/post_api.py index 0a2f4e23..4695ed32 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/post_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/post_api.py @@ -19,22 +19,22 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated -from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response +from twitter_openapi_python_generated.models.create_bookmark_response import CreateBookmarkResponse +from twitter_openapi_python_generated.models.create_retweet_response import CreateRetweetResponse +from twitter_openapi_python_generated.models.create_tweet_response import CreateTweetResponse +from twitter_openapi_python_generated.models.delete_bookmark_response import DeleteBookmarkResponse +from twitter_openapi_python_generated.models.delete_retweet_response import DeleteRetweetResponse +from twitter_openapi_python_generated.models.delete_tweet_response import DeleteTweetResponse +from twitter_openapi_python_generated.models.favorite_tweet_response import FavoriteTweetResponse from twitter_openapi_python_generated.models.post_create_bookmark_request import PostCreateBookmarkRequest -from twitter_openapi_python_generated.models.post_create_retweet200_response import PostCreateRetweet200Response from twitter_openapi_python_generated.models.post_create_retweet_request import PostCreateRetweetRequest -from twitter_openapi_python_generated.models.post_create_tweet200_response import PostCreateTweet200Response from twitter_openapi_python_generated.models.post_create_tweet_request import PostCreateTweetRequest -from twitter_openapi_python_generated.models.post_delete_bookmark200_response import PostDeleteBookmark200Response from twitter_openapi_python_generated.models.post_delete_bookmark_request import PostDeleteBookmarkRequest -from twitter_openapi_python_generated.models.post_delete_retweet200_response import PostDeleteRetweet200Response from twitter_openapi_python_generated.models.post_delete_retweet_request import PostDeleteRetweetRequest -from twitter_openapi_python_generated.models.post_delete_tweet200_response import PostDeleteTweet200Response from twitter_openapi_python_generated.models.post_delete_tweet_request import PostDeleteTweetRequest -from twitter_openapi_python_generated.models.post_favorite_tweet200_response import PostFavoriteTweet200Response from twitter_openapi_python_generated.models.post_favorite_tweet_request import PostFavoriteTweetRequest -from twitter_openapi_python_generated.models.post_unfavorite_tweet200_response import PostUnfavoriteTweet200Response from twitter_openapi_python_generated.models.post_unfavorite_tweet_request import PostUnfavoriteTweetRequest +from twitter_openapi_python_generated.models.unfavorite_tweet_response import UnfavoriteTweetResponse from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized from twitter_openapi_python_generated.api_response import ApiResponse @@ -71,7 +71,7 @@ def post_create_bookmark( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostCreateBookmark200Response: + ) -> CreateBookmarkResponse: """post_create_bookmark create Bookmark @@ -112,7 +112,7 @@ def post_create_bookmark( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateBookmark200Response", + '200': "CreateBookmarkResponse", } response_data = self.api_client.call_api( *_param, @@ -142,7 +142,7 @@ def post_create_bookmark_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostCreateBookmark200Response]: + ) -> ApiResponse[CreateBookmarkResponse]: """post_create_bookmark create Bookmark @@ -183,7 +183,7 @@ def post_create_bookmark_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateBookmark200Response", + '200': "CreateBookmarkResponse", } response_data = self.api_client.call_api( *_param, @@ -254,7 +254,7 @@ def post_create_bookmark_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateBookmark200Response", + '200': "CreateBookmarkResponse", } response_data = self.api_client.call_api( *_param, @@ -324,6 +324,7 @@ def _post_create_bookmark_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -381,7 +382,7 @@ def post_create_retweet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostCreateRetweet200Response: + ) -> CreateRetweetResponse: """post_create_retweet create Retweet @@ -422,7 +423,7 @@ def post_create_retweet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateRetweet200Response", + '200': "CreateRetweetResponse", } response_data = self.api_client.call_api( *_param, @@ -452,7 +453,7 @@ def post_create_retweet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostCreateRetweet200Response]: + ) -> ApiResponse[CreateRetweetResponse]: """post_create_retweet create Retweet @@ -493,7 +494,7 @@ def post_create_retweet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateRetweet200Response", + '200': "CreateRetweetResponse", } response_data = self.api_client.call_api( *_param, @@ -564,7 +565,7 @@ def post_create_retweet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateRetweet200Response", + '200': "CreateRetweetResponse", } response_data = self.api_client.call_api( *_param, @@ -634,6 +635,7 @@ def _post_create_retweet_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -691,7 +693,7 @@ def post_create_tweet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostCreateTweet200Response: + ) -> CreateTweetResponse: """post_create_tweet create Tweet @@ -732,7 +734,7 @@ def post_create_tweet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateTweet200Response", + '200': "CreateTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -762,7 +764,7 @@ def post_create_tweet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostCreateTweet200Response]: + ) -> ApiResponse[CreateTweetResponse]: """post_create_tweet create Tweet @@ -803,7 +805,7 @@ def post_create_tweet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateTweet200Response", + '200': "CreateTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -874,7 +876,7 @@ def post_create_tweet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostCreateTweet200Response", + '200': "CreateTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -944,6 +946,7 @@ def _post_create_tweet_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1001,7 +1004,7 @@ def post_delete_bookmark( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostDeleteBookmark200Response: + ) -> DeleteBookmarkResponse: """post_delete_bookmark delete Bookmark @@ -1042,7 +1045,7 @@ def post_delete_bookmark( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteBookmark200Response", + '200': "DeleteBookmarkResponse", } response_data = self.api_client.call_api( *_param, @@ -1072,7 +1075,7 @@ def post_delete_bookmark_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostDeleteBookmark200Response]: + ) -> ApiResponse[DeleteBookmarkResponse]: """post_delete_bookmark delete Bookmark @@ -1113,7 +1116,7 @@ def post_delete_bookmark_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteBookmark200Response", + '200': "DeleteBookmarkResponse", } response_data = self.api_client.call_api( *_param, @@ -1184,7 +1187,7 @@ def post_delete_bookmark_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteBookmark200Response", + '200': "DeleteBookmarkResponse", } response_data = self.api_client.call_api( *_param, @@ -1254,6 +1257,7 @@ def _post_delete_bookmark_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1311,7 +1315,7 @@ def post_delete_retweet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostDeleteRetweet200Response: + ) -> DeleteRetweetResponse: """post_delete_retweet delete Retweet @@ -1352,7 +1356,7 @@ def post_delete_retweet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteRetweet200Response", + '200': "DeleteRetweetResponse", } response_data = self.api_client.call_api( *_param, @@ -1382,7 +1386,7 @@ def post_delete_retweet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostDeleteRetweet200Response]: + ) -> ApiResponse[DeleteRetweetResponse]: """post_delete_retweet delete Retweet @@ -1423,7 +1427,7 @@ def post_delete_retweet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteRetweet200Response", + '200': "DeleteRetweetResponse", } response_data = self.api_client.call_api( *_param, @@ -1494,7 +1498,7 @@ def post_delete_retweet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteRetweet200Response", + '200': "DeleteRetweetResponse", } response_data = self.api_client.call_api( *_param, @@ -1564,6 +1568,7 @@ def _post_delete_retweet_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1621,7 +1626,7 @@ def post_delete_tweet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostDeleteTweet200Response: + ) -> DeleteTweetResponse: """post_delete_tweet delete Retweet @@ -1662,7 +1667,7 @@ def post_delete_tweet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteTweet200Response", + '200': "DeleteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -1692,7 +1697,7 @@ def post_delete_tweet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostDeleteTweet200Response]: + ) -> ApiResponse[DeleteTweetResponse]: """post_delete_tweet delete Retweet @@ -1733,7 +1738,7 @@ def post_delete_tweet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteTweet200Response", + '200': "DeleteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -1804,7 +1809,7 @@ def post_delete_tweet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostDeleteTweet200Response", + '200': "DeleteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -1874,6 +1879,7 @@ def _post_delete_tweet_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1931,7 +1937,7 @@ def post_favorite_tweet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostFavoriteTweet200Response: + ) -> FavoriteTweetResponse: """post_favorite_tweet favorite Tweet @@ -1972,7 +1978,7 @@ def post_favorite_tweet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostFavoriteTweet200Response", + '200': "FavoriteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -2002,7 +2008,7 @@ def post_favorite_tweet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostFavoriteTweet200Response]: + ) -> ApiResponse[FavoriteTweetResponse]: """post_favorite_tweet favorite Tweet @@ -2043,7 +2049,7 @@ def post_favorite_tweet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostFavoriteTweet200Response", + '200': "FavoriteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -2114,7 +2120,7 @@ def post_favorite_tweet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostFavoriteTweet200Response", + '200': "FavoriteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -2184,6 +2190,7 @@ def _post_favorite_tweet_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -2241,7 +2248,7 @@ def post_unfavorite_tweet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PostUnfavoriteTweet200Response: + ) -> UnfavoriteTweetResponse: """post_unfavorite_tweet unfavorite Tweet @@ -2282,7 +2289,7 @@ def post_unfavorite_tweet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostUnfavoriteTweet200Response", + '200': "UnfavoriteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -2312,7 +2319,7 @@ def post_unfavorite_tweet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PostUnfavoriteTweet200Response]: + ) -> ApiResponse[UnfavoriteTweetResponse]: """post_unfavorite_tweet unfavorite Tweet @@ -2353,7 +2360,7 @@ def post_unfavorite_tweet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostUnfavoriteTweet200Response", + '200': "UnfavoriteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -2424,7 +2431,7 @@ def post_unfavorite_tweet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PostUnfavoriteTweet200Response", + '200': "UnfavoriteTweetResponse", } response_data = self.api_client.call_api( *_param, @@ -2494,6 +2501,7 @@ def _post_unfavorite_tweet_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/tweet_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/tweet_api.py index 512c2ec6..4b5654c7 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/tweet_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/tweet_api.py @@ -18,13 +18,13 @@ from typing_extensions import Annotated from pydantic import StrictStr -from twitter_openapi_python_generated.models.get_bookmarks200_response import GetBookmarks200Response -from twitter_openapi_python_generated.models.get_home_latest_timeline200_response import GetHomeLatestTimeline200Response -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response -from twitter_openapi_python_generated.models.get_list_latest_tweets_timeline200_response import GetListLatestTweetsTimeline200Response -from twitter_openapi_python_generated.models.get_search_timeline200_response import GetSearchTimeline200Response -from twitter_openapi_python_generated.models.get_tweet_detail200_response import GetTweetDetail200Response -from twitter_openapi_python_generated.models.get_user_highlights_tweets200_response import GetUserHighlightsTweets200Response +from twitter_openapi_python_generated.models.bookmarks_response import BookmarksResponse +from twitter_openapi_python_generated.models.list_latest_tweets_timeline_response import ListLatestTweetsTimelineResponse +from twitter_openapi_python_generated.models.search_timeline_response import SearchTimelineResponse +from twitter_openapi_python_generated.models.timeline_response import TimelineResponse +from twitter_openapi_python_generated.models.tweet_detail_response import TweetDetailResponse +from twitter_openapi_python_generated.models.user_highlights_tweets_response import UserHighlightsTweetsResponse +from twitter_openapi_python_generated.models.user_tweets_response import UserTweetsResponse from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized from twitter_openapi_python_generated.api_response import ApiResponse @@ -62,7 +62,7 @@ def get_bookmarks( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetBookmarks200Response: + ) -> BookmarksResponse: """get_bookmarks get bookmarks @@ -106,7 +106,7 @@ def get_bookmarks( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBookmarks200Response", + '200': "BookmarksResponse", } response_data = self.api_client.call_api( *_param, @@ -137,7 +137,7 @@ def get_bookmarks_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetBookmarks200Response]: + ) -> ApiResponse[BookmarksResponse]: """get_bookmarks get bookmarks @@ -181,7 +181,7 @@ def get_bookmarks_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBookmarks200Response", + '200': "BookmarksResponse", } response_data = self.api_client.call_api( *_param, @@ -256,7 +256,7 @@ def get_bookmarks_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetBookmarks200Response", + '200': "BookmarksResponse", } response_data = self.api_client.call_api( *_param, @@ -320,6 +320,7 @@ def _get_bookmarks_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -378,7 +379,7 @@ def get_home_latest_timeline( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetHomeLatestTimeline200Response: + ) -> TimelineResponse: """get_home_latest_timeline get tweet list of timeline @@ -422,7 +423,7 @@ def get_home_latest_timeline( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHomeLatestTimeline200Response", + '200': "TimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -453,7 +454,7 @@ def get_home_latest_timeline_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetHomeLatestTimeline200Response]: + ) -> ApiResponse[TimelineResponse]: """get_home_latest_timeline get tweet list of timeline @@ -497,7 +498,7 @@ def get_home_latest_timeline_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHomeLatestTimeline200Response", + '200': "TimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -572,7 +573,7 @@ def get_home_latest_timeline_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHomeLatestTimeline200Response", + '200': "TimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -636,6 +637,7 @@ def _get_home_latest_timeline_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -694,7 +696,7 @@ def get_home_timeline( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetHomeLatestTimeline200Response: + ) -> TimelineResponse: """get_home_timeline get tweet list of timeline @@ -738,7 +740,7 @@ def get_home_timeline( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHomeLatestTimeline200Response", + '200': "TimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -769,7 +771,7 @@ def get_home_timeline_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetHomeLatestTimeline200Response]: + ) -> ApiResponse[TimelineResponse]: """get_home_timeline get tweet list of timeline @@ -813,7 +815,7 @@ def get_home_timeline_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHomeLatestTimeline200Response", + '200': "TimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -888,7 +890,7 @@ def get_home_timeline_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetHomeLatestTimeline200Response", + '200': "TimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -952,6 +954,7 @@ def _get_home_timeline_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1011,7 +1014,7 @@ def get_likes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetLikes200Response: + ) -> UserTweetsResponse: """get_likes get user likes tweets @@ -1058,7 +1061,7 @@ def get_likes( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -1090,7 +1093,7 @@ def get_likes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetLikes200Response]: + ) -> ApiResponse[UserTweetsResponse]: """get_likes get user likes tweets @@ -1137,7 +1140,7 @@ def get_likes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -1216,7 +1219,7 @@ def get_likes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -1285,6 +1288,7 @@ def _get_likes_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1343,7 +1347,7 @@ def get_list_latest_tweets_timeline( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetListLatestTweetsTimeline200Response: + ) -> ListLatestTweetsTimelineResponse: """get_list_latest_tweets_timeline get tweet list of timeline @@ -1387,7 +1391,7 @@ def get_list_latest_tweets_timeline( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetListLatestTweetsTimeline200Response", + '200': "ListLatestTweetsTimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -1418,7 +1422,7 @@ def get_list_latest_tweets_timeline_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetListLatestTweetsTimeline200Response]: + ) -> ApiResponse[ListLatestTweetsTimelineResponse]: """get_list_latest_tweets_timeline get tweet list of timeline @@ -1462,7 +1466,7 @@ def get_list_latest_tweets_timeline_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetListLatestTweetsTimeline200Response", + '200': "ListLatestTweetsTimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -1537,7 +1541,7 @@ def get_list_latest_tweets_timeline_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetListLatestTweetsTimeline200Response", + '200': "ListLatestTweetsTimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -1601,6 +1605,7 @@ def _get_list_latest_tweets_timeline_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1659,7 +1664,7 @@ def get_search_timeline( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetSearchTimeline200Response: + ) -> SearchTimelineResponse: """get_search_timeline search tweet list. product:[Top, Latest, People, Photos, Videos] @@ -1703,7 +1708,7 @@ def get_search_timeline( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSearchTimeline200Response", + '200': "SearchTimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -1734,7 +1739,7 @@ def get_search_timeline_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetSearchTimeline200Response]: + ) -> ApiResponse[SearchTimelineResponse]: """get_search_timeline search tweet list. product:[Top, Latest, People, Photos, Videos] @@ -1778,7 +1783,7 @@ def get_search_timeline_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSearchTimeline200Response", + '200': "SearchTimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -1853,7 +1858,7 @@ def get_search_timeline_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSearchTimeline200Response", + '200': "SearchTimelineResponse", } response_data = self.api_client.call_api( *_param, @@ -1917,6 +1922,7 @@ def _get_search_timeline_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1976,7 +1982,7 @@ def get_tweet_detail( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetTweetDetail200Response: + ) -> TweetDetailResponse: """get_tweet_detail get TweetDetail @@ -2023,7 +2029,7 @@ def get_tweet_detail( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTweetDetail200Response", + '200': "TweetDetailResponse", } response_data = self.api_client.call_api( *_param, @@ -2055,7 +2061,7 @@ def get_tweet_detail_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetTweetDetail200Response]: + ) -> ApiResponse[TweetDetailResponse]: """get_tweet_detail get TweetDetail @@ -2102,7 +2108,7 @@ def get_tweet_detail_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTweetDetail200Response", + '200': "TweetDetailResponse", } response_data = self.api_client.call_api( *_param, @@ -2181,7 +2187,7 @@ def get_tweet_detail_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetTweetDetail200Response", + '200': "TweetDetailResponse", } response_data = self.api_client.call_api( *_param, @@ -2250,6 +2256,7 @@ def _get_tweet_detail_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -2308,7 +2315,7 @@ def get_user_highlights_tweets( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetUserHighlightsTweets200Response: + ) -> UserHighlightsTweetsResponse: """get_user_highlights_tweets get user highlights tweets @@ -2352,7 +2359,7 @@ def get_user_highlights_tweets( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserHighlightsTweets200Response", + '200': "UserHighlightsTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2383,7 +2390,7 @@ def get_user_highlights_tweets_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetUserHighlightsTweets200Response]: + ) -> ApiResponse[UserHighlightsTweetsResponse]: """get_user_highlights_tweets get user highlights tweets @@ -2427,7 +2434,7 @@ def get_user_highlights_tweets_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserHighlightsTweets200Response", + '200': "UserHighlightsTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2502,7 +2509,7 @@ def get_user_highlights_tweets_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserHighlightsTweets200Response", + '200': "UserHighlightsTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2566,6 +2573,7 @@ def _get_user_highlights_tweets_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -2625,7 +2633,7 @@ def get_user_media( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetLikes200Response: + ) -> UserTweetsResponse: """get_user_media get user media tweets @@ -2672,7 +2680,7 @@ def get_user_media( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2704,7 +2712,7 @@ def get_user_media_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetLikes200Response]: + ) -> ApiResponse[UserTweetsResponse]: """get_user_media get user media tweets @@ -2751,7 +2759,7 @@ def get_user_media_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2830,7 +2838,7 @@ def get_user_media_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -2899,6 +2907,7 @@ def _get_user_media_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -2958,7 +2967,7 @@ def get_user_tweets( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetLikes200Response: + ) -> UserTweetsResponse: """get_user_tweets get user tweets @@ -3005,7 +3014,7 @@ def get_user_tweets( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -3037,7 +3046,7 @@ def get_user_tweets_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetLikes200Response]: + ) -> ApiResponse[UserTweetsResponse]: """get_user_tweets get user tweets @@ -3084,7 +3093,7 @@ def get_user_tweets_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -3163,7 +3172,7 @@ def get_user_tweets_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -3232,6 +3241,7 @@ def _get_user_tweets_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -3291,7 +3301,7 @@ def get_user_tweets_and_replies( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetLikes200Response: + ) -> UserTweetsResponse: """get_user_tweets_and_replies get user replies tweets @@ -3338,7 +3348,7 @@ def get_user_tweets_and_replies( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -3370,7 +3380,7 @@ def get_user_tweets_and_replies_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetLikes200Response]: + ) -> ApiResponse[UserTweetsResponse]: """get_user_tweets_and_replies get user replies tweets @@ -3417,7 +3427,7 @@ def get_user_tweets_and_replies_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -3496,7 +3506,7 @@ def get_user_tweets_and_replies_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetLikes200Response", + '200': "UserTweetsResponse", } response_data = self.api_client.call_api( *_param, @@ -3565,6 +3575,7 @@ def _get_user_tweets_and_replies_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_api.py index c0419dcd..ef0798ab 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_api.py @@ -18,7 +18,7 @@ from typing_extensions import Annotated from pydantic import StrictStr -from twitter_openapi_python_generated.models.get_user_by_rest_id200_response import GetUserByRestId200Response +from twitter_openapi_python_generated.models.user_response import UserResponse from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized from twitter_openapi_python_generated.api_response import ApiResponse @@ -56,7 +56,7 @@ def get_user_by_rest_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetUserByRestId200Response: + ) -> UserResponse: """get_user_by_rest_id get user by rest id @@ -100,7 +100,7 @@ def get_user_by_rest_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserByRestId200Response", + '200': "UserResponse", } response_data = self.api_client.call_api( *_param, @@ -131,7 +131,7 @@ def get_user_by_rest_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetUserByRestId200Response]: + ) -> ApiResponse[UserResponse]: """get_user_by_rest_id get user by rest id @@ -175,7 +175,7 @@ def get_user_by_rest_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserByRestId200Response", + '200': "UserResponse", } response_data = self.api_client.call_api( *_param, @@ -250,7 +250,7 @@ def get_user_by_rest_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserByRestId200Response", + '200': "UserResponse", } response_data = self.api_client.call_api( *_param, @@ -314,6 +314,7 @@ def _get_user_by_rest_id_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -373,7 +374,7 @@ def get_user_by_screen_name( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetUserByRestId200Response: + ) -> UserResponse: """get_user_by_screen_name get user by screen name @@ -420,7 +421,7 @@ def get_user_by_screen_name( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserByRestId200Response", + '200': "UserResponse", } response_data = self.api_client.call_api( *_param, @@ -452,7 +453,7 @@ def get_user_by_screen_name_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetUserByRestId200Response]: + ) -> ApiResponse[UserResponse]: """get_user_by_screen_name get user by screen name @@ -499,7 +500,7 @@ def get_user_by_screen_name_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserByRestId200Response", + '200': "UserResponse", } response_data = self.api_client.call_api( *_param, @@ -578,7 +579,7 @@ def get_user_by_screen_name_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUserByRestId200Response", + '200': "UserResponse", } response_data = self.api_client.call_api( *_param, @@ -647,6 +648,7 @@ def _get_user_by_screen_name_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_list_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_list_api.py index 27e26dbe..e40ec22d 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_list_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/user_list_api.py @@ -18,9 +18,9 @@ from typing_extensions import Annotated from pydantic import StrictStr -from twitter_openapi_python_generated.models.get_favoriters200_response import GetFavoriters200Response -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response -from twitter_openapi_python_generated.models.get_retweeters200_response import GetRetweeters200Response +from twitter_openapi_python_generated.models.follow_response import FollowResponse +from twitter_openapi_python_generated.models.tweet_favoriters_response import TweetFavoritersResponse +from twitter_openapi_python_generated.models.tweet_retweeters_response import TweetRetweetersResponse from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized from twitter_openapi_python_generated.api_response import ApiResponse @@ -58,7 +58,7 @@ def get_favoriters( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetFavoriters200Response: + ) -> TweetFavoritersResponse: """get_favoriters get tweet favoriters @@ -102,7 +102,7 @@ def get_favoriters( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFavoriters200Response", + '200': "TweetFavoritersResponse", } response_data = self.api_client.call_api( *_param, @@ -133,7 +133,7 @@ def get_favoriters_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetFavoriters200Response]: + ) -> ApiResponse[TweetFavoritersResponse]: """get_favoriters get tweet favoriters @@ -177,7 +177,7 @@ def get_favoriters_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFavoriters200Response", + '200': "TweetFavoritersResponse", } response_data = self.api_client.call_api( *_param, @@ -252,7 +252,7 @@ def get_favoriters_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFavoriters200Response", + '200': "TweetFavoritersResponse", } response_data = self.api_client.call_api( *_param, @@ -316,6 +316,7 @@ def _get_favoriters_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -374,7 +375,7 @@ def get_followers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetFollowers200Response: + ) -> FollowResponse: """get_followers get user list of followers @@ -418,7 +419,7 @@ def get_followers( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -449,7 +450,7 @@ def get_followers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetFollowers200Response]: + ) -> ApiResponse[FollowResponse]: """get_followers get user list of followers @@ -493,7 +494,7 @@ def get_followers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -568,7 +569,7 @@ def get_followers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -632,6 +633,7 @@ def _get_followers_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -690,7 +692,7 @@ def get_followers_you_know( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetFollowers200Response: + ) -> FollowResponse: """get_followers_you_know get followers you know @@ -734,7 +736,7 @@ def get_followers_you_know( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -765,7 +767,7 @@ def get_followers_you_know_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetFollowers200Response]: + ) -> ApiResponse[FollowResponse]: """get_followers_you_know get followers you know @@ -809,7 +811,7 @@ def get_followers_you_know_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -884,7 +886,7 @@ def get_followers_you_know_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -948,6 +950,7 @@ def _get_followers_you_know_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1006,7 +1009,7 @@ def get_following( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetFollowers200Response: + ) -> FollowResponse: """get_following get user list of following @@ -1050,7 +1053,7 @@ def get_following( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -1081,7 +1084,7 @@ def get_following_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetFollowers200Response]: + ) -> ApiResponse[FollowResponse]: """get_following get user list of following @@ -1125,7 +1128,7 @@ def get_following_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -1200,7 +1203,7 @@ def get_following_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFollowers200Response", + '200': "FollowResponse", } response_data = self.api_client.call_api( *_param, @@ -1264,6 +1267,7 @@ def _get_following_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -1322,7 +1326,7 @@ def get_retweeters( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetRetweeters200Response: + ) -> TweetRetweetersResponse: """get_retweeters get tweet retweeters @@ -1366,7 +1370,7 @@ def get_retweeters( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRetweeters200Response", + '200': "TweetRetweetersResponse", } response_data = self.api_client.call_api( *_param, @@ -1397,7 +1401,7 @@ def get_retweeters_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetRetweeters200Response]: + ) -> ApiResponse[TweetRetweetersResponse]: """get_retweeters get tweet retweeters @@ -1441,7 +1445,7 @@ def get_retweeters_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRetweeters200Response", + '200': "TweetRetweetersResponse", } response_data = self.api_client.call_api( *_param, @@ -1516,7 +1520,7 @@ def get_retweeters_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRetweeters200Response", + '200': "TweetRetweetersResponse", } response_data = self.api_client.call_api( *_param, @@ -1580,6 +1584,7 @@ def _get_retweeters_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/users_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/users_api.py index af1e7ec9..4e11f29e 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/users_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/users_api.py @@ -18,7 +18,7 @@ from typing_extensions import Annotated from pydantic import StrictStr -from twitter_openapi_python_generated.models.get_users_by_rest_ids200_response import GetUsersByRestIds200Response +from twitter_openapi_python_generated.models.users_response import UsersResponse from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized from twitter_openapi_python_generated.api_response import ApiResponse @@ -56,7 +56,7 @@ def get_users_by_rest_ids( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetUsersByRestIds200Response: + ) -> UsersResponse: """get_users_by_rest_ids get users by rest ids @@ -100,7 +100,7 @@ def get_users_by_rest_ids( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUsersByRestIds200Response", + '200': "UsersResponse", } response_data = self.api_client.call_api( *_param, @@ -131,7 +131,7 @@ def get_users_by_rest_ids_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetUsersByRestIds200Response]: + ) -> ApiResponse[UsersResponse]: """get_users_by_rest_ids get users by rest ids @@ -175,7 +175,7 @@ def get_users_by_rest_ids_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUsersByRestIds200Response", + '200': "UsersResponse", } response_data = self.api_client.call_api( *_param, @@ -250,7 +250,7 @@ def get_users_by_rest_ids_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetUsersByRestIds200Response", + '200': "UsersResponse", } response_data = self.api_client.call_api( *_param, @@ -314,6 +314,7 @@ def _get_users_by_rest_ids_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_get_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_get_api.py index c17e6dcd..3b5f997a 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_get_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_get_api.py @@ -546,6 +546,7 @@ def _get_friends_following_list_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -908,6 +909,7 @@ def _get_search_typeahead_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_post_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_post_api.py index 46a21804..4f002404 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_post_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v11_post_api.py @@ -480,6 +480,7 @@ def _post_create_friendships_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', @@ -963,6 +964,7 @@ def _post_destroy_friendships_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v20_get_api.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v20_get_api.py index a09c916b..0c6591c1 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v20_get_api.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api/v20_get_api.py @@ -886,6 +886,7 @@ def _get_search_adaptive_serialize( _auth_settings: List[str] = [ 'Accept', 'ClientLanguage', + 'Priority', 'Referer', 'SecFetchDest', 'SecChUaPlatform', diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/api_client.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/api_client.py index 8b4c17b5..09588036 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/api_client.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.0.24/python' + self.user_agent = 'OpenAPI-Generator/0.0.27/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/configuration.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/configuration.py index d139e557..c5ade2d4 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/configuration.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/configuration.py @@ -14,14 +14,16 @@ import copy +import http.client as httplib import logging from logging import FileHandler import multiprocessing import sys -from typing import Optional +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict +from typing_extensions import NotRequired, Self + import urllib3 -import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', @@ -29,6 +31,129 @@ 'minLength', 'pattern', 'maxItems', 'minItems' } +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "Accept": APIKeyAuthSetting, + "AcceptEncoding": APIKeyAuthSetting, + "AcceptLanguage": APIKeyAuthSetting, + "ActiveUser": APIKeyAuthSetting, + "AuthType": APIKeyAuthSetting, + "BearerAuth": BearerAuthSetting, + "ClientLanguage": APIKeyAuthSetting, + "ClientTransactionId": APIKeyAuthSetting, + "ClientUuid": APIKeyAuthSetting, + "CookieAuthToken": APIKeyAuthSetting, + "CookieCt0": APIKeyAuthSetting, + "CookieGt0": APIKeyAuthSetting, + "CsrfToken": APIKeyAuthSetting, + "GuestToken": APIKeyAuthSetting, + "Priority": APIKeyAuthSetting, + "Referer": APIKeyAuthSetting, + "SecChUa": APIKeyAuthSetting, + "SecChUaMobile": APIKeyAuthSetting, + "SecChUaPlatform": APIKeyAuthSetting, + "SecFetchDest": APIKeyAuthSetting, + "SecFetchMode": APIKeyAuthSetting, + "SecFetchSite": APIKeyAuthSetting, + "UserAgent": APIKeyAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + class Configuration: """This class contains various settings of the API client. @@ -82,20 +207,26 @@ class Configuration: Cookie: JSESSIONID abc123 """ - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ignore_operation_servers=False, - ssl_ca_cert=None, - retries=None, - *, - debug: Optional[bool] = None - ) -> None: + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + *, + debug: Optional[bool] = None, + ) -> None: """Constructor """ self._base_path = "https://x.com/i/api" if host is None else host @@ -219,7 +350,7 @@ def __init__(self, host=None, """date format """ - def __deepcopy__(self, memo): + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result @@ -233,11 +364,11 @@ def __deepcopy__(self, memo): result.debug = self.debug return result - def __setattr__(self, name, value): + def __setattr__(self, name: str, value: Any) -> None: object.__setattr__(self, name, value) @classmethod - def set_default(cls, default): + def set_default(cls, default: Optional[Self]) -> None: """Set default instance of configuration. It stores default configuration, which can be @@ -248,7 +379,7 @@ def set_default(cls, default): cls._default = default @classmethod - def get_default_copy(cls): + def get_default_copy(cls) -> Self: """Deprecated. Please use `get_default` instead. Deprecated. Please use `get_default` instead. @@ -258,7 +389,7 @@ def get_default_copy(cls): return cls.get_default() @classmethod - def get_default(cls): + def get_default(cls) -> Self: """Return the default configuration. This method returns newly created, based on default constructor, @@ -268,11 +399,11 @@ def get_default(cls): :return: The configuration object. """ if cls._default is None: - cls._default = Configuration() + cls._default = cls() return cls._default @property - def logger_file(self): + def logger_file(self) -> Optional[str]: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -284,7 +415,7 @@ def logger_file(self): return self.__logger_file @logger_file.setter - def logger_file(self, value): + def logger_file(self, value: Optional[str]) -> None: """The logger file. If the logger_file is None, then add stream handler and remove file @@ -303,7 +434,7 @@ def logger_file(self, value): logger.addHandler(self.logger_file_handler) @property - def debug(self): + def debug(self) -> bool: """Debug status :param value: The debug status, True or False. @@ -312,7 +443,7 @@ def debug(self): return self.__debug @debug.setter - def debug(self, value): + def debug(self, value: bool) -> None: """Debug status :param value: The debug status, True or False. @@ -334,7 +465,7 @@ def debug(self, value): httplib.HTTPConnection.debuglevel = 0 @property - def logger_format(self): + def logger_format(self) -> str: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -345,7 +476,7 @@ def logger_format(self): return self.__logger_format @logger_format.setter - def logger_format(self, value): + def logger_format(self, value: str) -> None: """The logger format. The logger_formatter will be updated when sets logger_format. @@ -356,7 +487,7 @@ def logger_format(self, value): self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix(self, identifier, alias=None): + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -373,7 +504,9 @@ def get_api_key_with_prefix(self, identifier, alias=None): else: return key - def get_basic_auth_token(self): + return None + + def get_basic_auth_token(self) -> Optional[str]: """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. @@ -388,12 +521,12 @@ def get_basic_auth_token(self): basic_auth=username + ':' + password ).get('authorization') - def auth_settings(self): + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ - auth = {} + auth: AuthSettings = {} if 'Accept' in self.api_key: auth['Accept'] = { 'type': 'api_key', @@ -518,6 +651,15 @@ def auth_settings(self): 'GuestToken', ), } + if 'Priority' in self.api_key: + auth['Priority'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'Priority', + 'value': self.get_api_key_with_prefix( + 'Priority', + ), + } if 'Referer' in self.api_key: auth['Referer'] = { 'type': 'api_key', @@ -592,7 +734,7 @@ def auth_settings(self): } return auth - def to_debug_report(self): + def to_debug_report(self) -> str: """Gets the essential information for debugging. :return: The report for debugging. @@ -601,10 +743,10 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.0.1\n"\ - "SDK Package Version: 0.0.24".\ + "SDK Package Version: 0.0.27".\ format(env=sys.platform, pyversion=sys.version) - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -620,7 +762,12 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -660,12 +807,12 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/__init__.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/__init__.py index 377aa96b..e9758001 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/__init__.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/__init__.py @@ -48,7 +48,9 @@ from twitter_openapi_python_generated.models.community_data import CommunityData from twitter_openapi_python_generated.models.community_delete_action_result import CommunityDeleteActionResult from twitter_openapi_python_generated.models.community_invites_result import CommunityInvitesResult -from twitter_openapi_python_generated.models.community_join_action_result import CommunityJoinActionResult +from twitter_openapi_python_generated.models.community_join_action import CommunityJoinAction +from twitter_openapi_python_generated.models.community_join_action_result_union import CommunityJoinActionResultUnion +from twitter_openapi_python_generated.models.community_join_action_unavailable import CommunityJoinActionUnavailable from twitter_openapi_python_generated.models.community_join_requests_result import CommunityJoinRequestsResult from twitter_openapi_python_generated.models.community_leave_action_result import CommunityLeaveActionResult from twitter_openapi_python_generated.models.community_pin_action_result import CommunityPinActionResult @@ -86,34 +88,18 @@ from twitter_openapi_python_generated.models.display_treatment import DisplayTreatment from twitter_openapi_python_generated.models.display_type import DisplayType from twitter_openapi_python_generated.models.entities import Entities -from twitter_openapi_python_generated.models.error import Error from twitter_openapi_python_generated.models.error_extensions import ErrorExtensions -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.errors_data import ErrorsData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.ext_media_availability import ExtMediaAvailability from twitter_openapi_python_generated.models.extended_entities import ExtendedEntities from twitter_openapi_python_generated.models.favorite_tweet import FavoriteTweet -from twitter_openapi_python_generated.models.favorite_tweet_response_data import FavoriteTweetResponseData +from twitter_openapi_python_generated.models.favorite_tweet_response import FavoriteTweetResponse from twitter_openapi_python_generated.models.feedback_info import FeedbackInfo from twitter_openapi_python_generated.models.follow_response import FollowResponse from twitter_openapi_python_generated.models.follow_response_data import FollowResponseData from twitter_openapi_python_generated.models.follow_response_result import FollowResponseResult from twitter_openapi_python_generated.models.follow_response_user import FollowResponseUser from twitter_openapi_python_generated.models.follow_timeline import FollowTimeline -from twitter_openapi_python_generated.models.get_bookmarks200_response import GetBookmarks200Response -from twitter_openapi_python_generated.models.get_favoriters200_response import GetFavoriters200Response -from twitter_openapi_python_generated.models.get_followers200_response import GetFollowers200Response -from twitter_openapi_python_generated.models.get_home_latest_timeline200_response import GetHomeLatestTimeline200Response -from twitter_openapi_python_generated.models.get_likes200_response import GetLikes200Response -from twitter_openapi_python_generated.models.get_list_latest_tweets_timeline200_response import GetListLatestTweetsTimeline200Response -from twitter_openapi_python_generated.models.get_profile_spotlights_query200_response import GetProfileSpotlightsQuery200Response -from twitter_openapi_python_generated.models.get_retweeters200_response import GetRetweeters200Response -from twitter_openapi_python_generated.models.get_search_timeline200_response import GetSearchTimeline200Response -from twitter_openapi_python_generated.models.get_tweet_detail200_response import GetTweetDetail200Response -from twitter_openapi_python_generated.models.get_tweet_result_by_rest_id200_response import GetTweetResultByRestId200Response -from twitter_openapi_python_generated.models.get_user_by_rest_id200_response import GetUserByRestId200Response -from twitter_openapi_python_generated.models.get_user_highlights_tweets200_response import GetUserHighlightsTweets200Response -from twitter_openapi_python_generated.models.get_users_by_rest_ids200_response import GetUsersByRestIds200Response from twitter_openapi_python_generated.models.highlight import Highlight from twitter_openapi_python_generated.models.home_timeline_home import HomeTimelineHome from twitter_openapi_python_generated.models.home_timeline_response_data import HomeTimelineResponseData @@ -149,14 +135,11 @@ from twitter_openapi_python_generated.models.note_tweet_result_rich_text import NoteTweetResultRichText from twitter_openapi_python_generated.models.note_tweet_result_rich_text_tag import NoteTweetResultRichTextTag from twitter_openapi_python_generated.models.one_factor_login_eligibility import OneFactorLoginEligibility -from twitter_openapi_python_generated.models.other_response import OtherResponse -from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response +from twitter_openapi_python_generated.models.other_object_all import OtherObjectAll from twitter_openapi_python_generated.models.post_create_bookmark_request import PostCreateBookmarkRequest from twitter_openapi_python_generated.models.post_create_bookmark_request_variables import PostCreateBookmarkRequestVariables -from twitter_openapi_python_generated.models.post_create_retweet200_response import PostCreateRetweet200Response from twitter_openapi_python_generated.models.post_create_retweet_request import PostCreateRetweetRequest from twitter_openapi_python_generated.models.post_create_retweet_request_variables import PostCreateRetweetRequestVariables -from twitter_openapi_python_generated.models.post_create_tweet200_response import PostCreateTweet200Response from twitter_openapi_python_generated.models.post_create_tweet_request import PostCreateTweetRequest from twitter_openapi_python_generated.models.post_create_tweet_request_features import PostCreateTweetRequestFeatures from twitter_openapi_python_generated.models.post_create_tweet_request_variables import PostCreateTweetRequestVariables @@ -164,16 +147,11 @@ from twitter_openapi_python_generated.models.post_create_tweet_request_variables_media import PostCreateTweetRequestVariablesMedia from twitter_openapi_python_generated.models.post_create_tweet_request_variables_media_media_entities_inner import PostCreateTweetRequestVariablesMediaMediaEntitiesInner from twitter_openapi_python_generated.models.post_create_tweet_request_variables_reply import PostCreateTweetRequestVariablesReply -from twitter_openapi_python_generated.models.post_delete_bookmark200_response import PostDeleteBookmark200Response from twitter_openapi_python_generated.models.post_delete_bookmark_request import PostDeleteBookmarkRequest -from twitter_openapi_python_generated.models.post_delete_retweet200_response import PostDeleteRetweet200Response from twitter_openapi_python_generated.models.post_delete_retweet_request import PostDeleteRetweetRequest from twitter_openapi_python_generated.models.post_delete_retweet_request_variables import PostDeleteRetweetRequestVariables -from twitter_openapi_python_generated.models.post_delete_tweet200_response import PostDeleteTweet200Response from twitter_openapi_python_generated.models.post_delete_tweet_request import PostDeleteTweetRequest -from twitter_openapi_python_generated.models.post_favorite_tweet200_response import PostFavoriteTweet200Response from twitter_openapi_python_generated.models.post_favorite_tweet_request import PostFavoriteTweetRequest -from twitter_openapi_python_generated.models.post_unfavorite_tweet200_response import PostUnfavoriteTweet200Response from twitter_openapi_python_generated.models.post_unfavorite_tweet_request import PostUnfavoriteTweetRequest from twitter_openapi_python_generated.models.primary_community_topic import PrimaryCommunityTopic from twitter_openapi_python_generated.models.profile_response import ProfileResponse @@ -264,7 +242,7 @@ from twitter_openapi_python_generated.models.tweet_with_visibility_results import TweetWithVisibilityResults from twitter_openapi_python_generated.models.type_name import TypeName from twitter_openapi_python_generated.models.unfavorite_tweet import UnfavoriteTweet -from twitter_openapi_python_generated.models.unfavorite_tweet_response_data import UnfavoriteTweetResponseData +from twitter_openapi_python_generated.models.unfavorite_tweet_response import UnfavoriteTweetResponse from twitter_openapi_python_generated.models.unified_card import UnifiedCard from twitter_openapi_python_generated.models.url import Url from twitter_openapi_python_generated.models.urt_endpoint_options import UrtEndpointOptions diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/author_community_relationship.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/author_community_relationship.py index 2376ff80..3f62aa8b 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/author_community_relationship.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/author_community_relationship.py @@ -40,8 +40,8 @@ def role_validate_enum(cls, value): if value is None: return value - if value not in set(['Member', 'Moderator']): - raise ValueError("must be one of enum values ('Member', 'Moderator')") + if value not in set(['Member', 'Moderator', 'Admin']): + raise ValueError("must be one of enum values ('Member', 'Moderator', 'Admin')") return value model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/birdwatch_pivot.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/birdwatch_pivot.py index 41c36ab8..e76824d1 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/birdwatch_pivot.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/birdwatch_pivot.py @@ -33,11 +33,11 @@ class BirdwatchPivot(BaseModel): """ # noqa: E501 call_to_action: Optional[BirdwatchPivotCallToAction] = Field(default=None, alias="callToAction") destination_url: StrictStr = Field(alias="destinationUrl") - footer: BirdwatchPivotFooter + footer: Optional[BirdwatchPivotFooter] = None icon_type: StrictStr = Field(alias="iconType") - note: BirdwatchPivotNote - shorttitle: StrictStr - subtitle: BirdwatchPivotSubtitle + note: Optional[BirdwatchPivotNote] = None + shorttitle: Optional[StrictStr] = None + subtitle: Optional[BirdwatchPivotSubtitle] = None title: StrictStr visual_style: Optional[StrictStr] = Field(default=None, alias="visualStyle") __properties: ClassVar[List[str]] = ["callToAction", "destinationUrl", "footer", "iconType", "note", "shorttitle", "subtitle", "title", "visualStyle"] @@ -55,8 +55,8 @@ def visual_style_validate_enum(cls, value): if value is None: return value - if value not in set(['Default']): - raise ValueError("must be one of enum values ('Default')") + if value not in set(['Default', 'Tentative']): + raise ValueError("must be one of enum values ('Default', 'Tentative')") return value model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/bookmarks_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/bookmarks_response.py index 6ec68d60..f3a4cc46 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/bookmarks_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/bookmarks_response.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.bookmarks_response_data import BookmarksResponseData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -28,8 +29,9 @@ class BookmarksResponse(BaseModel): """ BookmarksResponse """ # noqa: E501 - data: BookmarksResponseData - __properties: ClassVar[List[str]] = ["data"] + data: Optional[BookmarksResponseData] = None + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": BookmarksResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": BookmarksResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_actions.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_actions.py index 6008bebe..9b0748c6 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_actions.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_actions.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.community_delete_action_result import CommunityDeleteActionResult -from twitter_openapi_python_generated.models.community_join_action_result import CommunityJoinActionResult +from twitter_openapi_python_generated.models.community_join_action_result_union import CommunityJoinActionResultUnion from twitter_openapi_python_generated.models.community_leave_action_result import CommunityLeaveActionResult from twitter_openapi_python_generated.models.community_pin_action_result import CommunityPinActionResult from twitter_openapi_python_generated.models.community_unpin_action_result import CommunityUnpinActionResult @@ -33,7 +33,7 @@ class CommunityActions(BaseModel): CommunityActions """ # noqa: E501 delete_action_result: Optional[CommunityDeleteActionResult] = None - join_action_result: Optional[CommunityJoinActionResult] = None + join_action_result: Optional[CommunityJoinActionResultUnion] = None leave_action_result: Optional[CommunityLeaveActionResult] = None pin_action_result: Optional[CommunityPinActionResult] = None unpin_action_result: Optional[CommunityUnpinActionResult] = None @@ -106,7 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "delete_action_result": CommunityDeleteActionResult.from_dict(obj["delete_action_result"]) if obj.get("delete_action_result") is not None else None, - "join_action_result": CommunityJoinActionResult.from_dict(obj["join_action_result"]) if obj.get("join_action_result") is not None else None, + "join_action_result": CommunityJoinActionResultUnion.from_dict(obj["join_action_result"]) if obj.get("join_action_result") is not None else None, "leave_action_result": CommunityLeaveActionResult.from_dict(obj["leave_action_result"]) if obj.get("leave_action_result") is not None else None, "pin_action_result": CommunityPinActionResult.from_dict(obj["pin_action_result"]) if obj.get("pin_action_result") is not None else None, "unpin_action_result": CommunityUnpinActionResult.from_dict(obj["unpin_action_result"]) if obj.get("unpin_action_result") is not None else None diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_data.py index 8001f66d..6725237f 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_data.py @@ -74,15 +74,15 @@ def id_str_validate_regular_expression(cls, value): @field_validator('invites_policy') def invites_policy_validate_enum(cls, value): """Validates the enum""" - if value not in set(['MemberInvitesAllowed']): - raise ValueError("must be one of enum values ('MemberInvitesAllowed')") + if value not in set(['MemberInvitesAllowed', 'ModeratorInvitesAllowed']): + raise ValueError("must be one of enum values ('MemberInvitesAllowed', 'ModeratorInvitesAllowed')") return value @field_validator('join_policy') def join_policy_validate_enum(cls, value): """Validates the enum""" - if value not in set(['Open']): - raise ValueError("must be one of enum values ('Open')") + if value not in set(['Open', 'RestrictedJoinRequestsRequireModeratorApproval']): + raise ValueError("must be one of enum values ('Open', 'RestrictedJoinRequestsRequireModeratorApproval')") return value @field_validator('role') diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_result.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action.py similarity index 91% rename from twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_result.py rename to twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action.py index c42ce6d4..7a2069f4 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_result.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action.py @@ -24,9 +24,9 @@ from typing import Optional, Set from typing_extensions import Self -class CommunityJoinActionResult(BaseModel): +class CommunityJoinAction(BaseModel): """ - CommunityJoinActionResult + CommunityJoinAction """ # noqa: E501 typename: TypeName = Field(alias="__typename") __properties: ClassVar[List[str]] = ["__typename"] @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CommunityJoinActionResult from a JSON string""" + """Create an instance of CommunityJoinAction from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CommunityJoinActionResult from a dict""" + """Create an instance of CommunityJoinAction from a dict""" if obj is None: return None diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_tweet200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_result_union.py similarity index 54% rename from twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_tweet200_response.py rename to twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_result_union.py index 24a6ffbb..89610c24 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_tweet200_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_result_union.py @@ -18,24 +18,24 @@ import pprint from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from twitter_openapi_python_generated.models.delete_tweet_response import DeleteTweetResponse -from twitter_openapi_python_generated.models.errors import Errors +from twitter_openapi_python_generated.models.community_join_action import CommunityJoinAction +from twitter_openapi_python_generated.models.community_join_action_unavailable import CommunityJoinActionUnavailable from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -POSTDELETETWEET200RESPONSE_ONE_OF_SCHEMAS = ["DeleteTweetResponse", "Errors"] +COMMUNITYJOINACTIONRESULTUNION_ONE_OF_SCHEMAS = ["CommunityJoinAction", "CommunityJoinActionUnavailable"] -class PostDeleteTweet200Response(BaseModel): +class CommunityJoinActionResultUnion(BaseModel): """ - PostDeleteTweet200Response + CommunityJoinActionResultUnion """ - # data type: DeleteTweetResponse - oneof_schema_1_validator: Optional[DeleteTweetResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[DeleteTweetResponse, Errors]] = None - one_of_schemas: Set[str] = { "DeleteTweetResponse", "Errors" } + # data type: CommunityJoinAction + oneof_schema_1_validator: Optional[CommunityJoinAction] = None + # data type: CommunityJoinActionUnavailable + oneof_schema_2_validator: Optional[CommunityJoinActionUnavailable] = None + actual_instance: Optional[Union[CommunityJoinAction, CommunityJoinActionUnavailable]] = None + one_of_schemas: Set[str] = { "CommunityJoinAction", "CommunityJoinActionUnavailable" } model_config = ConfigDict( validate_assignment=True, @@ -43,6 +43,9 @@ class PostDeleteTweet200Response(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -55,25 +58,25 @@ def __init__(self, *args, **kwargs) -> None: @field_validator('actual_instance') def actual_instance_must_validate_oneof(cls, v): - instance = PostDeleteTweet200Response.model_construct() + instance = CommunityJoinActionResultUnion.model_construct() error_messages = [] match = 0 - # validate data type: DeleteTweetResponse - if not isinstance(v, DeleteTweetResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `DeleteTweetResponse`") + # validate data type: CommunityJoinAction + if not isinstance(v, CommunityJoinAction): + error_messages.append(f"Error! Input type `{type(v)}` is not `CommunityJoinAction`") else: match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") + # validate data type: CommunityJoinActionUnavailable + if not isinstance(v, CommunityJoinActionUnavailable): + error_messages.append(f"Error! Input type `{type(v)}` is not `CommunityJoinActionUnavailable`") else: match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostDeleteTweet200Response with oneOf schemas: DeleteTweetResponse, Errors. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in CommunityJoinActionResultUnion with oneOf schemas: CommunityJoinAction, CommunityJoinActionUnavailable. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in PostDeleteTweet200Response with oneOf schemas: DeleteTweetResponse, Errors. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in CommunityJoinActionResultUnion with oneOf schemas: CommunityJoinAction, CommunityJoinActionUnavailable. Details: " + ", ".join(error_messages)) else: return v @@ -88,25 +91,40 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 - # deserialize data into DeleteTweetResponse + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("__typename") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `__typename` in the input.") + + # check if data type is `CommunityJoinAction` + if _data_type == "CommunityJoinAction": + instance.actual_instance = CommunityJoinAction.from_json(json_str) + return instance + + # check if data type is `CommunityJoinActionUnavailable` + if _data_type == "CommunityJoinActionUnavailable": + instance.actual_instance = CommunityJoinActionUnavailable.from_json(json_str) + return instance + + # deserialize data into CommunityJoinAction try: - instance.actual_instance = DeleteTweetResponse.from_json(json_str) + instance.actual_instance = CommunityJoinAction.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into Errors + # deserialize data into CommunityJoinActionUnavailable try: - instance.actual_instance = Errors.from_json(json_str) + instance.actual_instance = CommunityJoinActionUnavailable.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostDeleteTweet200Response with oneOf schemas: DeleteTweetResponse, Errors. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into CommunityJoinActionResultUnion with oneOf schemas: CommunityJoinAction, CommunityJoinActionUnavailable. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into PostDeleteTweet200Response with oneOf schemas: DeleteTweetResponse, Errors. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into CommunityJoinActionResultUnion with oneOf schemas: CommunityJoinAction, CommunityJoinActionUnavailable. Details: " + ", ".join(error_messages)) else: return instance @@ -120,7 +138,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], DeleteTweetResponse, Errors]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], CommunityJoinAction, CommunityJoinActionUnavailable]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_unavailable.py similarity index 68% rename from twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet_response_data.py rename to twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_unavailable.py index 1ecaa6e7..d64e3115 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/community_join_action_unavailable.py @@ -18,18 +18,27 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List -from twitter_openapi_python_generated.models.favorite_tweet import FavoriteTweet +from twitter_openapi_python_generated.models.type_name import TypeName from typing import Optional, Set from typing_extensions import Self -class FavoriteTweetResponseData(BaseModel): +class CommunityJoinActionUnavailable(BaseModel): """ - FavoriteTweetResponseData + CommunityJoinActionUnavailable """ # noqa: E501 - data: FavoriteTweet - __properties: ClassVar[List[str]] = ["data"] + typename: TypeName = Field(alias="__typename") + message: StrictStr + reason: StrictStr + __properties: ClassVar[List[str]] = ["__typename", "message", "reason"] + + @field_validator('reason') + def reason_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ViewerRequestRequired']): + raise ValueError("must be one of enum values ('ViewerRequestRequired')") + return value model_config = ConfigDict( populate_by_name=True, @@ -49,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FavoriteTweetResponseData from a JSON string""" + """Create an instance of CommunityJoinActionUnavailable from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,14 +79,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FavoriteTweetResponseData from a dict""" + """Create an instance of CommunityJoinActionUnavailable from a dict""" if obj is None: return None @@ -85,7 +91,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": FavoriteTweet.from_dict(obj["data"]) if obj.get("data") is not None else None + "__typename": obj.get("__typename"), + "message": obj.get("message"), + "reason": obj.get("reason") }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response.py index 9afa5f89..4dae008e 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.create_bookmark_response_data import CreateBookmarkResponseData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class CreateBookmarkResponse(BaseModel): CreateBookmarkResponse """ # noqa: E501 data: CreateBookmarkResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": CreateBookmarkResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": CreateBookmarkResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response_data.py index 3582f346..a149c776 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_bookmark_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class CreateBookmarkResponseData(BaseModel): """ CreateBookmarkResponseData """ # noqa: E501 - tweet_bookmark_put: StrictStr + tweet_bookmark_put: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["tweet_bookmark_put"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response.py index bdf80a62..94d01a4c 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.create_retweet_response_data import CreateRetweetResponseData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class CreateRetweetResponse(BaseModel): CreateRetweetResponse """ # noqa: E501 data: CreateRetweetResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": CreateRetweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": CreateRetweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response_data.py index 108c1a02..db559a0b 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_retweet_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.create_retweet_response_result import CreateRetweetResponseResult from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class CreateRetweetResponseData(BaseModel): """ CreateRetweetResponseData """ # noqa: E501 - create_retweet: CreateRetweetResponseResult + create_retweet: Optional[CreateRetweetResponseResult] = None __properties: ClassVar[List[str]] = ["create_retweet"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response.py index 6b9d0c03..1ece1d2e 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.create_tweet_response_data import CreateTweetResponseData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class CreateTweetResponse(BaseModel): CreateTweetResponse """ # noqa: E501 data: CreateTweetResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": CreateTweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": CreateTweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response_data.py index 9dfd874c..2e5867d2 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/create_tweet_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.create_tweet_response_result import CreateTweetResponseResult from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class CreateTweetResponseData(BaseModel): """ CreateTweetResponseData """ # noqa: E501 - create_tweet: CreateTweetResponseResult + create_tweet: Optional[CreateTweetResponseResult] = None __properties: ClassVar[List[str]] = ["create_tweet"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response.py index 8c77d788..ddf3917f 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.delete_bookmark_response_data import DeleteBookmarkResponseData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class DeleteBookmarkResponse(BaseModel): DeleteBookmarkResponse """ # noqa: E501 data: DeleteBookmarkResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": DeleteBookmarkResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": DeleteBookmarkResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response_data.py index 4aae14ec..ecae1cb3 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_bookmark_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class DeleteBookmarkResponseData(BaseModel): """ DeleteBookmarkResponseData """ # noqa: E501 - tweet_bookmark_delete: StrictStr + tweet_bookmark_delete: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["tweet_bookmark_delete"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response.py index 2971f159..3caf32c1 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.delete_retweet_response_data import DeleteRetweetResponseData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class DeleteRetweetResponse(BaseModel): DeleteRetweetResponse """ # noqa: E501 data: DeleteRetweetResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": DeleteRetweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": DeleteRetweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response_data.py index 2e934c64..e83766a8 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_retweet_response_data.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from twitter_openapi_python_generated.models.create_retweet_response_result import CreateRetweetResponseResult +from twitter_openapi_python_generated.models.delete_retweet_response_result import DeleteRetweetResponseResult from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class DeleteRetweetResponseData(BaseModel): """ DeleteRetweetResponseData """ # noqa: E501 - create_retweet: Optional[CreateRetweetResponseResult] = None + create_retweet: Optional[DeleteRetweetResponseResult] = None __properties: ClassVar[List[str]] = ["create_retweet"] model_config = ConfigDict( @@ -85,7 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "create_retweet": CreateRetweetResponseResult.from_dict(obj["create_retweet"]) if obj.get("create_retweet") is not None else None + "create_retweet": DeleteRetweetResponseResult.from_dict(obj["create_retweet"]) if obj.get("create_retweet") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_tweet_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_tweet_response.py index 5aa081ba..887331b4 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_tweet_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/delete_tweet_response.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.delete_tweet_response_data import DeleteTweetResponseData +from twitter_openapi_python_generated.models.error_response import ErrorResponse from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class DeleteTweetResponse(BaseModel): DeleteTweetResponse """ # noqa: E501 data: DeleteTweetResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": DeleteTweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": DeleteTweetResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/error.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/error_response.py similarity index 95% rename from twitter_openapi_python_generated/twitter_openapi_python_generated/models/error.py rename to twitter_openapi_python_generated/twitter_openapi_python_generated/models/error_response.py index 5bf73905..70478fff 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/error.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/error_response.py @@ -26,9 +26,9 @@ from typing import Optional, Set from typing_extensions import Self -class Error(BaseModel): +class ErrorResponse(BaseModel): """ - Error + ErrorResponse """ # noqa: E501 code: StrictInt extensions: ErrorExtensions @@ -36,7 +36,7 @@ class Error(BaseModel): locations: List[Location] message: StrictStr name: StrictStr - path: List[StrictStr] + path: List[Any] retry_after: Optional[StrictInt] = None source: StrictStr tracing: Tracing @@ -60,7 +60,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Error from a JSON string""" + """Create an instance of ErrorResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -98,7 +98,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Error from a dict""" + """Create an instance of ErrorResponse from a dict""" if obj is None: return None diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/errors_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/errors_data.py deleted file mode 100644 index 58613519..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/errors_data.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ErrorsData(BaseModel): - """ - ErrorsData - """ # noqa: E501 - user: Optional[Annotated[str, Field(strict=True)]] = None - __properties: ClassVar[List[str]] = ["user"] - - @field_validator('user') - def user_validate_regular_expression(cls, value): - """Validates the regular expression""" - if value is None: - return value - - if not re.match(r"dummy", value): - raise ValueError(r"must validate the regular expression /dummy/") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorsData from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorsData from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "user": obj.get("user") - }) - return _obj - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet.py index fa72b173..a593a835 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class FavoriteTweet(BaseModel): """ FavoriteTweet """ # noqa: E501 - favorite_tweet: StrictStr + favorite_tweet: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["favorite_tweet"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/errors.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet_response.py similarity index 79% rename from twitter_openapi_python_generated/twitter_openapi_python_generated/models/errors.py rename to twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet_response.py index edea68a5..69ae7d8c 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/errors.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/favorite_tweet_response.py @@ -20,17 +20,17 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from twitter_openapi_python_generated.models.error import Error -from twitter_openapi_python_generated.models.errors_data import ErrorsData +from twitter_openapi_python_generated.models.error_response import ErrorResponse +from twitter_openapi_python_generated.models.favorite_tweet import FavoriteTweet from typing import Optional, Set from typing_extensions import Self -class Errors(BaseModel): +class FavoriteTweetResponse(BaseModel): """ - Errors + FavoriteTweetResponse """ # noqa: E501 - data: Optional[ErrorsData] = None - errors: List[Error] + data: FavoriteTweet + errors: Optional[List[ErrorResponse]] = None __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( @@ -51,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Errors from a JSON string""" + """Create an instance of FavoriteTweetResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Errors from a dict""" + """Create an instance of FavoriteTweetResponse from a dict""" if obj is None: return None @@ -94,8 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": ErrorsData.from_dict(obj["data"]) if obj.get("data") is not None else None, - "errors": [Error.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None + "data": FavoriteTweet.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response.py index 9923d962..73aef7a7 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.follow_response_data import FollowResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class FollowResponse(BaseModel): FollowResponse """ # noqa: E501 data: FollowResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": FollowResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": FollowResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response_data.py index fb1b8293..514c27d1 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/follow_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.follow_response_user import FollowResponseUser from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class FollowResponseData(BaseModel): """ FollowResponseData """ # noqa: E501 - user: FollowResponseUser + user: Optional[FollowResponseUser] = None __properties: ClassVar[List[str]] = ["user"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_bookmarks200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_bookmarks200_response.py deleted file mode 100644 index f7f876e0..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_bookmarks200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.bookmarks_response import BookmarksResponse -from twitter_openapi_python_generated.models.errors import Errors -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETBOOKMARKS200RESPONSE_ONE_OF_SCHEMAS = ["BookmarksResponse", "Errors"] - -class GetBookmarks200Response(BaseModel): - """ - GetBookmarks200Response - """ - # data type: BookmarksResponse - oneof_schema_1_validator: Optional[BookmarksResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[BookmarksResponse, Errors]] = None - one_of_schemas: Set[str] = { "BookmarksResponse", "Errors" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetBookmarks200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: BookmarksResponse - if not isinstance(v, BookmarksResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `BookmarksResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetBookmarks200Response with oneOf schemas: BookmarksResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetBookmarks200Response with oneOf schemas: BookmarksResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into BookmarksResponse - try: - instance.actual_instance = BookmarksResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetBookmarks200Response with oneOf schemas: BookmarksResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetBookmarks200Response with oneOf schemas: BookmarksResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], BookmarksResponse, Errors]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_favoriters200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_favoriters200_response.py deleted file mode 100644 index 63deeeb4..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_favoriters200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.tweet_favoriters_response import TweetFavoritersResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETFAVORITERS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetFavoritersResponse"] - -class GetFavoriters200Response(BaseModel): - """ - GetFavoriters200Response - """ - # data type: TweetFavoritersResponse - oneof_schema_1_validator: Optional[TweetFavoritersResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, TweetFavoritersResponse]] = None - one_of_schemas: Set[str] = { "Errors", "TweetFavoritersResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetFavoriters200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: TweetFavoritersResponse - if not isinstance(v, TweetFavoritersResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `TweetFavoritersResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetFavoriters200Response with oneOf schemas: Errors, TweetFavoritersResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetFavoriters200Response with oneOf schemas: Errors, TweetFavoritersResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into TweetFavoritersResponse - try: - instance.actual_instance = TweetFavoritersResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetFavoriters200Response with oneOf schemas: Errors, TweetFavoritersResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetFavoriters200Response with oneOf schemas: Errors, TweetFavoritersResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetFavoritersResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_followers200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_followers200_response.py deleted file mode 100644 index 7e264692..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_followers200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.follow_response import FollowResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETFOLLOWERS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "FollowResponse"] - -class GetFollowers200Response(BaseModel): - """ - GetFollowers200Response - """ - # data type: FollowResponse - oneof_schema_1_validator: Optional[FollowResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, FollowResponse]] = None - one_of_schemas: Set[str] = { "Errors", "FollowResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetFollowers200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: FollowResponse - if not isinstance(v, FollowResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `FollowResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetFollowers200Response with oneOf schemas: Errors, FollowResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetFollowers200Response with oneOf schemas: Errors, FollowResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into FollowResponse - try: - instance.actual_instance = FollowResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetFollowers200Response with oneOf schemas: Errors, FollowResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetFollowers200Response with oneOf schemas: Errors, FollowResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, FollowResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_home_latest_timeline200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_home_latest_timeline200_response.py deleted file mode 100644 index 177bac32..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_home_latest_timeline200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.timeline_response import TimelineResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETHOMELATESTTIMELINE200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TimelineResponse"] - -class GetHomeLatestTimeline200Response(BaseModel): - """ - GetHomeLatestTimeline200Response - """ - # data type: TimelineResponse - oneof_schema_1_validator: Optional[TimelineResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, TimelineResponse]] = None - one_of_schemas: Set[str] = { "Errors", "TimelineResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetHomeLatestTimeline200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: TimelineResponse - if not isinstance(v, TimelineResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `TimelineResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetHomeLatestTimeline200Response with oneOf schemas: Errors, TimelineResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetHomeLatestTimeline200Response with oneOf schemas: Errors, TimelineResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into TimelineResponse - try: - instance.actual_instance = TimelineResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetHomeLatestTimeline200Response with oneOf schemas: Errors, TimelineResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetHomeLatestTimeline200Response with oneOf schemas: Errors, TimelineResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TimelineResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_likes200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_likes200_response.py deleted file mode 100644 index 1f311b58..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_likes200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.user_tweets_response import UserTweetsResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETLIKES200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "UserTweetsResponse"] - -class GetLikes200Response(BaseModel): - """ - GetLikes200Response - """ - # data type: UserTweetsResponse - oneof_schema_1_validator: Optional[UserTweetsResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, UserTweetsResponse]] = None - one_of_schemas: Set[str] = { "Errors", "UserTweetsResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetLikes200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: UserTweetsResponse - if not isinstance(v, UserTweetsResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserTweetsResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetLikes200Response with oneOf schemas: Errors, UserTweetsResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetLikes200Response with oneOf schemas: Errors, UserTweetsResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into UserTweetsResponse - try: - instance.actual_instance = UserTweetsResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetLikes200Response with oneOf schemas: Errors, UserTweetsResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetLikes200Response with oneOf schemas: Errors, UserTweetsResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, UserTweetsResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_list_latest_tweets_timeline200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_list_latest_tweets_timeline200_response.py deleted file mode 100644 index 7d7226d4..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_list_latest_tweets_timeline200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.list_latest_tweets_timeline_response import ListLatestTweetsTimelineResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETLISTLATESTTWEETSTIMELINE200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "ListLatestTweetsTimelineResponse"] - -class GetListLatestTweetsTimeline200Response(BaseModel): - """ - GetListLatestTweetsTimeline200Response - """ - # data type: ListLatestTweetsTimelineResponse - oneof_schema_1_validator: Optional[ListLatestTweetsTimelineResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, ListLatestTweetsTimelineResponse]] = None - one_of_schemas: Set[str] = { "Errors", "ListLatestTweetsTimelineResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetListLatestTweetsTimeline200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: ListLatestTweetsTimelineResponse - if not isinstance(v, ListLatestTweetsTimelineResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `ListLatestTweetsTimelineResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetListLatestTweetsTimeline200Response with oneOf schemas: Errors, ListLatestTweetsTimelineResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetListLatestTweetsTimeline200Response with oneOf schemas: Errors, ListLatestTweetsTimelineResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into ListLatestTweetsTimelineResponse - try: - instance.actual_instance = ListLatestTweetsTimelineResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetListLatestTweetsTimeline200Response with oneOf schemas: Errors, ListLatestTweetsTimelineResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetListLatestTweetsTimeline200Response with oneOf schemas: Errors, ListLatestTweetsTimelineResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, ListLatestTweetsTimelineResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_profile_spotlights_query200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_profile_spotlights_query200_response.py deleted file mode 100644 index 4167049e..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_profile_spotlights_query200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.profile_response import ProfileResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETPROFILESPOTLIGHTSQUERY200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "ProfileResponse"] - -class GetProfileSpotlightsQuery200Response(BaseModel): - """ - GetProfileSpotlightsQuery200Response - """ - # data type: ProfileResponse - oneof_schema_1_validator: Optional[ProfileResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, ProfileResponse]] = None - one_of_schemas: Set[str] = { "Errors", "ProfileResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetProfileSpotlightsQuery200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: ProfileResponse - if not isinstance(v, ProfileResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `ProfileResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetProfileSpotlightsQuery200Response with oneOf schemas: Errors, ProfileResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetProfileSpotlightsQuery200Response with oneOf schemas: Errors, ProfileResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into ProfileResponse - try: - instance.actual_instance = ProfileResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetProfileSpotlightsQuery200Response with oneOf schemas: Errors, ProfileResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetProfileSpotlightsQuery200Response with oneOf schemas: Errors, ProfileResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, ProfileResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_retweeters200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_retweeters200_response.py deleted file mode 100644 index fba5e8e8..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_retweeters200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.tweet_retweeters_response import TweetRetweetersResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETRETWEETERS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetRetweetersResponse"] - -class GetRetweeters200Response(BaseModel): - """ - GetRetweeters200Response - """ - # data type: TweetRetweetersResponse - oneof_schema_1_validator: Optional[TweetRetweetersResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, TweetRetweetersResponse]] = None - one_of_schemas: Set[str] = { "Errors", "TweetRetweetersResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetRetweeters200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: TweetRetweetersResponse - if not isinstance(v, TweetRetweetersResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `TweetRetweetersResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetRetweeters200Response with oneOf schemas: Errors, TweetRetweetersResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetRetweeters200Response with oneOf schemas: Errors, TweetRetweetersResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into TweetRetweetersResponse - try: - instance.actual_instance = TweetRetweetersResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetRetweeters200Response with oneOf schemas: Errors, TweetRetweetersResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetRetweeters200Response with oneOf schemas: Errors, TweetRetweetersResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetRetweetersResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_search_timeline200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_search_timeline200_response.py deleted file mode 100644 index c882eb0d..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_search_timeline200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.search_timeline_response import SearchTimelineResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETSEARCHTIMELINE200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "SearchTimelineResponse"] - -class GetSearchTimeline200Response(BaseModel): - """ - GetSearchTimeline200Response - """ - # data type: SearchTimelineResponse - oneof_schema_1_validator: Optional[SearchTimelineResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, SearchTimelineResponse]] = None - one_of_schemas: Set[str] = { "Errors", "SearchTimelineResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetSearchTimeline200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: SearchTimelineResponse - if not isinstance(v, SearchTimelineResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `SearchTimelineResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetSearchTimeline200Response with oneOf schemas: Errors, SearchTimelineResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetSearchTimeline200Response with oneOf schemas: Errors, SearchTimelineResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into SearchTimelineResponse - try: - instance.actual_instance = SearchTimelineResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetSearchTimeline200Response with oneOf schemas: Errors, SearchTimelineResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetSearchTimeline200Response with oneOf schemas: Errors, SearchTimelineResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, SearchTimelineResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_tweet_detail200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_tweet_detail200_response.py deleted file mode 100644 index 1d19006f..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_tweet_detail200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.tweet_detail_response import TweetDetailResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETTWEETDETAIL200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetDetailResponse"] - -class GetTweetDetail200Response(BaseModel): - """ - GetTweetDetail200Response - """ - # data type: TweetDetailResponse - oneof_schema_1_validator: Optional[TweetDetailResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, TweetDetailResponse]] = None - one_of_schemas: Set[str] = { "Errors", "TweetDetailResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetTweetDetail200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: TweetDetailResponse - if not isinstance(v, TweetDetailResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `TweetDetailResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetTweetDetail200Response with oneOf schemas: Errors, TweetDetailResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetTweetDetail200Response with oneOf schemas: Errors, TweetDetailResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into TweetDetailResponse - try: - instance.actual_instance = TweetDetailResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetTweetDetail200Response with oneOf schemas: Errors, TweetDetailResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetTweetDetail200Response with oneOf schemas: Errors, TweetDetailResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetDetailResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_tweet_result_by_rest_id200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_tweet_result_by_rest_id200_response.py deleted file mode 100644 index d1d68468..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_tweet_result_by_rest_id200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.tweet_result_by_rest_id_response import TweetResultByRestIdResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETTWEETRESULTBYRESTID200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetResultByRestIdResponse"] - -class GetTweetResultByRestId200Response(BaseModel): - """ - GetTweetResultByRestId200Response - """ - # data type: TweetResultByRestIdResponse - oneof_schema_1_validator: Optional[TweetResultByRestIdResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, TweetResultByRestIdResponse]] = None - one_of_schemas: Set[str] = { "Errors", "TweetResultByRestIdResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetTweetResultByRestId200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: TweetResultByRestIdResponse - if not isinstance(v, TweetResultByRestIdResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `TweetResultByRestIdResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetTweetResultByRestId200Response with oneOf schemas: Errors, TweetResultByRestIdResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetTweetResultByRestId200Response with oneOf schemas: Errors, TweetResultByRestIdResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into TweetResultByRestIdResponse - try: - instance.actual_instance = TweetResultByRestIdResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetTweetResultByRestId200Response with oneOf schemas: Errors, TweetResultByRestIdResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetTweetResultByRestId200Response with oneOf schemas: Errors, TweetResultByRestIdResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetResultByRestIdResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_user_by_rest_id200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_user_by_rest_id200_response.py deleted file mode 100644 index 0cb609f4..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_user_by_rest_id200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.user_response import UserResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETUSERBYRESTID200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "UserResponse"] - -class GetUserByRestId200Response(BaseModel): - """ - GetUserByRestId200Response - """ - # data type: UserResponse - oneof_schema_1_validator: Optional[UserResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, UserResponse]] = None - one_of_schemas: Set[str] = { "Errors", "UserResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetUserByRestId200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: UserResponse - if not isinstance(v, UserResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetUserByRestId200Response with oneOf schemas: Errors, UserResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetUserByRestId200Response with oneOf schemas: Errors, UserResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into UserResponse - try: - instance.actual_instance = UserResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetUserByRestId200Response with oneOf schemas: Errors, UserResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetUserByRestId200Response with oneOf schemas: Errors, UserResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, UserResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_user_highlights_tweets200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_user_highlights_tweets200_response.py deleted file mode 100644 index 26206c1d..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_user_highlights_tweets200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.user_highlights_tweets_response import UserHighlightsTweetsResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETUSERHIGHLIGHTSTWEETS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "UserHighlightsTweetsResponse"] - -class GetUserHighlightsTweets200Response(BaseModel): - """ - GetUserHighlightsTweets200Response - """ - # data type: UserHighlightsTweetsResponse - oneof_schema_1_validator: Optional[UserHighlightsTweetsResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, UserHighlightsTweetsResponse]] = None - one_of_schemas: Set[str] = { "Errors", "UserHighlightsTweetsResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetUserHighlightsTweets200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: UserHighlightsTweetsResponse - if not isinstance(v, UserHighlightsTweetsResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserHighlightsTweetsResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetUserHighlightsTweets200Response with oneOf schemas: Errors, UserHighlightsTweetsResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetUserHighlightsTweets200Response with oneOf schemas: Errors, UserHighlightsTweetsResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into UserHighlightsTweetsResponse - try: - instance.actual_instance = UserHighlightsTweetsResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetUserHighlightsTweets200Response with oneOf schemas: Errors, UserHighlightsTweetsResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetUserHighlightsTweets200Response with oneOf schemas: Errors, UserHighlightsTweetsResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, UserHighlightsTweetsResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_users_by_rest_ids200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_users_by_rest_ids200_response.py deleted file mode 100644 index 6daabfb8..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/get_users_by_rest_ids200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.users_response import UsersResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -GETUSERSBYRESTIDS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "UsersResponse"] - -class GetUsersByRestIds200Response(BaseModel): - """ - GetUsersByRestIds200Response - """ - # data type: UsersResponse - oneof_schema_1_validator: Optional[UsersResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, UsersResponse]] = None - one_of_schemas: Set[str] = { "Errors", "UsersResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = GetUsersByRestIds200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: UsersResponse - if not isinstance(v, UsersResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `UsersResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in GetUsersByRestIds200Response with oneOf schemas: Errors, UsersResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in GetUsersByRestIds200Response with oneOf schemas: Errors, UsersResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into UsersResponse - try: - instance.actual_instance = UsersResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into GetUsersByRestIds200Response with oneOf schemas: Errors, UsersResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into GetUsersByRestIds200Response with oneOf schemas: Errors, UsersResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, UsersResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/home_timeline_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/home_timeline_response_data.py index 93fc0f9a..aa40ce3e 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/home_timeline_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/home_timeline_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.home_timeline_home import HomeTimelineHome from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class HomeTimelineResponseData(BaseModel): """ HomeTimelineResponseData """ # noqa: E501 - home: HomeTimelineHome + home: Optional[HomeTimelineHome] = None __properties: ClassVar[List[str]] = ["home"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py index 55d3f970..44d5f014 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.list_tweets_timeline_data import ListTweetsTimelineData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class ListLatestTweetsTimelineResponse(BaseModel): ListLatestTweetsTimelineResponse """ # noqa: E501 data: ListTweetsTimelineData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": ListTweetsTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": ListTweetsTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_tweets_timeline_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_tweets_timeline_data.py index f48258d6..df8a4e0e 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_tweets_timeline_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/list_tweets_timeline_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.list_tweets_timeline_list import ListTweetsTimelineList from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class ListTweetsTimelineData(BaseModel): """ ListTweetsTimelineData """ # noqa: E501 - list: ListTweetsTimelineList + list: Optional[ListTweetsTimelineList] = None __properties: ClassVar[List[str]] = ["list"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/other_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/other_object_all.py similarity index 93% rename from twitter_openapi_python_generated/twitter_openapi_python_generated/models/other_response.py rename to twitter_openapi_python_generated/twitter_openapi_python_generated/models/other_object_all.py index c5ebb0ae..fe56d693 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/other_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/other_object_all.py @@ -24,9 +24,9 @@ from typing import Optional, Set from typing_extensions import Self -class OtherResponse(BaseModel): +class OtherObjectAll(BaseModel): """ - OtherResponse + OtherObjectAll """ # noqa: E501 session: Optional[Session] = Field(default=None, alias="Session") __properties: ClassVar[List[str]] = ["Session"] @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OtherResponse from a JSON string""" + """Create an instance of OtherObjectAll from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OtherResponse from a dict""" + """Create an instance of OtherObjectAll from a dict""" if obj is None: return None diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_bookmark200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_bookmark200_response.py deleted file mode 100644 index 2c4db72e..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_bookmark200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.create_bookmark_response import CreateBookmarkResponse -from twitter_openapi_python_generated.models.errors import Errors -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -POSTCREATEBOOKMARK200RESPONSE_ONE_OF_SCHEMAS = ["CreateBookmarkResponse", "Errors"] - -class PostCreateBookmark200Response(BaseModel): - """ - PostCreateBookmark200Response - """ - # data type: CreateBookmarkResponse - oneof_schema_1_validator: Optional[CreateBookmarkResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[CreateBookmarkResponse, Errors]] = None - one_of_schemas: Set[str] = { "CreateBookmarkResponse", "Errors" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = PostCreateBookmark200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: CreateBookmarkResponse - if not isinstance(v, CreateBookmarkResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `CreateBookmarkResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostCreateBookmark200Response with oneOf schemas: CreateBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in PostCreateBookmark200Response with oneOf schemas: CreateBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into CreateBookmarkResponse - try: - instance.actual_instance = CreateBookmarkResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostCreateBookmark200Response with oneOf schemas: CreateBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into PostCreateBookmark200Response with oneOf schemas: CreateBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], CreateBookmarkResponse, Errors]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_retweet200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_retweet200_response.py deleted file mode 100644 index db20ea64..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_retweet200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.create_retweet_response import CreateRetweetResponse -from twitter_openapi_python_generated.models.errors import Errors -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -POSTCREATERETWEET200RESPONSE_ONE_OF_SCHEMAS = ["CreateRetweetResponse", "Errors"] - -class PostCreateRetweet200Response(BaseModel): - """ - PostCreateRetweet200Response - """ - # data type: CreateRetweetResponse - oneof_schema_1_validator: Optional[CreateRetweetResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[CreateRetweetResponse, Errors]] = None - one_of_schemas: Set[str] = { "CreateRetweetResponse", "Errors" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = PostCreateRetweet200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: CreateRetweetResponse - if not isinstance(v, CreateRetweetResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `CreateRetweetResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostCreateRetweet200Response with oneOf schemas: CreateRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in PostCreateRetweet200Response with oneOf schemas: CreateRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into CreateRetweetResponse - try: - instance.actual_instance = CreateRetweetResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostCreateRetweet200Response with oneOf schemas: CreateRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into PostCreateRetweet200Response with oneOf schemas: CreateRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], CreateRetweetResponse, Errors]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_tweet200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_tweet200_response.py deleted file mode 100644 index 509973f8..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_create_tweet200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.create_tweet_response import CreateTweetResponse -from twitter_openapi_python_generated.models.errors import Errors -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -POSTCREATETWEET200RESPONSE_ONE_OF_SCHEMAS = ["CreateTweetResponse", "Errors"] - -class PostCreateTweet200Response(BaseModel): - """ - PostCreateTweet200Response - """ - # data type: CreateTweetResponse - oneof_schema_1_validator: Optional[CreateTweetResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[CreateTweetResponse, Errors]] = None - one_of_schemas: Set[str] = { "CreateTweetResponse", "Errors" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = PostCreateTweet200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: CreateTweetResponse - if not isinstance(v, CreateTweetResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `CreateTweetResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostCreateTweet200Response with oneOf schemas: CreateTweetResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in PostCreateTweet200Response with oneOf schemas: CreateTweetResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into CreateTweetResponse - try: - instance.actual_instance = CreateTweetResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostCreateTweet200Response with oneOf schemas: CreateTweetResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into PostCreateTweet200Response with oneOf schemas: CreateTweetResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], CreateTweetResponse, Errors]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_bookmark200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_bookmark200_response.py deleted file mode 100644 index 9eef6624..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_bookmark200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.delete_bookmark_response import DeleteBookmarkResponse -from twitter_openapi_python_generated.models.errors import Errors -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -POSTDELETEBOOKMARK200RESPONSE_ONE_OF_SCHEMAS = ["DeleteBookmarkResponse", "Errors"] - -class PostDeleteBookmark200Response(BaseModel): - """ - PostDeleteBookmark200Response - """ - # data type: DeleteBookmarkResponse - oneof_schema_1_validator: Optional[DeleteBookmarkResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[DeleteBookmarkResponse, Errors]] = None - one_of_schemas: Set[str] = { "DeleteBookmarkResponse", "Errors" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = PostDeleteBookmark200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: DeleteBookmarkResponse - if not isinstance(v, DeleteBookmarkResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `DeleteBookmarkResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostDeleteBookmark200Response with oneOf schemas: DeleteBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in PostDeleteBookmark200Response with oneOf schemas: DeleteBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into DeleteBookmarkResponse - try: - instance.actual_instance = DeleteBookmarkResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostDeleteBookmark200Response with oneOf schemas: DeleteBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into PostDeleteBookmark200Response with oneOf schemas: DeleteBookmarkResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], DeleteBookmarkResponse, Errors]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_retweet200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_retweet200_response.py deleted file mode 100644 index f3471942..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_delete_retweet200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.delete_retweet_response import DeleteRetweetResponse -from twitter_openapi_python_generated.models.errors import Errors -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -POSTDELETERETWEET200RESPONSE_ONE_OF_SCHEMAS = ["DeleteRetweetResponse", "Errors"] - -class PostDeleteRetweet200Response(BaseModel): - """ - PostDeleteRetweet200Response - """ - # data type: DeleteRetweetResponse - oneof_schema_1_validator: Optional[DeleteRetweetResponse] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[DeleteRetweetResponse, Errors]] = None - one_of_schemas: Set[str] = { "DeleteRetweetResponse", "Errors" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = PostDeleteRetweet200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: DeleteRetweetResponse - if not isinstance(v, DeleteRetweetResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `DeleteRetweetResponse`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostDeleteRetweet200Response with oneOf schemas: DeleteRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in PostDeleteRetweet200Response with oneOf schemas: DeleteRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into DeleteRetweetResponse - try: - instance.actual_instance = DeleteRetweetResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostDeleteRetweet200Response with oneOf schemas: DeleteRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into PostDeleteRetweet200Response with oneOf schemas: DeleteRetweetResponse, Errors. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], DeleteRetweetResponse, Errors]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_favorite_tweet200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_favorite_tweet200_response.py deleted file mode 100644 index 7c436732..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_favorite_tweet200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.favorite_tweet_response_data import FavoriteTweetResponseData -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -POSTFAVORITETWEET200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "FavoriteTweetResponseData"] - -class PostFavoriteTweet200Response(BaseModel): - """ - PostFavoriteTweet200Response - """ - # data type: FavoriteTweetResponseData - oneof_schema_1_validator: Optional[FavoriteTweetResponseData] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, FavoriteTweetResponseData]] = None - one_of_schemas: Set[str] = { "Errors", "FavoriteTweetResponseData" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = PostFavoriteTweet200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: FavoriteTweetResponseData - if not isinstance(v, FavoriteTweetResponseData): - error_messages.append(f"Error! Input type `{type(v)}` is not `FavoriteTweetResponseData`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostFavoriteTweet200Response with oneOf schemas: Errors, FavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in PostFavoriteTweet200Response with oneOf schemas: Errors, FavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into FavoriteTweetResponseData - try: - instance.actual_instance = FavoriteTweetResponseData.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostFavoriteTweet200Response with oneOf schemas: Errors, FavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into PostFavoriteTweet200Response with oneOf schemas: Errors, FavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, FavoriteTweetResponseData]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_unfavorite_tweet200_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_unfavorite_tweet200_response.py deleted file mode 100644 index 0cb93539..00000000 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/post_unfavorite_tweet200_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Twitter OpenAPI - - Twitter OpenAPI(Swagger) specification - - The version of the OpenAPI document: 0.0.1 - Contact: yuki@yuki0311.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from twitter_openapi_python_generated.models.errors import Errors -from twitter_openapi_python_generated.models.unfavorite_tweet_response_data import UnfavoriteTweetResponseData -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -POSTUNFAVORITETWEET200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "UnfavoriteTweetResponseData"] - -class PostUnfavoriteTweet200Response(BaseModel): - """ - PostUnfavoriteTweet200Response - """ - # data type: UnfavoriteTweetResponseData - oneof_schema_1_validator: Optional[UnfavoriteTweetResponseData] = None - # data type: Errors - oneof_schema_2_validator: Optional[Errors] = None - actual_instance: Optional[Union[Errors, UnfavoriteTweetResponseData]] = None - one_of_schemas: Set[str] = { "Errors", "UnfavoriteTweetResponseData" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = PostUnfavoriteTweet200Response.model_construct() - error_messages = [] - match = 0 - # validate data type: UnfavoriteTweetResponseData - if not isinstance(v, UnfavoriteTweetResponseData): - error_messages.append(f"Error! Input type `{type(v)}` is not `UnfavoriteTweetResponseData`") - else: - match += 1 - # validate data type: Errors - if not isinstance(v, Errors): - error_messages.append(f"Error! Input type `{type(v)}` is not `Errors`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in PostUnfavoriteTweet200Response with oneOf schemas: Errors, UnfavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in PostUnfavoriteTweet200Response with oneOf schemas: Errors, UnfavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into UnfavoriteTweetResponseData - try: - instance.actual_instance = UnfavoriteTweetResponseData.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into Errors - try: - instance.actual_instance = Errors.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into PostUnfavoriteTweet200Response with oneOf schemas: Errors, UnfavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into PostUnfavoriteTweet200Response with oneOf schemas: Errors, UnfavoriteTweetResponseData. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, UnfavoriteTweetResponseData]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response.py index f776b1d8..4f997d38 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.profile_response_data import ProfileResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class ProfileResponse(BaseModel): ProfileResponse """ # noqa: E501 data: ProfileResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": ProfileResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": ProfileResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response_data.py index aff3fd1d..815689aa 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/profile_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.user_result_by_screen_name import UserResultByScreenName from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class ProfileResponseData(BaseModel): """ ProfileResponseData """ # noqa: E501 - user_result_by_screen_name: UserResultByScreenName + user_result_by_screen_name: Optional[UserResultByScreenName] = None __properties: ClassVar[List[str]] = ["user_result_by_screen_name"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_data.py index f0910b43..d5c10c57 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.search_by_raw_query import SearchByRawQuery from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class SearchTimelineData(BaseModel): """ SearchTimelineData """ # noqa: E501 - search_by_raw_query: SearchByRawQuery + search_by_raw_query: Optional[SearchByRawQuery] = None __properties: ClassVar[List[str]] = ["search_by_raw_query"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_response.py index 8e7b8563..73bc121d 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/search_timeline_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.search_timeline_data import SearchTimelineData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class SearchTimelineResponse(BaseModel): SearchTimelineResponse """ # noqa: E501 data: SearchTimelineData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": SearchTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": SearchTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/sensitive_media_warning.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/sensitive_media_warning.py index 45ea68d7..23287351 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/sensitive_media_warning.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/sensitive_media_warning.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictBool -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,9 @@ class SensitiveMediaWarning(BaseModel): """ SensitiveMediaWarning """ # noqa: E501 - adult_content: StrictBool - graphic_violence: StrictBool - other: StrictBool + adult_content: Optional[StrictBool] = None + graphic_violence: Optional[StrictBool] = None + other: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["adult_content", "graphic_violence", "other"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/timeline_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/timeline_response.py index 9aedf4cc..5452af5c 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/timeline_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/timeline_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.home_timeline_response_data import HomeTimelineResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class TimelineResponse(BaseModel): TimelineResponse """ # noqa: E501 data: HomeTimelineResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": HomeTimelineResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": HomeTimelineResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response.py index f0f0a26a..72302eeb 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.tweet_detail_response_data import TweetDetailResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class TweetDetailResponse(BaseModel): TweetDetailResponse """ # noqa: E501 data: TweetDetailResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": TweetDetailResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": TweetDetailResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response_data.py index 347b82b1..6d2127c7 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_detail_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.timeline import Timeline from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class TweetDetailResponseData(BaseModel): """ TweetDetailResponseData """ # noqa: E501 - threaded_conversation_with_injections_v2: Timeline + threaded_conversation_with_injections_v2: Optional[Timeline] = None __properties: ClassVar[List[str]] = ["threaded_conversation_with_injections_v2"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response.py index 1f86c7dc..ffeac373 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.tweet_favoriters_response_data import TweetFavoritersResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class TweetFavoritersResponse(BaseModel): TweetFavoritersResponse """ # noqa: E501 data: TweetFavoritersResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": TweetFavoritersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": TweetFavoritersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response_data.py index 7d335683..b5ccd0b5 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_favoriters_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.timeline_v2 import TimelineV2 from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class TweetFavoritersResponseData(BaseModel): """ TweetFavoritersResponseData """ # noqa: E501 - favoriters_timeline: TimelineV2 + favoriters_timeline: Optional[TimelineV2] = None __properties: ClassVar[List[str]] = ["favoriters_timeline"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_legacy.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_legacy.py index 37ba36c5..3c4eddcd 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_legacy.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_legacy.py @@ -113,8 +113,8 @@ def limited_actions_validate_enum(cls, value): if value is None: return value - if value not in set(['limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community']): - raise ValueError("must be one of enum values ('limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community')") + if value not in set(['limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community', 'blocked_viewer']): + raise ValueError("must be one of enum values ('limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community', 'blocked_viewer')") return value @field_validator('quoted_status_id_str') diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py index 59f661fd..5c249670 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.item_result import ItemResult from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class TweetResultByRestIdData(BaseModel): """ TweetResultByRestIdData """ # noqa: E501 - tweet_result: ItemResult = Field(alias="tweetResult") + tweet_result: Optional[ItemResult] = Field(default=None, alias="tweetResult") __properties: ClassVar[List[str]] = ["tweetResult"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py index 650d3692..3e38793b 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.tweet_result_by_rest_id_data import TweetResultByRestIdData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class TweetResultByRestIdResponse(BaseModel): TweetResultByRestIdResponse """ # noqa: E501 data: TweetResultByRestIdData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": TweetResultByRestIdData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": TweetResultByRestIdData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response.py index 686510a3..5a4c5b63 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.tweet_retweeters_response_data import TweetRetweetersResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class TweetRetweetersResponse(BaseModel): TweetRetweetersResponse """ # noqa: E501 data: TweetRetweetersResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": TweetRetweetersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": TweetRetweetersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response_data.py index e7fe6594..4e2157a1 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/tweet_retweeters_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.timeline_v2 import TimelineV2 from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class TweetRetweetersResponseData(BaseModel): """ TweetRetweetersResponseData """ # noqa: E501 - retweeters_timeline: TimelineV2 + retweeters_timeline: Optional[TimelineV2] = None __properties: ClassVar[List[str]] = ["retweeters_timeline"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/type_name.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/type_name.py index ab44bc2a..192e317b 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/type_name.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/type_name.py @@ -45,6 +45,7 @@ class TypeName(str, Enum): COMMUNITY = 'Community' COMMUNITYDELETEACTIONUNAVAILABLE = 'CommunityDeleteActionUnavailable' COMMUNITYJOINACTION = 'CommunityJoinAction' + COMMUNITYJOINACTIONUNAVAILABLE = 'CommunityJoinActionUnavailable' COMMUNITYLEAVEACTIONUNAVAILABLE = 'CommunityLeaveActionUnavailable' COMMUNITYTWEETPINACTIONUNAVAILABLE = 'CommunityTweetPinActionUnavailable' COMMUNITYTWEETUNPINACTIONUNAVAILABLE = 'CommunityTweetUnpinActionUnavailable' diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet.py index e6ad028a..a2097592 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,7 +27,7 @@ class UnfavoriteTweet(BaseModel): """ UnfavoriteTweet """ # noqa: E501 - unfavorite_tweet: StrictStr + unfavorite_tweet: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["unfavorite_tweet"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet_response.py similarity index 71% rename from twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet_response_data.py rename to twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet_response.py index 263bd43f..93c19f28 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/unfavorite_tweet_response.py @@ -19,17 +19,19 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.unfavorite_tweet import UnfavoriteTweet from typing import Optional, Set from typing_extensions import Self -class UnfavoriteTweetResponseData(BaseModel): +class UnfavoriteTweetResponse(BaseModel): """ - UnfavoriteTweetResponseData + UnfavoriteTweetResponse """ # noqa: E501 data: UnfavoriteTweet - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UnfavoriteTweetResponseData from a JSON string""" + """Create an instance of UnfavoriteTweetResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,11 +75,18 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UnfavoriteTweetResponseData from a dict""" + """Create an instance of UnfavoriteTweetResponse from a dict""" if obj is None: return None @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": UnfavoriteTweet.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": UnfavoriteTweet.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user.py index ce95271a..747a0920 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user.py @@ -36,7 +36,7 @@ class User(BaseModel): User """ # noqa: E501 typename: TypeName = Field(alias="__typename") - affiliates_highlighted_label: Dict[str, Any] + affiliates_highlighted_label: Optional[Dict[str, Any]] = None business_account: Optional[Dict[str, Any]] = None creator_subscriptions_count: Optional[StrictInt] = None has_graduated_access: Optional[StrictBool] = None diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_data.py index 5edb9c5b..24cbf3f8 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.user_highlights_tweets_user import UserHighlightsTweetsUser from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserHighlightsTweetsData(BaseModel): """ UserHighlightsTweetsData """ # noqa: E501 - user: UserHighlightsTweetsUser + user: Optional[UserHighlightsTweetsUser] = None __properties: ClassVar[List[str]] = ["user"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_response.py index d7536f46..234b797a 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_highlights_tweets_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.user_highlights_tweets_data import UserHighlightsTweetsData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class UserHighlightsTweetsResponse(BaseModel): UserHighlightsTweetsResponse """ # noqa: E501 data: UserHighlightsTweetsData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": UserHighlightsTweetsData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": UserHighlightsTweetsData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_legacy_extended_profile_birthdate.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_legacy_extended_profile_birthdate.py index 0c45948f..f053bfc3 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_legacy_extended_profile_birthdate.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_legacy_extended_profile_birthdate.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class UserLegacyExtendedProfileBirthdate(BaseModel): day: StrictInt month: StrictInt visibility: StrictStr - year: StrictInt + year: Optional[StrictInt] = None year_visibility: StrictStr __properties: ClassVar[List[str]] = ["day", "month", "visibility", "year", "year_visibility"] diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_response.py index f8a24563..2f9129e4 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.user_response_data import UserResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class UserResponse(BaseModel): UserResponse """ # noqa: E501 data: UserResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": UserResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": UserResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tip_jar_settings.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tip_jar_settings.py index 2a6db40e..d8c41c1c 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tip_jar_settings.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tip_jar_settings.py @@ -34,8 +34,9 @@ class UserTipJarSettings(BaseModel): gofundme_handle: Optional[StrictStr] = None is_enabled: Optional[StrictBool] = None patreon_handle: Optional[StrictStr] = None + pay_pal_handle: Optional[StrictStr] = None venmo_handle: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["bandcamp_handle", "bitcoin_handle", "cash_app_handle", "ethereum_handle", "gofundme_handle", "is_enabled", "patreon_handle", "venmo_handle"] + __properties: ClassVar[List[str]] = ["bandcamp_handle", "bitcoin_handle", "cash_app_handle", "ethereum_handle", "gofundme_handle", "is_enabled", "patreon_handle", "pay_pal_handle", "venmo_handle"] model_config = ConfigDict( populate_by_name=True, @@ -95,6 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "gofundme_handle": obj.get("gofundme_handle"), "is_enabled": obj.get("is_enabled"), "patreon_handle": obj.get("patreon_handle"), + "pay_pal_handle": obj.get("pay_pal_handle"), "venmo_handle": obj.get("venmo_handle") }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_data.py index 0524f5d7..48e80578 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.user_tweets_user import UserTweetsUser from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UserTweetsData(BaseModel): """ UserTweetsData """ # noqa: E501 - user: UserTweetsUser + user: Optional[UserTweetsUser] = None __properties: ClassVar[List[str]] = ["user"] model_config = ConfigDict( diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_response.py index 9e56ce48..a81a6b66 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_tweets_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.user_tweets_data import UserTweetsData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class UserTweetsResponse(BaseModel): UserTweetsResponse """ # noqa: E501 data: UserTweetsData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": UserTweetsData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": UserTweetsData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_verification_info_reason.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_verification_info_reason.py index 3839ddd2..6fa40a0b 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_verification_info_reason.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/user_verification_info_reason.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from twitter_openapi_python_generated.models.user_verification_info_reason_description import UserVerificationInfoReasonDescription from typing import Optional, Set @@ -30,7 +30,7 @@ class UserVerificationInfoReason(BaseModel): UserVerificationInfoReason """ # noqa: E501 description: UserVerificationInfoReasonDescription - override_verified_year: StrictInt + override_verified_year: Optional[StrictInt] = None verified_since_msec: Annotated[str, Field(strict=True)] __properties: ClassVar[List[str]] = ["description", "override_verified_year", "verified_since_msec"] diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response.py index 0fa87b7d..ad09e471 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response.py @@ -19,7 +19,8 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from twitter_openapi_python_generated.models.error_response import ErrorResponse from twitter_openapi_python_generated.models.users_response_data import UsersResponseData from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class UsersResponse(BaseModel): UsersResponse """ # noqa: E501 data: UsersResponseData - __properties: ClassVar[List[str]] = ["data"] + errors: Optional[List[ErrorResponse]] = None + __properties: ClassVar[List[str]] = ["data", "errors"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of data if self.data: _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items return _dict @classmethod @@ -85,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": UsersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": UsersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None, + "errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None }) return _obj diff --git a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response_data.py b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response_data.py index a49b5dbc..5b9be955 100644 --- a/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response_data.py +++ b/twitter_openapi_python_generated/twitter_openapi_python_generated/models/users_response_data.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from twitter_openapi_python_generated.models.user_results import UserResults from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class UsersResponseData(BaseModel): """ UsersResponseData """ # noqa: E501 - users: List[UserResults] + users: Optional[List[UserResults]] = None __properties: ClassVar[List[str]] = ["users"] model_config = ConfigDict(