Add UpdateAccount()
This patch adds support for the accounts/update_credentials API
to update connected user information (display name, user note, avatar
and header page image).
Images can be provided in the API format (already base64-encoded) or
with a file path.
BTW the API implementation should be 100% complete now.
/*
Copyright 2017 Mikael Berthe
Licensed under the MIT license. Please see the LICENSE file is this directory.
*/
package madon
import (
"github.com/sendgrid/rest"
)
// Search search for contents (accounts or statuses) and returns a Results
func (mc *Client) Search(query string, resolve bool) (*Results, error) {
if query == "" {
return nil, ErrInvalidParameter
}
params := make(apiCallParams)
params["q"] = query
if resolve {
params["resolve"] = "true"
}
var results Results
if err := mc.apiCall("search", rest.Get, params, &results); err != nil {
return nil, err
}
return &results, nil
}