Documentation ¶
Index ¶
Constants ¶
View Source
const (
TwitterErrorTypeNotFound = "https://api.twitter.com/2/problems/resource-not-found"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Authorizer ¶
type Authorizer struct {
Token string
}
func (Authorizer) Add ¶
func (a Authorizer) Add(req *http.Request)
type Backend ¶
type Backend interface { UserNameLookup( ctx context.Context, usernames []string, opts twitter.UserLookupOpts, ) (*twitter.UserLookupResponse, error) UserTweetTimeline( ctx context.Context, userID string, opts twitter.UserTweetTimelineOpts, ) (*twitter.UserTweetTimelineResponse, error) TweetLookup(ctx context.Context, ids []string, opts twitter.TweetLookupOpts) (*twitter.TweetLookupResponse, error) UserLookup(ctx context.Context, ids []string, opts twitter.UserLookupOpts) (*twitter.UserLookupResponse, error) }
type TwitterClient ¶
type TwitterClient interface { GetUserTweets(context.Context, string, twitter.UserTweetTimelineOpts) (*twitter.UserTweetTimelineResponse, error) GetTweets(context.Context, []string, twitter.TweetLookupOpts) (*twitter.TweetLookupResponse, error) GetUser(ctx context.Context, username string) (*twitter.UserObj, error) GetUserByIDs(context.Context, []string) ([]*twitter.UserObj, error) }
type UserNotFoundError ¶
type UserNotFoundError struct {
Username string
}
func (UserNotFoundError) Error ¶
func (u UserNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.