twitter

package
v0.0.0-...-d61e0a5 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PerUserMutex *mapmutex.Mutex

PerUserMutex will block on a userid basis to prevent spamming from one user

Functions

func AskForFeedback

func AskForFeedback()

AskForFeedback will periodically ask users for feedback after they've done the KYC

func GetClient

func GetClient() (*twitter.Client, *database.OAuthToken, error)

GetClient returns a twitter client

func GetFollowers

func GetFollowers()

GetFollowers will start a periodic watcher retrieving the followers of our account every 6 hours

func InitializeWebhook

func InitializeWebhook() error

InitializeWebhook will register and create the webhook through the twitter api

func MonitorRatelimit

func MonitorRatelimit()

MonitorRatelimit will ensure that all twitter calls are executed at most once per two seconds

func SendDM

func SendDM(_user string, _userID string, _text string) error

SendDM will send a specific DM to a user

func StartServer

func StartServer()

StartServer spins up a webserver for the API

func WatchNotifications

func WatchNotifications()

WatchNotifications will watch for notifications in the database and execute them

Types

type OAuthRequest

type OAuthRequest struct {
	Handle       string
	PIN          string
	RequestToken string
}

OAuthRequest collects all required information for completing the OAuth1 authentication flow

Jump to

Keyboard shortcuts

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