forked from ChimeraCoder/anaconda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
friends_followers.go
63 lines (51 loc) · 1.67 KB
/
friends_followers.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package anaconda
import (
"net/url"
)
type Cursor struct {
Previous_cursor int64
Previous_cursor_str string
Ids []int64
Next_cursor int64
Next_cursor_str string
}
type TwitterUserCursor struct {
Previous_cursor int64
Previous_cursor_str string
Next_cursor int64
Next_cursor_str string
Users []TwitterUser
}
type Friendship struct {
Name string
Id_str string
Id int64
Connections []string
Screen_name string
}
//GetFriendshipsNoRetweets returns a collection of user_ids that the currently authenticated user does not want to receive retweets from.
//It does not currently support the stringify_ids parameter
func (a TwitterApi) GetFriendshipsNoRetweets() (ids []int64, err error) {
err = a.apiGet("https://api.twitter.com/1.1/friendships/no_retweets/ids.json", nil, &ids)
return
}
func (a TwitterApi) GetFriendsIds(v url.Values) (c Cursor, err error) {
err = a.apiGet("https://api.twitter.com/1.1/friends/ids.json", v, &c)
return
}
func (a TwitterApi) GetFriendshipsLookup(v url.Values) (friendships []Friendship, err error) {
err = a.apiGet("http://api.twitter.com/1.1/friendships/lookup.json", v, &friendships)
return
}
func (a TwitterApi) GetFriendshipsIncoming(v url.Values) (c Cursor, err error) {
err = a.apiGet("https://api.twitter.com/1.1/friendships/incoming.json", v, &c)
return
}
func (a TwitterApi) GetFriendshipsOutgoing(v url.Values) (c Cursor, err error) {
err = a.apiGet("http://api.twitter.com/1.1/friendships/outgoing.json", v, &c)
return
}
func (a TwitterApi) GetFollowersList(v url.Values) (c TwitterUserCursor, err error) {
err = a.apiGet("https://api.twitter.com/1.1/followers/list.json", v, &c)
return
}