-
Notifications
You must be signed in to change notification settings - Fork 246
/
relationship.go
40 lines (37 loc) · 1.07 KB
/
relationship.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
package anaconda
import (
"net/url"
)
type RelationshipResponse struct {
Relationship Relationship `json:"relationship"`
}
type Relationship struct {
Target Target `json:"target"`
Source Source `json:"source"`
}
type Target struct {
Id int64 `json:"id"`
Id_str string `json:"id_str"`
Screen_name string `json:"screen_name"`
Following bool `json:"following"`
Followed_by bool `json:"followed_by"`
}
type Source struct {
Id int64
Id_str string
Screen_name string
Following bool
Followed_by bool
Can_dm bool
Blocking bool
Muting bool
Marked_spam bool
All_replies bool
Want_retweets bool
Notifications_enabled bool
}
func (a TwitterApi) GetFriendshipsShow(v url.Values) (relationshipResponse RelationshipResponse, err error) {
response_ch := make(chan response)
a.queryQueue <- query{a.baseUrl + "/friendships/show.json", v, &relationshipResponse, _GET, response_ch}
return relationshipResponse, (<-response_ch).err
}