utils

package
v0.0.0-...-c45c940 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RequestsPerSlidingWindow = 75
View Source
const SlidingWindow = 660 * time.Second

Variables

This section is empty.

Functions

func GenerateTweetURL

func GenerateTweetURL(username string, id int64) string

func TopLikers

func TopLikers(top interface{}) []string

func TruncateString

func TruncateString(str string, num int) (out string)

Types

type LimitController

type LimitController struct {
	Requests []time.Time
}

func (*LimitController) WaitBeforeRequest

func (l *LimitController) WaitBeforeRequest()

Jump to

Keyboard shortcuts

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