Skip to content

Commit 5f91ccb

Browse files
author
Dimitri
committed
add account/update_profile_banner api call
1 parent 4a5d22a commit 5f91ccb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

account.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,17 @@ func (a TwitterApi) GetSelf(v url.Values) (u User, err error) {
2121
a.queryQueue <- query{a.baseUrl + "/account/verify_credentials.json", v, &u, _GET, response_ch}
2222
return u, (<-response_ch).err
2323
}
24+
25+
// AccountUpdateProfileBanner updates the profile banner of the authenticated user
26+
// with the given encoded image data.
27+
// For some more options, see https://dev.twitter.com/rest/reference/post/account/update_profile_banner
28+
func (a TwitterApi) AccountUpdateProfileBanner(base64String string, v url.Values) error {
29+
v = cleanValues(v)
30+
v.Set("banner", base64String)
31+
32+
var emptyResponse interface{}
33+
34+
response_ch := make(chan response)
35+
a.queryQueue <- query{a.baseUrl + "/account/update_profile_banner.json", v, &emptyResponse, _POST, response_ch}
36+
return (<-response_ch).err
37+
}

0 commit comments

Comments
 (0)