twistream: Index | Examples | Files

package twistream

import ""

Definitions of properties in Status



Package Files

api.go properties.go status.go timeline.go

type Status Uses

type Status struct {
    CreatedAt            string   `json:"created_at"`
    Id                   int64    `json:"id"`
    IdStr                string   `json:"id_str"`
    Text                 string   `json:"text"`
    Source               string   `json:"source"`
    Truncated            bool     `json:"truncated"`
    InReplyToStatusId    int64    `json:"in_reply_to_status_id"`
    InReplyToStatusIdStr string   `json:"in_reply_to_status_id_str"`
    InReplyToUserId      int64    `json:"in_reply_to_user_id"`
    InReplyToUserIdStr   string   `json:"in_reply_to_user_id_str"`
    InReplyToScreenName  string   `json:"in_reply_to_screen_name"`
    User                 user     `json:"user"`
    Geo                  geo      `json:"geo"`
    Place                string   `json:"place"`
    Contributors         []int64  `json:"contributors"`
    RetweetCount         int      `json:"retweet_count"`
    FavoriteCount        int      `json:"favorite_count"`
    Entities             entities `json:"entities"`
    Favorited            bool     `json:"favorited"`
    Retweeted            bool     `json:"retweeted"`
    FilterLevel          string   `json:"filter_level"`
    Lang                 string   `json:"lang"`

func (Status) ToParams Uses

func (s Status) ToParams() map[string]string

type Timeline Uses

type Timeline struct {
    // contains filtered or unexported fields

func New Uses

func New(endpoint, consumerKey, consumerSecret, accessToken, accessTokenSecret string) (tl *Timeline, e error)

New provides new reference for specified Timeline.

func (*Timeline) Listen Uses

func (tl *Timeline) Listen() <-chan Status

Listen bytes sent from Twitter Streaming API and send completed status to the channel.


timeline, _ := twistream.New(
// Practically, you would run this loop by goroutine
for {
    status := <-timeline.Listen()

func (*Timeline) Tweet Uses

func (tl *Timeline) Tweet(status Status) (e error)

Tweet posts status to the timeline

Package twistream imports 6 packages (graph) and is imported by 1 packages. Updated 2016-07-22. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).