-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathexpansions.go
More file actions
42 lines (34 loc) · 1.24 KB
/
Copy pathexpansions.go
File metadata and controls
42 lines (34 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package fields
type Expansion string
const (
ExpansionPinnedTweetID Expansion = "pinned_tweet_id"
ExpansionAttachmentsPollIDs Expansion = "attachments.poll_ids"
ExpansionAttachmentsMediaKeys Expansion = "attachments.media_keys"
ExpansionAuthorID Expansion = "author_id"
ExpansionEntitiesMentionsUsername Expansion = "entities.mentions.username"
ExpansionGeoPlaceID Expansion = "geo.place_id"
ExpansionInReplyToUserID Expansion = "in_reply_to_user_id"
ExpansionReferencedTweetsID Expansion = "referenced_tweets.id"
ExpansionReferencedTweetsIDAuthorID Expansion = "referenced_tweets.id.author_id"
ExpansionInvitedUserIDs Expansion = "invited_user_ids"
ExpansionSpeakerIDs Expansion = "speaker_ids"
ExpansionCreatorID Expansion = "creator_id"
ExpansionHostIDs Expansion = "host_ids"
)
func (e Expansion) String() string {
return string(e)
}
type ExpansionList []Expansion
func (el ExpansionList) FieldsName() string {
return "expansions"
}
func (el ExpansionList) Values() []string {
if el == nil {
return []string{}
}
s := []string{}
for _, e := range el {
s = append(s, e.String())
}
return s
}