self.session = requests.Session()
def request(
- self, method, endpoint, *args, allowed_param=(), params=None,
+ self, method, endpoint, *args, endpoint_parameters=(), params=None,
headers=None, json_payload=None, parser=None, payload_list=False,
payload_type=None, post_data=None, require_auth=True,
return_cursors=False, upload_api=False, use_cache=True, **kwargs
if arg is None:
continue
try:
- params[allowed_param[idx]] = str(arg)
+ params[endpoint_parameters[idx]] = str(arg)
except IndexError:
raise TweepError('Too many parameters supplied!')
""" :reference: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline
"""
return self.request(
- 'GET', 'statuses/home_timeline', *args, allowed_param=(
+ 'GET', 'statuses/home_timeline', *args, endpoint_parameters=(
'count', 'since_id', 'max_id', 'trim_user', 'exclude_replies',
'include_entities'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-lookup
"""
return self.request(
- 'GET', 'statuses/lookup', list_to_csv(id_), *args, allowed_param=(
+ 'GET', 'statuses/lookup', list_to_csv(id_), *args,
+ endpoint_parameters=(
'id', 'include_entities', 'trim_user', 'map',
'include_ext_alt_text', 'include_card_uri'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline
"""
return self.request(
- 'GET', 'statuses/user_timeline', *args, allowed_param=(
+ 'GET', 'statuses/user_timeline', *args, endpoint_parameters=(
'user_id', 'screen_name', 'since_id', 'count', 'max_id',
'trim_user', 'exclude_replies', 'include_rts'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-mentions_timeline
"""
return self.request(
- 'GET', 'statuses/mentions_timeline', *args, allowed_param=(
+ 'GET', 'statuses/mentions_timeline', *args, endpoint_parameters=(
'since_id', 'max_id', 'count'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweets_of_me
"""
return self.request(
- 'GET', 'statuses/retweets_of_me', *args, allowed_param=(
+ 'GET', 'statuses/retweets_of_me', *args, endpoint_parameters=(
'since_id', 'max_id', 'count'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-show-id
"""
return self.request(
- 'GET', 'statuses/show', *args, allowed_param=(
+ 'GET', 'statuses/show', *args, endpoint_parameters=(
'id', 'trim_user', 'include_my_retweet', 'include_entities',
'include_ext_alt_text', 'include_card_uri'
), **kwargs
kwargs['media_ids'] = list_to_csv(kwargs['media_ids'])
return self.request(
- 'POST', 'statuses/update', *args, allowed_param=(
+ 'POST', 'statuses/update', *args, endpoint_parameters=(
'status', 'in_reply_to_status_id',
'auto_populate_reply_metadata', 'exclude_reply_user_ids',
'attachment_url', 'media_ids', 'possibly_sensitive', 'lat',
return self.request(
'POST', 'media/upload', *args,
- allowed_param=(),
+ endpoint_parameters=(),
upload_api=True, **kwargs
)
return self.request(
'POST', 'media/metadata/create', *args,
- allowed_param=(),
+ endpoint_parameters=(),
upload_api=True, **kwargs
)
kwargs.update({'headers': headers, 'post_data': post_data})
return self.request(
- 'POST', 'statuses/update_with_media', *args, allowed_param=(
+ 'POST', 'statuses/update_with_media', *args, endpoint_parameters=(
'status', 'possibly_sensitive', 'in_reply_to_status_id',
'in_reply_to_status_id_str', 'auto_populate_reply_metadata',
'lat', 'long', 'place_id', 'display_coordinates'
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweets-id
"""
return self.request(
- 'GET', f'statuses/retweets/{status_id}', *args, allowed_param=(
+ 'GET', f'statuses/retweets/{status_id}', *args,
+ endpoint_parameters=(
'count',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweeters-ids
"""
return self.request(
- 'GET', 'statuses/retweeters/ids', *args, allowed_param=(
+ 'GET', 'statuses/retweeters/ids', *args, endpoint_parameters=(
'id', 'cursor', 'stringify_ids'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-show
"""
return self.request(
- 'GET', 'users/show', *args, allowed_param=(
+ 'GET', 'users/show', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-oembed
"""
return self.request(
- 'GET', 'statuses/oembed', *args, allowed_param=(
+ 'GET', 'statuses/oembed', *args, endpoint_parameters=(
'url', 'maxwidth', 'hide_media', 'hide_thread', 'omit_script',
'align', 'related', 'lang', 'theme', 'link_color',
'widget_type', 'dnt'
"""
return self.request(
'POST', 'users/lookup', list_to_csv(user_ids),
- list_to_csv(screen_names), *args, allowed_param=(
+ list_to_csv(screen_names), *args, endpoint_parameters=(
'user_id', 'screen_name', 'include_entities', 'tweet_mode'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search
"""
return self.request(
- 'GET', 'users/search', *args, allowed_param=(
+ 'GET', 'users/search', *args, endpoint_parameters=(
'q', 'count', 'page'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-event
"""
return self.request(
- 'GET', 'direct_messages/events/show', *args, allowed_param=(
+ 'GET', 'direct_messages/events/show', *args, endpoint_parameters=(
'id',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events
"""
return self.request(
- 'GET', 'direct_messages/events/list', *args, allowed_param=(
+ 'GET', 'direct_messages/events/list', *args, endpoint_parameters=(
'count', 'cursor'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/delete-message-event
"""
return self.request(
- 'DELETE', 'direct_messages/events/destroy', *args, allowed_param=(
+ 'DELETE', 'direct_messages/events/destroy', *args,
+ endpoint_parameters=(
'id',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create
"""
return self.request(
- 'POST', 'friendships/create', *args, allowed_param=(
+ 'POST', 'friendships/create', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name', 'follow'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy
"""
return self.request(
- 'POST', 'friendships/destroy', *args, allowed_param=(
+ 'POST', 'friendships/destroy', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show
"""
return self.request(
- 'GET', 'friendships/show', *args, allowed_param=(
+ 'GET', 'friendships/show', *args, endpoint_parameters=(
'source_id', 'source_screen_name', 'target_id',
'target_screen_name'
), **kwargs
"""
return self.request(
'GET', 'friendships/lookup', list_to_csv(user_ids),
- list_to_csv(screen_names), allowed_param=(
+ list_to_csv(screen_names), endpoint_parameters=(
'user_id', 'screen_name'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids
"""
return self.request(
- 'GET', 'friends/ids', *args, allowed_param=(
+ 'GET', 'friends/ids', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name', 'cursor'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-list
"""
return self.request(
- 'GET', 'friends/list', *args, allowed_param=(
+ 'GET', 'friends/list', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name', 'cursor', 'count',
'skip_status', 'include_user_entities'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming
"""
return self.request(
- 'GET', 'friendships/incoming', *args, allowed_param=(
+ 'GET', 'friendships/incoming', *args, endpoint_parameters=(
'cursor',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-outgoing
"""
return self.request(
- 'GET', 'friendships/outgoing', *args, allowed_param=(
+ 'GET', 'friendships/outgoing', *args, endpoint_parameters=(
'cursor',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-ids
"""
return self.request(
- 'GET', 'followers/ids', *args, allowed_param=(
+ 'GET', 'followers/ids', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name', 'cursor', 'count'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-list
"""
return self.request(
- 'GET', 'followers/list', *args, allowed_param=(
+ 'GET', 'followers/list', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name', 'cursor', 'count',
'skip_status', 'include_user_entities'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-settings
"""
return self.request(
- 'POST', 'account/settings', *args, allowed_param=(
+ 'POST', 'account/settings', *args, endpoint_parameters=(
'sleep_time_enabled', 'start_sleep_time', 'end_sleep_time',
'time_zone', 'trend_location_woeid',
'allow_contributor_request', 'lang'
kwargs['include_email'] = str(kwargs['include_email']).lower()
try:
return self.request(
- 'GET', 'account/verify_credentials', allowed_param=(
+ 'GET', 'account/verify_credentials', endpoint_parameters=(
'include_entities', 'skip_status', 'include_email'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/developer-utilities/rate-limit-status/api-reference/get-application-rate_limit_status
"""
return self.request(
- 'GET', 'application/rate_limit_status', *args, allowed_param=(
+ 'GET', 'application/rate_limit_status', *args,
+ endpoint_parameters=(
'resources',
), use_cache=False, **kwargs
)
"""
headers, post_data = API._pack_image(filename, 700, f=file_)
return self.request(
- 'POST', 'account/update_profile_image', *args, allowed_param=(
+ 'POST', 'account/update_profile_image', *args,
+ endpoint_parameters=(
'include_entities', 'skip_status'
), post_data=post_data, headers=headers, **kwargs
)
headers, post_data = API._pack_image(filename, 700,
form_field='banner', f=f)
return self.request(
- 'POST', 'account/update_profile_banner', allowed_param=(
+ 'POST', 'account/update_profile_banner', endpoint_parameters=(
'width', 'height', 'offset_left', 'offset_right'
), post_data=post_data, headers=headers, **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile
"""
return self.request(
- 'POST', 'account/update_profile', *args, allowed_param=(
+ 'POST', 'account/update_profile', *args, endpoint_parameters=(
'name', 'url', 'location', 'description', 'profile_link_color'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-favorites-list
"""
return self.request(
- 'GET', 'favorites/list', *args, allowed_param=(
+ 'GET', 'favorites/list', *args, endpoint_parameters=(
'screen_name', 'user_id', 'max_id', 'count', 'since_id'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-favorites-create
"""
return self.request(
- 'POST', 'favorites/create', *args, allowed_param=(
+ 'POST', 'favorites/create', *args, endpoint_parameters=(
'id',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-favorites-destroy
"""
return self.request(
- 'POST', 'favorites/destroy', *args, allowed_param=(
+ 'POST', 'favorites/destroy', *args, endpoint_parameters=(
'id',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-blocks-create
"""
return self.request(
- 'POST', 'blocks/create', *args, allowed_param=(
+ 'POST', 'blocks/create', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-blocks-destroy
"""
return self.request(
- 'POST', 'blocks/destroy', *args, allowed_param=(
+ 'POST', 'blocks/destroy', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-ids
"""
return self.request(
- 'GET', 'mutes/users/ids', *args, allowed_param=(
+ 'GET', 'mutes/users/ids', *args, endpoint_parameters=(
'cursor',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-list
"""
return self.request(
- 'GET', 'mutes/users/list', *args, allowed_param=(
+ 'GET', 'mutes/users/list', *args, endpoint_parameters=(
'cursor', 'include_entities', 'skip_status'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-mutes-users-create
"""
return self.request(
- 'POST', 'mutes/users/create', *args, allowed_param=(
+ 'POST', 'mutes/users/create', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-mutes-users-destroy
"""
return self.request(
- 'POST', 'mutes/users/destroy', *args, allowed_param=(
+ 'POST', 'mutes/users/destroy', *args, endpoint_parameters=(
'id', 'user_id', 'screen_name'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-blocks-list
"""
return self.request(
- 'GET', 'blocks/list', *args, allowed_param=(
+ 'GET', 'blocks/list', *args, endpoint_parameters=(
'cursor',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-blocks-ids
"""
return self.request(
- 'GET', 'blocks/ids', *args, allowed_param=(
+ 'GET', 'blocks/ids', *args, endpoint_parameters=(
'cursor',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/post-users-report_spam
"""
return self.request(
- 'POST', 'users/report_spam', *args, allowed_param=(
+ 'POST', 'users/report_spam', *args, endpoint_parameters=(
'user_id', 'screen_name', 'perform_block'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-saved_searches-create
"""
return self.request(
- 'POST', 'saved_searches/create', *args, allowed_param=(
+ 'POST', 'saved_searches/create', *args, endpoint_parameters=(
'query',
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-create
"""
return self.request(
- 'POST', 'lists/create', *args, allowed_param=(
+ 'POST', 'lists/create', *args, endpoint_parameters=(
'name', 'mode', 'description'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-destroy
"""
return self.request(
- 'POST', 'lists/destroy', *args, allowed_param=(
+ 'POST', 'lists/destroy', *args, endpoint_parameters=(
'owner_screen_name', 'owner_id', 'list_id', 'slug'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-update
"""
return self.request(
- 'POST', 'lists/update', *args, allowed_param=(
+ 'POST', 'lists/update', *args, endpoint_parameters=(
'list_id', 'slug', 'name', 'mode', 'description',
'owner_screen_name', 'owner_id'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-list
"""
return self.request(
- 'GET', 'lists/list', *args, allowed_param=(
+ 'GET', 'lists/list', *args, endpoint_parameters=(
'screen_name', 'user_id', 'reverse'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-memberships
"""
return self.request(
- 'GET', 'lists/memberships', *args, allowed_param=(
+ 'GET', 'lists/memberships', *args, endpoint_parameters=(
'screen_name', 'user_id', 'filter_to_owned_lists', 'cursor',
'count'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-ownerships
"""
return self.request(
- 'GET', 'lists/ownerships', *args, allowed_param=(
+ 'GET', 'lists/ownerships', *args, endpoint_parameters=(
'user_id', 'screen_name', 'count', 'cursor'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscriptions
"""
return self.request(
- 'GET', 'lists/subscriptions', *args, allowed_param=(
+ 'GET', 'lists/subscriptions', *args, endpoint_parameters=(
'screen_name', 'user_id', 'cursor', 'count'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-statuses
"""
return self.request(
- 'GET', 'lists/statuses', *args, allowed_param=(
+ 'GET', 'lists/statuses', *args, endpoint_parameters=(
'owner_screen_name', 'slug', 'owner_id', 'list_id', 'since_id',
'max_id', 'count', 'include_entities', 'include_rts'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-show
"""
return self.request(
- 'GET', 'lists/show', *args, allowed_param=(
+ 'GET', 'lists/show', *args, endpoint_parameters=(
'owner_screen_name', 'owner_id', 'slug', 'list_id'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-members-create
"""
return self.request(
- 'POST', 'lists/members/create', *args, allowed_param=(
+ 'POST', 'lists/members/create', *args, endpoint_parameters=(
'screen_name', 'user_id', 'owner_screen_name', 'owner_id',
'slug', 'list_id'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-members-destroy
"""
return self.request(
- 'POST', 'lists/members/destroy', *args, allowed_param=(
+ 'POST', 'lists/members/destroy', *args, endpoint_parameters=(
'screen_name', 'user_id', 'owner_screen_name', 'owner_id',
'slug', 'list_id'
), **kwargs
return self.request(
'POST', 'lists/members/create_all', list_to_csv(screen_name),
list_to_csv(user_id), slug, list_id, owner_id, owner_screen_name,
- allowed_param=(
+ endpoint_parameters=(
'screen_name', 'user_id', 'slug', 'list_id', 'owner_id',
'owner_screen_name'
), **kwargs
return self.request(
'POST', 'lists/members/destroy_all', list_to_csv(screen_name),
list_to_csv(user_id), slug, list_id, owner_id, owner_screen_name,
- allowed_param=(
+ endpoint_parameters=(
'screen_name', 'user_id', 'slug', 'list_id', 'owner_id',
'owner_screen_name'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-members
"""
return self.request(
- 'GET', 'lists/members', *args, allowed_param=(
+ 'GET', 'lists/members', *args, endpoint_parameters=(
'owner_screen_name', 'slug', 'list_id', 'owner_id', 'cursor'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-members-show
"""
return self.request(
- 'GET', 'lists/members/show', *args, allowed_param=(
+ 'GET', 'lists/members/show', *args, endpoint_parameters=(
'list_id', 'slug', 'user_id', 'screen_name',
'owner_screen_name', 'owner_id'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-subscribers-create
"""
return self.request(
- 'POST', 'lists/subscribers/create', *args, allowed_param=(
+ 'POST', 'lists/subscribers/create', *args, endpoint_parameters=(
'owner_screen_name', 'slug', 'owner_id', 'list_id'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-subscribers-destroy
"""
return self.request(
- 'POST', 'lists/subscribers/destroy', *args, allowed_param=(
+ 'POST', 'lists/subscribers/destroy', *args, endpoint_parameters=(
'owner_screen_name', 'slug', 'owner_id', 'list_id'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers
"""
return self.request(
- 'GET', 'lists/subscribers', *args, allowed_param=(
+ 'GET', 'lists/subscribers', *args, endpoint_parameters=(
'owner_screen_name', 'slug', 'owner_id', 'list_id', 'cursor',
'count', 'include_entities', 'skip_status'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-subscribers-show
"""
return self.request(
- 'GET', 'lists/subscribers/show', *args, allowed_param=(
+ 'GET', 'lists/subscribers/show', *args, endpoint_parameters=(
'owner_screen_name', 'slug', 'screen_name', 'owner_id',
'list_id', 'user_id'
), **kwargs
""" :reference: https://developer.twitter.com/en/docs/trends/trends-for-location/api-reference/get-trends-place
"""
return self.request(
- 'GET', 'trends/place', *args, allowed_param=(
+ 'GET', 'trends/place', *args, endpoint_parameters=(
'id', 'exclude'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/trends/locations-with-trending-topics/api-reference/get-trends-closest
"""
return self.request(
- 'GET', 'trends/closest', *args, allowed_param=(
+ 'GET', 'trends/closest', *args, endpoint_parameters=(
'lat', 'long'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets
"""
return self.request(
- 'GET', 'search/tweets', *args, allowed_param=(
+ 'GET', 'search/tweets', *args, endpoint_parameters=(
'q', 'lang', 'locale', 'since_id', 'geocode', 'max_id',
'until', 'result_type', 'count', 'include_entities'
), **kwargs
"""
return self.request(
'GET', f'tweets/search/30day/{environment_name}', *args,
- allowed_param=(
+ endpoint_parameters=(
'query', 'tag', 'fromDate', 'toDate', 'maxResults', 'next'
), **kwargs
)
"""
return self.request(
'GET', f'tweets/search/fullarchive/{environment_name}', *args,
- allowed_param=(
+ endpoint_parameters=(
'query', 'tag', 'fromDate', 'toDate', 'maxResults', 'next'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-reverse_geocode
"""
return self.request(
- 'GET', 'geo/reverse_geocode', *args, allowed_param=(
+ 'GET', 'geo/reverse_geocode', *args, endpoint_parameters=(
'lat', 'long', 'accuracy', 'granularity', 'max_results'
), **kwargs
)
""" :reference: https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-search
"""
return self.request(
- 'GET', 'geo/search', *args, allowed_param=(
+ 'GET', 'geo/search', *args, endpoint_parameters=(
'lat', 'long', 'query', 'ip', 'granularity', 'accuracy',
'max_results', 'contained_within'
), **kwargs