Documentation
¶
Index ¶
- type Profile
- type SearchRequest
- type SearchResponse
- type TimelineRequest
- type TimelineResponse
- type Trend
- type TrendsRequest
- type TrendsResponse
- type Tweet
- type TwitterService
- func (t *TwitterService) Search(request *SearchRequest) (*SearchResponse, error)
- func (t *TwitterService) Timeline(request *TimelineRequest) (*TimelineResponse, error)
- func (t *TwitterService) Trends(request *TrendsRequest) (*TrendsResponse, error)
- func (t *TwitterService) User(request *UserRequest) (*UserResponse, error)
- type UserRequest
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Profile ¶
type Profile struct { // the account creation date CreatedAt string `json:"createdAt"` // the user description Description string `json:"description"` // the follower count Followers int64 `json:"followers,string"` // the user id Id int64 `json:"id,string"` // The user's profile picture ImageUrl string `json:"imageUrl"` // the user's location Location string `json:"location"` // display name of the user Name string `json:"name"` // if the account is private Private bool `json:"private"` // the username Username string `json:"username"` // if the account is verified Verified bool `json:"verified"` }
type SearchRequest ¶
type SearchResponse ¶
type SearchResponse struct { // the related tweets for the search Tweets []Tweet `json:"tweets"` }
type TimelineRequest ¶
type TimelineResponse ¶
type TimelineResponse struct { // The recent tweets for the user Tweets []Tweet `json:"tweets"` }
type TrendsRequest ¶
type TrendsRequest struct { }
type TrendsResponse ¶
type TrendsResponse struct { // a list of trending topics Trends []Trend `json:"trends"` }
type Tweet ¶
type Tweet struct { // time of tweet CreatedAt string `json:"createdAt"` // number of times favourited FavouritedCount int64 `json:"favouritedCount,string"` // id of the tweet Id int64 `json:"id,string"` // number of times retweeted RetweetedCount int64 `json:"retweetedCount,string"` // text of the tweet Text string `json:"text"` // username of the person who tweeted Username string `json:"username"` }
type TwitterService ¶
type TwitterService struct {
// contains filtered or unexported fields
}
func NewTwitterService ¶
func NewTwitterService(token string) *TwitterService
func (*TwitterService) Search ¶
func (t *TwitterService) Search(request *SearchRequest) (*SearchResponse, error)
Search for tweets with a simple query
func (*TwitterService) Timeline ¶
func (t *TwitterService) Timeline(request *TimelineRequest) (*TimelineResponse, error)
Get the timeline for a given user
func (*TwitterService) Trends ¶
func (t *TwitterService) Trends(request *TrendsRequest) (*TrendsResponse, error)
Get the current global trending topics
func (*TwitterService) User ¶
func (t *TwitterService) User(request *UserRequest) (*UserResponse, error)
Get a user's twitter profile
type UserRequest ¶
type UserRequest struct { // the username to lookup Username string `json:"username"` }
type UserResponse ¶
Click to show internal directories.
Click to hide internal directories.