Direct messages¶
-
direct_messages.
new
(server_url, *args, **kwargs)¶ Sends a new direct message to the specified user from the authenticating user.
Accepts the same parameters as
requests.post()
excepturl
.Implements https://twitter-api.readthedocs.io/en/latest/direct-messages.html#post–api-direct_messages-new.json
Parameters: server_url (str) – URL of the server Return type: dict Returns: Direct message dict
-
direct_messages.
sent
(server_url, *args, **kwargs)¶ Returns the 20 most recent direct messages sent by the authenticating user. You can request up to 200 direct messages per call, and only the most recent 200 DMs will be available using this endpoint.
Accepts the same parameters as
requests.get()
excepturl
.Implements https://twitter-api.readthedocs.io/en/latest/direct-messages.html#get–api-direct_messages-sent.json
Parameters: server_url (str) – URL of the server Return type: list Returns: a list of direct message dicts
-
direct_messages.
received
(server_url, *args, **kwargs)¶ Returns the 20 most recent direct messages sent to the authenticating user. You can request up to 200 direct messages per call, and only the most recent 200 DMs will be available using this endpoint.
Accepts the same parameters as
requests.get()
excepturl
.Implements https://twitter-api.readthedocs.io/en/latest/direct-messages.html#get–api-direct_messages.json
Parameters: server_url (str) – URL of the server Return type: list Returns: a list of direct message dicts