Documentation ¶
Overview ¶
Package twitter partially implements the Twitter API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidImage is returned when an image is invalid. ErrInvalidImage = errors.New("twitter: invalid image provided") )
var ErrInvalidUser = errors.New("twitter: invalid user provided")
ErrInvalidUser is returned when no user is provided.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
Errors []ErrorDetail `json:"errors"`
}
APIError is the response from Twitter's API when an error occurs.
type Config ¶
type Config struct { ConsumerKey string ConsumerSecret string OAuthToken string OAuthTokenSecret string }
Config configures a Twitter client for use in interacting with the Twitter API.
type ErrorDetail ¶
ErrorDetail details what went wrong when the Twitter API returns an error.
type Settings ¶
type Settings struct {
ScreenName string `json:"screen_name"`
}
Settings partially defines the account setting object returned by the Twitter API.
type Twitter ¶
type Twitter struct {
// contains filtered or unexported fields
}
Twitter is an HTTP client responsible for interacting with the Twitter API.
func (*Twitter) GetAccountSettings ¶
GetAccountSettings retrieves the authenticated account's settings from Twitter's API.
func (*Twitter) UpdateProfileImage ¶
UpdateProfileImage uploads a new profile image to the authenticated user's account.