Documentation ¶
Index ¶
- Constants
- Variables
- func Configure(appID string, appSecret string, oauthCallback string)
- func New(ctx context.Context, creds social.Credentials) (providers.ProviderSession, error)
- func NewOAuth() social.OAuth
- type Mapper
- type OAuth
- type Provider
- func (p *Provider) GetFeed(query providers.Query) (social.Posts, *providers.Cursor, error)
- func (p *Provider) GetFollowers(query providers.Query) ([]*social.User, *providers.Cursor, error)
- func (p *Provider) GetFriends(query providers.Query) ([]*social.User, *providers.Cursor, error)
- func (p *Provider) GetPosts(query providers.Query) (social.Posts, *providers.Cursor, error)
- func (p *Provider) GetUser(query providers.Query) (*social.User, error)
- func (p *Provider) ID() string
- func (p *Provider) Post(ctx context.Context, msg string, shareLink string) (*social.Post, error)
- func (p *Provider) Search(query providers.Query) (social.Posts, *providers.Cursor, error)
- type UserMapper
Constants ¶
View Source
const ( ProviderID = `twitter` TimeLayout = `Mon Jan 02 15:04:05 -0700 2006` )
Variables ¶
View Source
var ( AppID string AppSecret string OAuthCallback string )
Functions ¶
func New ¶
func New(ctx context.Context, creds social.Credentials) (providers.ProviderSession, error)
Types ¶
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func (*OAuth) AuthCodeURL ¶
func (*OAuth) ProviderID ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) GetFollowers ¶
Get a user's followers Network docs: https://dev.twitter.com/rest/reference/get/followers/list
func (*Provider) GetFriends ¶
Get a user's friends (aka following) Network docs: https://dev.twitter.com/rest/reference/get/friends/list
type UserMapper ¶
type UserMapper struct{}
func (UserMapper) BuildUsers ¶
func (m UserMapper) BuildUsers(us []anaconda.User) []*social.User
Click to show internal directories.
Click to hide internal directories.