Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,14 @@ func (a TwitterApi) GetListTweets(listID int64, includeRTs bool, v url.Values) (
a.queryQueue <- query{a.baseUrl + "/lists/statuses.json", v, &tweets, _GET, response_ch}
return tweets, (<-response_ch).err
}

func (a TwitterApi) GetListMembers(listID int64, v url.Values) (userCursor UserCursor, err error) {
if v == nil {
v = url.Values{}
}
v.Set("list_id", strconv.FormatInt(listID, 10))

response_ch := make(chan response)
a.queryQueue <- query{a.baseUrl + "/lists/members.json", v, &userCursor, _GET, response_ch}
return userCursor, (<-response_ch).err
}
22 changes: 10 additions & 12 deletions twitter_entities.go
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
package anaconda

type UrlItem struct{
Indices []int
Url string
Display_url string
Expanded_url string
}

type UrlEntity struct {
Urls []struct {
Indices []int
Url string
Display_url string
Expanded_url string
}
Urls []UrlItem
}

type Entities struct {
Hashtags []struct {
Indices []int
Text string
}
Urls []struct {
Indices []int
Url string
Display_url string
Expanded_url string
}
Urls []UrlItem
Url UrlEntity
User_mentions []struct {
Name string
Expand All @@ -29,6 +26,7 @@ type Entities struct {
Id_str string
}
Media []EntityMedia
Description UrlEntity
}

type EntityMedia struct {
Expand Down
8 changes: 8 additions & 0 deletions users.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ func (a TwitterApi) GetUserSearch(searchTerm string, v url.Values) (u []User, er
a.queryQueue <- query{a.baseUrl + "/users/search.json", v, &u, _GET, response_ch}
return u, (<-response_ch).err
}

// PostAccountUpdateProfile updates the active users profile with the provided values
func (a TwitterApi) PostAccountUpdateProfile(v url.Values) (u User, err error) {
v = cleanValues(v)
response_ch := make(chan response)
a.queryQueue <- query{a.baseUrl + "/account/update_profile.json", v, &u, _POST, response_ch}
return u, (<-response_ch).err
}