Documentation ¶
Index ¶
Constants ¶
View Source
const ( RequestTokenUrl string = "http://api.twitter.com/oauth/request_token" AuthorizeTokenUrl string = "https://api.twitter.com/oauth/authorize" AccessTokenUrl string = "https://api.twitter.com/oauth/access_token" )
View Source
const (
STREAM_URL = "https://userstream.twitter.com/1.1/user.json"
)
userstream url
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type DirectMessage ¶
type DirectMessage struct { CreatedAt string `json:"created_at"` DirectMessage string `json:"direct_message"` Entities struct { Hashtags []interface{} `json:"hashtags"` Urls []interface{} `json:"urls"` UserMentions []interface{} `json:"user_mentions"` } `json:"entities"` ID int `json:"id"` IdStr string `json:"id_str"` Recipient 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"` 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"` 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"` ProfileImageURL string `json:"profile_image_url"` ProfileImageUrlHttps string `json:"profile_image_url_https"` ProfileLinkColor string `json:"profile_link_color"` 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"` ShowAllInlineMedia bool `json:"show_all_inline_media"` StatusesCount int `json:"statuses_count"` TimeZone string `json:"time_zone"` URL interface{} `json:"url"` UtcOffset int `json:"utc_offset"` Verified bool `json:"verified"` } `json:"recipient"` RecipientID int `json:"recipient_id"` RecipientScreenName string `json:"recipient_screen_name"` Sender 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"` 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"` 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"` ProfileImageURL string `json:"profile_image_url"` ProfileImageUrlHttps string `json:"profile_image_url_https"` ProfileLinkColor string `json:"profile_link_color"` 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"` ShowAllInlineMedia bool `json:"show_all_inline_media"` StatusesCount int `json:"statuses_count"` TimeZone string `json:"time_zone"` URL string `json:"url"` UtcOffset int `json:"utc_offset"` Verified bool `json:"verified"` } `json:"sender"` SenderID int `json:"sender_id"` SenderScreenName string `json:"sender_screen_name"` Text string `json:"text"` }
type Event ¶
type Event struct { CreatedAt string `json:"created_at"` Event string `json:"event"` Source 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"` FavouritesCount int `json:"favourites_count"` FollowRequestSent interface{} `json:"follow_request_sent"` FollowersCount int `json:"followers_count"` Following interface{} `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 interface{} `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"` StatusesCount int `json:"statuses_count"` TimeZone string `json:"time_zone"` URL string `json:"url"` UtcOffset int `json:"utc_offset"` Verified bool `json:"verified"` } `json:"source"` Target 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"` FavouritesCount int `json:"favourites_count"` FollowRequestSent interface{} `json:"follow_request_sent"` FollowersCount int `json:"followers_count"` Following interface{} `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 interface{} `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"` StatusesCount int `json:"statuses_count"` TimeZone string `json:"time_zone"` URL string `json:"url"` UtcOffset int `json:"utc_offset"` Verified bool `json:"verified"` } `json:"target"` TargetObject struct { Contributors interface{} `json:"contributors"` Coordinates interface{} `json:"coordinates"` CreatedAt string `json:"created_at"` Entities struct { Hashtags []interface{} `json:"hashtags"` Symbols []interface{} `json:"symbols"` Urls []struct { DisplayURL string `json:"display_url"` ExpandedURL string `json:"expanded_url"` Indices []int `json:"indices"` URL string `json:"url"` } `json:"urls"` UserMentions []struct { ID int `json:"id"` IdStr string `json:"id_str"` Indices []int `json:"indices"` Name string `json:"name"` ScreenName string `json:"screen_name"` } `json:"user_mentions"` } `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 string `json:"in_reply_to_screen_name"` InReplyToStatusID int `json:"in_reply_to_status_id"` InReplyToStatusIdStr string `json:"in_reply_to_status_id_str"` InReplyToUserID int `json:"in_reply_to_user_id"` InReplyToUserIdStr string `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 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"` FavouritesCount int `json:"favourites_count"` FollowRequestSent interface{} `json:"follow_request_sent"` FollowersCount int `json:"followers_count"` Following interface{} `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 interface{} `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"` StatusesCount int `json:"statuses_count"` TimeZone string `json:"time_zone"` URL string `json:"url"` UtcOffset int `json:"utc_offset"` Verified bool `json:"verified"` } `json:"user"` } `json:"target_object"` }
type Status ¶
type Status struct { Contributors interface{} `json:"contributors"` Coordinates interface{} `json:"coordinates"` CreatedAt string `json:"created_at"` Entities struct { Hashtags []interface{} `json:"hashtags"` Symbols []interface{} `json:"symbols"` Urls []struct { DisplayURL string `json:"display_url"` ExpandedURL string `json:"expanded_url"` Indices []int `json:"indices"` URL string `json:"url"` } `json:"urls"` UserMentions []struct { ID int `json:"id"` IdStr string `json:"id_str"` Indices []int `json:"indices"` Name string `json:"name"` ScreenName string `json:"screen_name"` } `json:"user_mentions"` } `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"` RetweetedStatus struct { Contributors interface{} `json:"contributors"` Coordinates interface{} `json:"coordinates"` CreatedAt string `json:"created_at"` Entities struct { Hashtags []interface{} `json:"hashtags"` Symbols []interface{} `json:"symbols"` Urls []interface{} `json:"urls"` UserMentions []interface{} `json:"user_mentions"` } `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"` RetweetCount int `json:"retweet_count"` Retweeted bool `json:"retweeted"` Source string `json:"source"` Text string `json:"text"` Truncated bool `json:"truncated"` 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"` FavouritesCount int `json:"favourites_count"` FollowRequestSent interface{} `json:"follow_request_sent"` FollowersCount int `json:"followers_count"` Following interface{} `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 interface{} `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"` StatusesCount int `json:"statuses_count"` TimeZone string `json:"time_zone"` URL string `json:"url"` UtcOffset int `json:"utc_offset"` Verified bool `json:"verified"` } `json:"user"` } `json:"retweeted_status"` Source string `json:"source"` Text string `json:"text"` TimestampMs string `json:"timestamp_ms"` Truncated bool `json:"truncated"` 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"` FavouritesCount int `json:"favourites_count"` FollowRequestSent interface{} `json:"follow_request_sent"` FollowersCount int `json:"followers_count"` Following interface{} `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 interface{} `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"` 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"` StatusesCount int `json:"statuses_count"` TimeZone string `json:"time_zone"` URL string `json:"url"` UtcOffset int `json:"utc_offset"` Verified bool `json:"verified"` } `json:"user"` }
Directories ¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/mrjones/oauth
OAuth 1.0 consumer implementation.
|
OAuth 1.0 consumer implementation. |
_workspace/src/github.com/mrjones/oauth/examples/latitude
THIS NO LONGER WORKS!! Latitude is using OAuth 2.0 now.
|
THIS NO LONGER WORKS!! Latitude is using OAuth 2.0 now. |
_workspace/src/github.com/mrjones/oauth/examples/netflix
go run examples/netflix/netflix.go --consumerkey <key> --consumersecret <secret> --appname <appname>
|
go run examples/netflix/netflix.go --consumerkey <key> --consumersecret <secret> --appname <appname> |
_workspace/src/github.com/mrjones/oauth/examples/twitterserver
Similar to the twitter example, but using an HTTP server instead of the command line.
|
Similar to the twitter example, but using an HTTP server instead of the command line. |
Click to show internal directories.
Click to hide internal directories.