Documentation
¶
Index ¶
- func Bool(input bool) *bool
- func Float64(input float64) *float64
- func Int(input int) *int
- func Int64(input int64) *int64
- func String(input string) *string
- type Client
- func (c Client) ListsListGet(input ListsListInput) ([]ListsListOutput, error)
- func (c Client) ListsMembersGet(input ListsMembersInput) (ListsMembersOutput, error)
- func (c Client) ListsMembersShowGet(input ListsMembersShowInput) (ListsMembersShowOutput, error)
- func (c Client) OAuthAccessTokenPost(input OAuthAccessTokenInput) (OAuthAccessTokenOutput, error)
- func (c Client) OAuthRequestTokenPost(input OAuthRequestTokenInput) (OAuthRequestTokenOutput, error)
- func (c *Client) SetAccessKeys(oauthAccessToken, oauthAccessTokenSecret string)
- func (c Client) StatusesFilterPostRaw(input StatusesFilterInput) (*http.Response, error)
- func (c Client) StatusesUpdatePost(input StatusesUpdateInput) (StatusesUpdateOutput, error)
- func (c Client) StatusesUserTimelineGet(input StatusesUserTimelineInput) ([]StatusesUserTimelineOutput, error)
- type ListsListInput
- type ListsListOutput
- type ListsMembersInput
- type ListsMembersOutput
- type ListsMembersShowInput
- type ListsMembersShowOutput
- type OAuthAccessTokenInput
- type OAuthAccessTokenOutput
- type OAuthRequestTokenInput
- type OAuthRequestTokenOutput
- type StatusesFilterInput
- type StatusesFilterOutput
- type StatusesUpdateInput
- type StatusesUpdateOutput
- type StatusesUserTimelineInput
- type StatusesUserTimelineOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
OAuthConsumerKey string
OAuthConsumerSecret string
OAuthAccessToken string
OAuthAccessTokenSecret string
HTTPClient requestMaker
Noncer nonceMaker
Timer currentTimer
}
Client is the Twitter API client which will make signed requests to twitter
func (Client) ListsListGet ¶
func (c Client) ListsListGet(input ListsListInput) ([]ListsListOutput, error)
ListsListGet will return all lists the authenticating user or specified user subscribes to, including thier own. https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-list
func (Client) ListsMembersGet ¶
func (c Client) ListsMembersGet(input ListsMembersInput) (ListsMembersOutput, error)
ListsMembersGet will return the members of a specified list https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-members
func (Client) ListsMembersShowGet ¶
func (c Client) ListsMembersShowGet(input ListsMembersShowInput) (ListsMembersShowOutput, error)
ListsMembersShowGet will check if the specified users is a member of the specified list https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-members-show
func (Client) OAuthAccessTokenPost ¶
func (c Client) OAuthAccessTokenPost(input OAuthAccessTokenInput) (OAuthAccessTokenOutput, error)
OAuthAccessTokenPost will exchange a temporary access token for a permanent one https://developer.twitter.com/en/docs/basics/authentication/api-reference/access_token
func (Client) OAuthRequestTokenPost ¶
func (c Client) OAuthRequestTokenPost(input OAuthRequestTokenInput) (OAuthRequestTokenOutput, error)
OAuthRequestTokenPost will return an oauth_token and oauth_token_secret https://developer.twitter.com/en/docs/basics/authentication/api-reference/request_token
func (*Client) SetAccessKeys ¶
func (Client) StatusesFilterPostRaw ¶
func (c Client) StatusesFilterPostRaw(input StatusesFilterInput) (*http.Response, error)
StatusesFilterPostRaw will get a streaming list of tweets and return the raw http response for streaming https://developer.twitter.com/en/docs/tweets/filter-realtime/api-reference/post-statuses-filter
func (Client) StatusesUpdatePost ¶
func (c Client) StatusesUpdatePost(input StatusesUpdateInput) (StatusesUpdateOutput, error)
StatusesUpdatePost will post a status update to twitter https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update
func (Client) StatusesUserTimelineGet ¶
func (c Client) StatusesUserTimelineGet(input StatusesUserTimelineInput) ([]StatusesUserTimelineOutput, error)
StatusesUserTimelineGet will get a users timeline and return an array of tweets https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline
type ListsListInput ¶
type ListsListInput struct {
UserID *int64 `schema:"user_id"`
ScreenName *string `schema:"screen_name"`
Reverse *bool `schema:"reverse"`
}
ListsListInput contains the possible inputs when listing a list
type ListsListOutput ¶
type ListsListOutput struct {
ID int64 `json:"id"`
IDStr string `json:"id_str"`
Name string `json:"name"`
URI string `json:"uri"`
SubscriberCount int `json:"subscriber_count"`
MemberCount int `json:"member_count"`
Mode string `json:"mode"`
Description string `json:"description"`
Slug string `json:"slug"`
FullName string `json:"full_name"`
CreatedAt string `json:"created_at"`
Following bool `json:"following"`
User user `json:"user"`
}
ListsListOutput contains the output of listing the lists
type ListsMembersInput ¶
type ListsMembersInput struct {
ListID *int64 `schema:"list_id"`
Slug *string `schema:"slug"`
OwnerScreenName *string `schema:"owner_screen_name"`
OwnerID *int64 `schema:"owner_id"`
Count *int `schema:"count"`
Cursor *int `schema:"cursor"`
IncludeEntities *bool `schema:"include_entities"`
SkipStatus *bool `schema:"skip_status"`
}
ListsMembersInput contains the possible inputs when listing the members of a list
type ListsMembersOutput ¶
type ListsMembersOutput struct {
Users []user `json:"users"`
NextCursor int `json:"next_cursor"`
NextCursorStr string `json:"next_cursor_str"`
PreviousCursor int `json:"previous_cursor"`
PreviousCursorStr string `json:"previous_cursor_str"`
TotalCount int `json:"total_count"`
}
ListsMembersOutput contians the output from listing the members of a list
type ListsMembersShowInput ¶
type ListsMembersShowInput struct {
ListID *int64 `schema:"list_id"`
Slug *string `schema:"slug"`
UserID *int64 `schema:"user_id"`
ScreenName *string `schema:"screen_name"`
OwnerScreenName *string `schema:"owner_screen_name"`
OwnerID *int64 `schema:"owner_id"`
IncludeEntities *bool `schema:"include_entities"`
SkipStatus *bool `schema:"skip_status"`
}
ListsMembersShowInput contains the possible inputs for the lists/members/show endpoint
type ListsMembersShowOutput ¶
type ListsMembersShowOutput struct {
// contains filtered or unexported fields
}
ListsMembersShowOutput contains the output for the lists/members/show endpoint
type OAuthAccessTokenInput ¶
type OAuthAccessTokenInput struct {
OAuthToken *string `schema:"oauth_token"`
OAuthVerifier *string `schema:"oauth_verifier"`
}
OAuthAccessTokenInput contains the input necessary to exchange a request token for an access token
type OAuthAccessTokenOutput ¶
type OAuthAccessTokenOutput struct {
OAuthToken string `schema:"oauth_token"`
OAuthTokenSecret string `schema:"oauth_token_secret"`
UserID int64 `schema:"user_id"`
ScreenName string `schema:"screen_name"`
}
OAuthAccessTokenOutput contains the results of calling OAuth Access Token, including a long lived token
type OAuthRequestTokenInput ¶
type OAuthRequestTokenInput struct {
OAuthCallback *string `schema:"oauth_callback"`
XAuthAccessType *string `schema:"x_auth_access_type"`
}
OAuthRequestTokenInput contains the possible inputs to the request token endpoint.
type OAuthRequestTokenOutput ¶
type OAuthRequestTokenOutput struct {
OAuthToken string `schema:"oauth_token,required"`
OAuthTokenSecret string `schema:"oauth_token_secret,required"`
OAuthCallbackConfirmed bool `schema:"oauth_callback_confirmed,required"`
}
OAuthRequestTokenOutput contains the results of calling request token.
type StatusesFilterInput ¶
type StatusesFilterInput struct {
Follow *string `schema:"follow"`
Track *string `schema:"track"`
Locations *string `schema:"locations"`
Delimited *string `schema:"delimited"`
StallWarnings *string `schema:"stall_warnings"`
}
StatusesFilterInput contains the input options for getting filtered statuses
type StatusesFilterOutput ¶
type StatusesFilterOutput struct {
QuotedStatus tweet `json:"quoted_status"`
RetweetedStatus tweet `json:"retweeted_status"`
ExtendedTweet tweet `json:"extended_tweet"`
// contains filtered or unexported fields
}
StatusesFilterOutput contains the output for a single response from the filtered statuses endpoint
type StatusesUpdateInput ¶
type StatusesUpdateInput struct {
Status *string `schema:"status"`
InReplyToStatusID *int64 `schema:"in_reply_to_status_id"`
AutoPopulateReplyMetadata *bool `schema:"auto_populate_reply_metadata"`
ExcludeReplyUserIDs *string `schema:"exclude_reply_user_ids"`
AttachmentURL *string `schema:"attachment_url"`
MediaIDs *string `schema:"media_ids"`
PossiblySensitive *bool `schema:"possibly_sensitive"`
Lat *float64 `schema:"lat"`
Long *float64 `schema:"long"`
PlaceID *string `schema:"place_id"`
DisplayCoordinates *bool `schema:"display_coordinates"`
TrimUser *bool `schema:"trim_user"`
EnableDMCommands *bool `schema:"enable_dmcommands"`
FailDMCommands *bool `schema:"fail_dmcommands"`
CardURI *string `schema:"card_uri"`
}
StatusesUpdateInput contains the possible inputs when updating a status
type StatusesUpdateOutput ¶
type StatusesUpdateOutput struct {
CreatedAt string `json:"created_at"`
ID int64 `json:"id"`
IDStr string `json:"id_str"`
Text string `json:"text"`
Source string `json:"source"`
Truncated bool `json:"truncated"`
InReplyToStatusID int64 `json:"in_reply_to_status_id"`
InReplyToStatusIDStr string `json:"in_reply_to_status_id_str"`
InReplyToUserID int64 `json:"in_reply_to_user_id"`
InReplyToUserIDStr string `json:"in_reply_to_user_id_str"`
InReplyToScreenName string `json:"in_reply_to_screen_name"`
User user `json:"user"`
}
StatusesUpdateOutput contains the output from posting a status update
type StatusesUserTimelineInput ¶
type StatusesUserTimelineInput struct {
UserID *int64 `schema:"user_id"`
ScreenName *string `schema:"screen_name"`
SinceID *int64 `schema:"since_id"`
Count *int `schema:"count"`
MaxID *int64 `schema:"max_id"`
TrimUser *bool `schema:"trim_user"`
ExcludeReplies *bool `schema:"exclude_replies"`
IncludeRts *bool `schema:"include_rts"`
}
StatusesUserTimelineInput contains the input options for getting the users timeline statuses
type StatusesUserTimelineOutput ¶
type StatusesUserTimelineOutput struct {
// contains filtered or unexported fields
}
StatusesUserTimelineOutput contains the output for a response from the users timeline endpoint