twitter

package
v0.0.0-...-92255fb Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tweet

type Tweet struct {
	Message   *scraper.Message `json:"message"`
	TweetID   int64            `json:"tweet_id"`
	TweetTime time.Time        `json:"tweet_time"`
}

Tweet represents an individual tweet and its accompanying message.

type Twitter

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

Client sends tweets as soon as they are ready.

func New

func New(config *config.Config, ch <-chan *scraper.Message) (*Twitter, error)

New creates a new Twitter client. The credentials are checked to ensure that they are valid.

func (*Twitter) Close

func (t *Twitter) Close()

Waits for the client to shutdown. The channel passed to New *must* be closed first.

func (*Twitter) Delete

func (t *Twitter) Delete(tweetID int64) error

Delete the tweet with the given ID.

func (*Twitter) Send

func (t *Twitter) Send(status string) error

Send posts a single status update.

func (*Twitter) Tweets

func (t *Twitter) Tweets() []*Tweet

Tweets retrieves recently tweeted messages.

Jump to

Keyboard shortcuts

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