Skip to content

Commit 85f5f3d

Browse files
authored
Merge pull request tweepy#2009 from qin-yu/qy/dm-event-doc
Add fields documentation for Direct Message events
2 parents 3d3d58e + df20563 commit 85f5f3d

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

docs/expansions_and_fields.rst

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ Expansions and Fields
88
``expansions``
99
--------------
1010
`Expansions`_ enable you to request additional data objects that relate to the
11-
originally returned List, Space, Tweets, or users. Submit a list of desired
12-
expansions in a comma-separated list without spaces. The ID that represents the
13-
expanded data object will be included directly in the List, Space, Tweet, or
14-
user data object, but the expanded object metadata will be returned within the
15-
``includes`` response object, and will also include the ID so that you can
16-
match this data object to the original Space, Tweet, or user object.
11+
originally returned List, Space, Tweets, Users, or Direct Message conversation
12+
events. Submit a list of desired expansions in a comma-separated list without
13+
spaces. The ID(s) that represent(s) the expanded data object(s) will be
14+
included directly in the List, Space, Tweet, user, or event data object, but
15+
the expanded object metadata will be returned within the ``includes`` response
16+
object, and will also include the ID so that you can match this data object to
17+
the original Space, Tweet, User or Direct Message conversation event object.
1718

1819
At this time, the only expansion available to endpoints that primarily return
1920
List objects is ``expansions=owner_id``. You will find the expanded user data
@@ -40,6 +41,14 @@ using this parameter:
4041
* Attached place’s object
4142
* Any referenced Tweets’ object
4243

44+
For methods that returns Direct Message conversation events, the following data
45+
objects can be expanded using this parameter:
46+
47+
* The user object for the message sender.
48+
* Attached media's object.
49+
* Any referenced Tweet's object.
50+
* The user object for who is joining or leaving group conversations.
51+
4352
At this time, the only expansion available to endpoints that primarily return
4453
user objects is ``expansions=pinned_tweet_id``. You will find the expanded
4554
Tweet data object living in the ``includes`` response object.

0 commit comments

Comments
 (0)