models

package
v0.0.0-...-706d53e Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaType

type MediaType string
const (
	MediaTypePhoto MediaType = "photo"
)

type ReferenceType

type ReferenceType string
const (
	ReferenceTypeRetweet ReferenceType = "retweeted"
)

type Tweet

type Tweet struct {
	ID               string
	AuthorID         string
	AuthorUsername   string
	ReferencedType   ReferenceType
	Text             string
	Published        time.Time
	Sensitive        bool
	ReferencedTweets []Tweet
	Medias           []TweetMedia
}

func (*Tweet) IsAuthoredBy

func (t *Tweet) IsAuthoredBy(username string) bool

func (*Tweet) Retweet

func (t *Tweet) Retweet() *Tweet

type TweetMedia

type TweetMedia struct {
	Type          MediaType
	URL           *url.URL
	Width, Height int
}

Jump to

Keyboard shortcuts

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