twitter

package
v0.0.0-...-ad18335 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Lists *ListsService
	User  *UserService
	// contains filtered or unexported fields
}

Client is Twitter Client

func NewClient

func NewClient(consumerKey, consumerSecret, accessToken, accessTokenSecret string) *Client

NewClient create Twitter Client

func NewClientConfig

func NewClientConfig(config Config) *Client

NewClient create Twitter Client

func (*Client) Delete

func (c *Client) Delete(url string, userParams map[string]string) (resp *http.Response, err error)

func (*Client) Get

func (c *Client) Get(url string, userParams map[string]string) (resp *http.Response, err error)

func (*Client) Post

func (c *Client) Post(url string, userParams map[string]string) (resp *http.Response, err error)

func (*Client) Put

func (c *Client) Put(url string, body string, userParams map[string]string) (resp *http.Response, err error)

type Config

type Config struct {
	ConsumerKey       string `json:"consumerKey"`
	ConsumerSecret    string `json:"consumerSecret"`
	AccessToken       string `json:"accessToken"`
	AccessTokenSecret string `json:"accessTokenSecret"`
}

type Entities

type Entities struct {
	Hashtags    []interface{} `json:"hashtags"`
	Medias      []Media       `json:"media"`
	Symbols     []interface{} `json:"symbols"`
	Description struct {
		Urls []URLs `json:"urls"`
	} `json:"description"`
	URL struct {
		Urls []URLs `json:"urls"`
	} `json:"url"`
	UserMentions []interface{} `json:"user_mentions"`
}

type Handle

type Handle func(data []byte) bool

type ListsMembers

type ListsMembers struct {
	NextCursor        int    `json:"next_cursor"`
	NextCursorStr     string `json:"next_cursor_str"`
	PreviousCursor    int    `json:"previous_cursor"`
	PreviousCursorStr string `json:"previous_cursor_str"`
	Users             []User `json:"users"`
}

ListsMembers list members

type ListsService

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

func (*ListsService) GetMembers

func (l *ListsService) GetMembers(listID string) (*ListsMembers, error)

type Media

type Media struct {
	DisplayURL    string `json:"display_url"`
	ExpandedURL   string `json:"expanded_url"`
	ID            int    `json:"id"`
	IDStr         string `json:"id_str"`
	Indices       []int  `json:"indices"`
	MediaURL      string `json:"media_url"`
	MediaURLHTTPS string `json:"media_url_https"`
	Sizes         struct {
		Large struct {
			H      int    `json:"h"`
			Resize string `json:"resize"`
			W      int    `json:"w"`
		} `json:"large"`
		Medium struct {
			H      int    `json:"h"`
			Resize string `json:"resize"`
			W      int    `json:"w"`
		} `json:"medium"`
		Small struct {
			H      int    `json:"h"`
			Resize string `json:"resize"`
			W      int    `json:"w"`
		} `json:"small"`
		Thumb struct {
			H      int    `json:"h"`
			Resize string `json:"resize"`
			W      int    `json:"w"`
		} `json:"thumb"`
	} `json:"sizes"`
	Type string `json:"type"`
	URL  string `json:"url"`
}

type RetweeetedStatus

type RetweeetedStatus struct {
	Contributors     interface{} `json:"contributors"`
	Coordinates      interface{} `json:"coordinates"`
	CreatedAt        string      `json:"created_at"`
	Entities         Entities    `json:"entities"`
	ExtendedEntities struct {
		Media []Media `json:"media"`
	} `json:"extended_entities"`
	FavoriteCount        int         `json:"favorite_count"`
	Favorited            bool        `json:"favorited"`
	Geo                  interface{} `json:"geo"`
	ID                   int         `json:"id"`
	IDStr                string      `json:"id_str"`
	InReplyToScreenName  interface{} `json:"in_reply_to_screen_name"`
	InReplyToStatusID    interface{} `json:"in_reply_to_status_id"`
	InReplyToStatusIDStr interface{} `json:"in_reply_to_status_id_str"`
	InReplyToUserID      interface{} `json:"in_reply_to_user_id"`
	InReplyToUserIDStr   interface{} `json:"in_reply_to_user_id_str"`
	Lang                 string      `json:"lang"`
	Place                interface{} `json:"place"`
	PossiblySensitive    bool        `json:"possibly_sensitive"`
	RetweetCount         int         `json:"retweet_count"`
	Retweeted            bool        `json:"retweeted"`
	Source               string      `json:"source"`
	Text                 string      `json:"text"`
	Truncated            bool        `json:"truncated"`
	User                 User        `json:"user"`
}

type Status

type Status struct {
	Contributors         interface{} `json:"contributors"`
	Coordinates          interface{} `json:"coordinates"`
	CreatedAt            string      `json:"created_at"`
	Entities             Entities    `json:"entities"`
	FavoriteCount        int         `json:"favorite_count"`
	Favorited            bool        `json:"favorited"`
	Geo                  interface{} `json:"geo"`
	ID                   int         `json:"id"`
	IDStr                string      `json:"id_str"`
	InReplyToScreenName  interface{} `json:"in_reply_to_screen_name"`
	InReplyToStatusID    interface{} `json:"in_reply_to_status_id"`
	InReplyToStatusIDStr interface{} `json:"in_reply_to_status_id_str"`
	InReplyToUserID      interface{} `json:"in_reply_to_user_id"`
	InReplyToUserIDStr   interface{} `json:"in_reply_to_user_id_str"`
	Lang                 string      `json:"lang"`
	Place                interface{} `json:"place"`
	PossiblySensitive    bool        `json:"possibly_sensitive"`
	RetweetCount         int         `json:"retweet_count"`
	Retweeted            bool        `json:"retweeted"`
	Source               string      `json:"source"`
	Text                 string      `json:"text"`
	Truncated            bool        `json:"truncated"`
}

type Streaming

type Streaming struct {
	Contributors         interface{}      `json:"contributors"`
	Coordinates          interface{}      `json:"coordinates"`
	CreatedAt            string           `json:"created_at"`
	Entities             Entities         `json:"entities"`
	FavoriteCount        int              `json:"favorite_count"`
	Favorited            bool             `json:"favorited"`
	FilterLevel          string           `json:"filter_level"`
	Geo                  interface{}      `json:"geo"`
	ID                   int              `json:"id"`
	IDStr                string           `json:"id_str"`
	InReplyToScreenName  interface{}      `json:"in_reply_to_screen_name"`
	InReplyToStatusID    interface{}      `json:"in_reply_to_status_id"`
	InReplyToStatusIDStr interface{}      `json:"in_reply_to_status_id_str"`
	InReplyToUserID      interface{}      `json:"in_reply_to_user_id"`
	InReplyToUserIDStr   interface{}      `json:"in_reply_to_user_id_str"`
	Lang                 string           `json:"lang"`
	Place                interface{}      `json:"place"`
	RetweetCount         int              `json:"retweet_count"`
	Retweeted            bool             `json:"retweeted"`
	RetweetedStatus      RetweeetedStatus `json:"retweeted_status"`
	Source               string           `json:"source"`
	Text                 string           `json:"text"`
	TimestampMs          string           `json:"timestamp_ms"`
	Truncated            bool             `json:"truncated"`
	User                 User             `json:"user"`
}

type URLs

type URLs struct {
	DisplayURL  string `json:"display_url"`
	ExpandedURL string `json:"expanded_url"`
	Indices     []int  `json:"indices"`
	URL         string `json:"url"`
}

type User

type User struct {
	ContributorsEnabled            bool        `json:"contributors_enabled"`
	CreatedAt                      string      `json:"created_at"`
	DefaultProfile                 bool        `json:"default_profile"`
	DefaultProfileImage            bool        `json:"default_profile_image"`
	Description                    string      `json:"description"`
	Entities                       Entities    `json:"entities"`
	FavouritesCount                int         `json:"favourites_count"`
	FollowRequestSent              bool        `json:"follow_request_sent"`
	FollowersCount                 int         `json:"followers_count"`
	Following                      bool        `json:"following"`
	FriendsCount                   int         `json:"friends_count"`
	GeoEnabled                     bool        `json:"geo_enabled"`
	ID                             int         `json:"id"`
	IDStr                          string      `json:"id_str"`
	IsTranslationEnabled           bool        `json:"is_translation_enabled"`
	IsTranslator                   bool        `json:"is_translator"`
	Lang                           string      `json:"lang"`
	ListedCount                    int         `json:"listed_count"`
	Location                       string      `json:"location"`
	Name                           string      `json:"name"`
	Notifications                  bool        `json:"notifications"`
	ProfileBackgroundColor         string      `json:"profile_background_color"`
	ProfileBackgroundImageURL      string      `json:"profile_background_image_url"`
	ProfileBackgroundImageURLHTTPS string      `json:"profile_background_image_url_https"`
	ProfileBackgroundTile          bool        `json:"profile_background_tile"`
	ProfileBannerURL               string      `json:"profile_banner_url"`
	ProfileImageURL                string      `json:"profile_image_url"`
	ProfileImageURLHTTPS           string      `json:"profile_image_url_https"`
	ProfileLinkColor               string      `json:"profile_link_color"`
	ProfileLocation                interface{} `json:"profile_location"`
	ProfileSidebarBorderColor      string      `json:"profile_sidebar_border_color"`
	ProfileSidebarFillColor        string      `json:"profile_sidebar_fill_color"`
	ProfileTextColor               string      `json:"profile_text_color"`
	ProfileUseBackgroundImage      bool        `json:"profile_use_background_image"`
	Protected                      bool        `json:"protected"`
	ScreenName                     string      `json:"screen_name"`
	Status                         Status      `json:"status"`
	StatusesCount                  int         `json:"statuses_count"`
	TimeZone                       string      `json:"time_zone"`
	URL                            string      `json:"url"`
	UtcOffset                      int         `json:"utc_offset"`
	Verified                       bool        `json:"verified"`
}

User twitter account user

type UserService

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

func (*UserService) Stream

func (u *UserService) Stream(params map[string]string, streamHandler Handle) error

Jump to

Keyboard shortcuts

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