-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
42 lines (34 loc) · 1.26 KB
/
config.go
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 models
type TimelineProperties struct {
ExcludeReplies bool `json:"exclude_replies" toml:"exclude_replies" bson:"exclude_replies" yaml:"exclude_replies"`
IncludeRts bool `json:"include_rts" toml:"include_rts" bson:"include_rts" yaml:"include_rts"`
}
func NewTimelineProperties() TimelineProperties {
// These default values are useful to remove noises from timeline
return TimelineProperties{
ExcludeReplies: true,
IncludeRts: false,
}
}
type FavoriteProperties struct {
}
func NewFavoriteProperties() FavoriteProperties {
return FavoriteProperties{}
}
type SearchProperties struct {
Queries []string `json:"queries" toml:"queries" bson:"queries" yaml:"queries"`
ResultType string `json:"result_type,omitempty" toml:"result_type,omitempty" bson:"result_type,omitempty" yaml:"result_type,omitempty"`
}
func NewSearchProperties() SearchProperties {
return SearchProperties{
Queries: []string{},
// This is the default value in Twitter API
ResultType: "mixed",
}
}
type AccountProperties struct {
ScreenNames []string `json:"screen_names" toml:"screen_names" bson:"screen_names" yaml:"screen_names"`
}
type SourceProperties struct {
Count *int `json:"count,omitempty" toml:"count,omitempty" bson:"count,omitempty" yaml:"count,omitempty"`
}