twitter

package
v0.0.0-...-ed3c475 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TwitterBackend

type TwitterBackend interface {
	GetTwitterClientWithAccessTokens(ctx context.Context, consumerKey string, consumerSecret string, accessToken string, accessTokenSecret string) (TwitterClient, error)
}

type TwitterBackendImpl

type TwitterBackendImpl struct{}

func (*TwitterBackendImpl) GetTwitterClientWithAccessTokens

func (t *TwitterBackendImpl) GetTwitterClientWithAccessTokens(ctx context.Context, consumerKey string, consumerSecret string, accessToken string, accessTokenSecret string) (TwitterClient, error)

type TwitterClient

type TwitterClient interface {
	SearchUsers(query string, page int, count int) ([]twitter.User, error)
	LookupUsers(screenNames []string) ([]twitter.User, error)
	FriendshipLookup(fromScreenName, toScreenName string) (*twitter.Relationship, error)
}

This is an interface that abstracts the business logic related to Twitter APIs.

Having an internal interface helps reducing dependency binding and helps in testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL