twitter

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const APIRateLimit = 15 * 60 / 15 * time.Second

https://developer.twitter.com/en/docs/twitter-api/rate-limits The product portal shows 180 requests / 15 minutes RateLimit is definied as: <window (in min)> * <seconds> / <Max requests per window> * <Second duration>

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Channel           string `json:"channel"`
	Password          string `json:"password"`
	ApiKey            string `json:"api_key"`
	ApiKeySecret      string `json:"api_key_secret"`
	AccessToken       string `json:"access_token"`
	AccessTokenSecret string `json:"access_token_secret"`
}

type Tweet

type Tweet struct {
	ID       string `json:"id"`
	Text     string `json:"text"`
	AuthorID string `json:"author_id"`
	User     User
}

type Twitter

type Twitter struct {
	// contains filtered or unexported fields
}

func NewTwitter

func NewTwitter(client *irc.Client, config Config) (twitter *Twitter, err error)

func (*Twitter) Run

func (t *Twitter) Run(ctx context.Context)

type User

type User struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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