twitter

package
v0.0.0-...-af48650 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSearchRequest

func NewSearchRequest(sinceID uint64) *http.Request

NewSearchRequest returns a new HTTP request.

func NotifyText

func NotifyText(r *scuttlebutt.Repository) string

NotifyText returns a tweet sized message for a repository.

Types

type Notifier

type Notifier struct {
	Username string
	Language string

	Client interface {
		SendRequest(*http.Request) (*twittergo.APIResponse, error)
	}
	// contains filtered or unexported fields
}

Notifier represents a client to post messages to the Twitter API.

func NewNotifier

func NewNotifier() *Notifier

NewNotifier creates a new instance of Client authorized to a user.

func (*Notifier) LastTweetTime

func (n *Notifier) LastTweetTime() (time.Time, error)

LastTweetTime returns the timestamp of the last tweet. Returns a cached version, if possible. Otherwise retrieves from Twitter.

func (*Notifier) Notify

Notify updates the authorized user's status. Returns the tweet ID on success.

type Poller

type Poller struct {
	Client interface {
		SendRequest(*http.Request) (*twittergo.APIResponse, error)
	}
}

Poller represents polling client for the Twitter API.

func NewPoller

func NewPoller() *Poller

NewPoller creates a new instance of Poller.

func (*Poller) Poll

func (p *Poller) Poll(sinceID uint64) ([]*scuttlebutt.Message, error)

Poll returns new messages since a given message ID.

Jump to

Keyboard shortcuts

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