-
Notifications
You must be signed in to change notification settings - Fork 0
/
twitter.go
34 lines (30 loc) · 1.38 KB
/
twitter.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
package models
import (
"net/url"
"github.com/iwataka/anaconda"
)
type TwitterAPI interface {
VerifyCredentials() (bool, error)
PostDMToScreenName(string, string) (anaconda.DirectMessage, error)
GetCollectionListByUserId(int64, url.Values) (anaconda.CollectionListResult, error)
PostTweet(string, url.Values) (anaconda.Tweet, error)
GetFriendsList(url.Values) (anaconda.UserCursor, error)
GetSelf(url.Values) (anaconda.User, error)
GetUserTimeline(url.Values) ([]anaconda.Tweet, error)
GetFavorites(url.Values) ([]anaconda.Tweet, error)
GetSearch(string, url.Values) (anaconda.SearchResponse, error)
Retweet(int64, bool) (anaconda.Tweet, error)
Favorite(int64) (anaconda.Tweet, error)
CreateCollection(string, url.Values) (anaconda.CollectionShowResult, error)
AddEntryToCollection(string, int64, url.Values) (anaconda.CollectionEntryAddResult, error)
GetUsersLookup(string, url.Values) ([]anaconda.User, error)
PublicStreamFilter(url.Values) *anaconda.Stream
UserStream(url.Values) *anaconda.Stream
GetUsersShow(string, url.Values) (anaconda.User, error)
GetUserSearch(string, url.Values) ([]anaconda.User, error)
}
type TwitterActionProperties struct {
Tweet bool `json:"tweet" toml:"tweet" bson:"tweet" yaml:"tweet"`
Retweet bool `json:"retweet" toml:"retweet" bson:"retweet" yaml:"retweet"`
Favorite bool `json:"favorite" toml:"favorite" bson:"favorite" yaml:"favorite"`
}