twitter

package
v0.0.0-...-d2cb140 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PersistFollowers

func PersistFollowers(db *sqlx.DB, fd FollowerData) error

func PersistStats

func PersistStats(db *sqlx.DB, stats TwitterStats) error

Types

type FollowerData

type FollowerData struct {
	Day        string `db:"day"`
	Slug       string `db:"slug"`
	Followers  uint   `db:"followers"`
	Following  uint   `db:"following"`
	TweetCount uint   `db:"tweet_count"`
	UserName   string `db:"user_name"`
}

func ParseFollowers

func ParseFollowers(day, slug, fpath string) (*FollowerData, error)

type PublicMetrics

type PublicMetrics struct {
	RetweetCount uint `json:"retweet_count" db:"retweet_count"`
	ReplyCount   uint `json:"reply_count" db:"reply_count"`
	LikeCount    uint `json:"like_count" db:"like_count"`
	QuoteCount   uint `json:"quote_count" db:"quote_count"`
}

type TwitterStats

type TwitterStats struct {
	Day        string `db:"day"`
	Criterion  string `db:"criterion"`
	Slug       string `db:"slug"`
	DataSource string `db:"data_source_name"`
	Followers  uint   `db:"followers"`
	SearchHits uint   `db:"search_hits"`
	PublicMetrics
}

func ParseSearchStats

func ParseSearchStats(chain, day, dsource, slug, spath string) (*TwitterStats, error)

Jump to

Keyboard shortcuts

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