diff --git a/lists.go b/lists.go index b5f48e0..52090fa 100644 --- a/lists.go +++ b/lists.go @@ -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 +} diff --git a/twitter_entities.go b/twitter_entities.go index e838cfa..db846fe 100644 --- a/twitter_entities.go +++ b/twitter_entities.go @@ -1,12 +1,14 @@ 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 { @@ -14,12 +16,7 @@ type Entities 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 @@ -29,6 +26,7 @@ type Entities struct { Id_str string } Media []EntityMedia + Description UrlEntity } type EntityMedia struct { diff --git a/users.go b/users.go index 7aa1323..585e4a2 100644 --- a/users.go +++ b/users.go @@ -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 +}