forked from ChimeraCoder/anaconda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
timeline.go
27 lines (22 loc) · 812 Bytes
/
timeline.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
package anaconda
import (
"net/url"
)
func (a TwitterApi) GetHomeTimeline() (timeline []Tweet, err error) {
v := url.Values{}
v.Set("include_entities", "true")
err = a.apiGet("http://api.twitter.com/1.1/statuses/home_timeline.json", v, &timeline)
return
}
func (a TwitterApi) GetUserTimeline(v url.Values) (timeline []Tweet, err error) {
err = a.apiGet("http://api.twitter.com/1.1/statuses/user_timeline.json", v, &timeline)
return
}
func (a TwitterApi) GetMentionsTimeline(v url.Values) (timeline []Tweet, err error) {
err = a.apiGet("http://api.twitter.com/1.1/statuses/mentions_timeline.json", v, &timeline)
return
}
func (a TwitterApi) GetRetweetsOfMe(v url.Values) (tweets []Tweet, err error) {
err = a.apiGet("https://api.twitter.com/1.1/statuses/retweets_of_me.json", v, &tweets)
return
}