Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Require id parameter for API.get_direct_message
  • Loading branch information
Harmon758 committed Feb 10, 2021
1 parent 76ca416 commit f5775ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tweepy/api.py
Expand Up @@ -491,11 +491,12 @@ def search_users(self, q, **kwargs):
)

@payload('direct_message')
def get_direct_message(self, *args, **kwargs):
def get_direct_message(self, id, *args, **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, endpoint_parameters=(
'GET', 'direct_messages/events/show', id, *args,
endpoint_parameters=(
'id',
), **kwargs
)
Expand Down

0 comments on commit f5775ee

Please sign in to comment.