Documentation ¶
Index ¶
- Constants
- type Connection
- func (c *Connection) CheckUserValueIntegrity(v url.Values) bool
- func (c *Connection) DeleteTweetFromID(id string) (Tweet, error)
- func (c *Connection) FillMissingUserValues(v url.Values) error
- func (c *Connection) GetAllFollowersFromID(userID string) (Users, error)
- func (c *Connection) GetAllFollowersFromScreenName(screenName string) (Users, error)
- func (c *Connection) GetAllFriendsFromID(userID string) (Users, error)
- func (c *Connection) GetAllFriendsFromScreenName(screenName string) (Users, error)
- func (c *Connection) GetAllRecentFavoritesFromScreenName(screenName string) (Tweets, error)
- func (c *Connection) GetAllRecentMentions() (Tweets, error)
- func (c *Connection) GetAllRecentMentionsSince(sinceID int64) (Tweets, error)
- func (c *Connection) GetAllRecentNHomeTimelineTweets() (Tweets, error)
- func (c *Connection) GetAllRecentTweetsFromScreenName(screenName string) (Tweets, error)
- func (c *Connection) GetIDFromScreenName(screenName string) (int64, error)
- func (c *Connection) GetMixedTweetsByQuery(query string) (Tweets, error)
- func (c *Connection) GetNFollowersFromID(n int, userID string) (Users, error)
- func (c *Connection) GetNFollowersFromScreenName(n int, screenName string) (Users, error)
- func (c *Connection) GetNFriendsFromID(n int, userID string) (Users, error)
- func (c *Connection) GetNFriendsFromScreenName(n int, screenName string) (Users, error)
- func (c *Connection) GetPopularTweetsByQuery(query string) (Tweets, error)
- func (c *Connection) GetRecentNFavoritesFromScreenName(screenName string, n int) (Tweets, error)
- func (c *Connection) GetRecentNHomeTimelineTweets(n int) (Tweets, error)
- func (c *Connection) GetRecentNMentions(n int) (Tweets, error)
- func (c *Connection) GetRecentNMentionsSince(n int, sinceID int64) (Tweets, error)
- func (c *Connection) GetRecentNTweetsFromScreenName(screenName string, n int) (Tweets, error)
- func (c *Connection) GetRecentTweetsByQuery(query string) (Tweets, error)
- func (c *Connection) GetScreenNameFromID(id int64) (string, error)
- func (c *Connection) GetSingleTweetFromID(id int64) (Tweet, error)
- func (c *Connection) GetTopUsersFromQuery(query string) (Users, error)
- func (c *Connection) GetXTweetsByQuery(query string, v url.Values) (Tweets, error)
- func (c *Connection) PublishCollageTweet(filePaths []string, text string) (int64, error)
- func (c *Connection) PublishCollageTweetAsReply(filePaths []string, text string, replyTweetID int64) (int64, error)
- func (c *Connection) PublishPictureTweet(filepath string, text string) (int64, error)
- func (c *Connection) PublishPictureTweetAsReply(filepath string, text string, replyTweetID int64) (int64, error)
- func (c *Connection) PublishTextTweet(text string) (int64, error)
- func (c *Connection) PublishTextTweetAsReply(text string, replyTweetID int64) (int64, error)
- func (c *Connection) PublishVideoTweet(filepath string, text string) (int64, error)
- func (c *Connection) PublishVideoTweetAsReply(filepath string, text string, replyTweetID int64) (int64, error)
- func (c *Connection) Reconnect()
- func (c *Connection) UploadImage(filepath string) (int64, error)
- func (c *Connection) UploadVideo(filepath string) (int64, error)
- type Credentials
- type EntityFunc
- type RelationFunc
- type RelationInfo
- type SimpleUser
- type Tweet
- func (t Tweet) ContainsGIF() bool
- func (t Tweet) ContainsOnlyText() bool
- func (t Tweet) ContainsPhoto() bool
- func (t Tweet) ContainsVideo() bool
- func (t Tweet) DownloadMediaTo(dirPath string) ([]string, error)
- func (t Tweet) GetFullText() string
- func (t Tweet) GetHashtags() []string
- func (t Tweet) GetMediaURLs() []string
- func (t Tweet) GetText() string
- func (t Tweet) GetTextURLs() []string
- func (t Tweet) GetUserMentions() []SimpleUser
- type TweetEntity
- type TweetMap
- type Tweets
- type User
- func (u User) GetBackgroundImageURL() string
- func (u User) GetDescription() string
- func (u User) GetEmail() string
- func (u User) GetFavoritesCount() int
- func (u User) GetFollowersCount() int
- func (u User) GetFollowingCount() int
- func (u User) GetID() string
- func (u User) GetProfileImageURL() string
- func (u User) GetScreenName() string
- func (u User) GetStatusCount() int64
- func (u User) IsProtected() bool
- func (u User) IsVerified() bool
- type UserMap
- type Users
Constants ¶
View Source
const ( RelationFriend = "friend" RelationFollower = "follower" )
View Source
const ( MediaText = "text" // No use for now MediaPicture = "picture" MediaCollage = "collage" MediaVideo = "video" )
View Source
const ( EntityTweet = "tweet" EntityFavorite = "favorite" EntityRetweet = "retweet" EntityHomeTimeLine = "home-timeline-tweet" EntityMention = "mention-tweet" EntityAPILimit = 5000 // It is actually 3200 and this constant is set to 5000 to be on the safe side! )
View Source
const ( // These two limits are actually 3200! LimitFavs = 4000 LimitTweets = 4000 LimitTimelineTweeets = 4000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Client *anaconda.TwitterApi Credentials Credentials InfoLog *log.Logger ErrLog *log.Logger User *anaconda.User CreationTime int64 // contains filtered or unexported fields }
func NewConnection ¶
func NewConnection(c Credentials, logFile, logOutFile, logErrFile *os.File) (*Connection, error)
func (*Connection) CheckUserValueIntegrity ¶
func (c *Connection) CheckUserValueIntegrity(v url.Values) bool
func (*Connection) DeleteTweetFromID ¶
func (c *Connection) DeleteTweetFromID(id string) (Tweet, error)
func (*Connection) FillMissingUserValues ¶
func (c *Connection) FillMissingUserValues(v url.Values) error
func (*Connection) GetAllFollowersFromID ¶
func (c *Connection) GetAllFollowersFromID(userID string) (Users, error)
func (*Connection) GetAllFollowersFromScreenName ¶
func (c *Connection) GetAllFollowersFromScreenName(screenName string) (Users, error)
func (*Connection) GetAllFriendsFromID ¶
func (c *Connection) GetAllFriendsFromID(userID string) (Users, error)
func (*Connection) GetAllFriendsFromScreenName ¶
func (c *Connection) GetAllFriendsFromScreenName(screenName string) (Users, error)
func (*Connection) GetAllRecentFavoritesFromScreenName ¶
func (c *Connection) GetAllRecentFavoritesFromScreenName(screenName string) (Tweets, error)
func (*Connection) GetAllRecentMentions ¶
func (c *Connection) GetAllRecentMentions() (Tweets, error)
func (*Connection) GetAllRecentMentionsSince ¶
func (c *Connection) GetAllRecentMentionsSince(sinceID int64) (Tweets, error)
func (*Connection) GetAllRecentNHomeTimelineTweets ¶
func (c *Connection) GetAllRecentNHomeTimelineTweets() (Tweets, error)
func (*Connection) GetAllRecentTweetsFromScreenName ¶
func (c *Connection) GetAllRecentTweetsFromScreenName(screenName string) (Tweets, error)
func (*Connection) GetIDFromScreenName ¶
func (c *Connection) GetIDFromScreenName(screenName string) (int64, error)
func (*Connection) GetMixedTweetsByQuery ¶
func (c *Connection) GetMixedTweetsByQuery(query string) (Tweets, error)
func (*Connection) GetNFollowersFromID ¶
func (c *Connection) GetNFollowersFromID(n int, userID string) (Users, error)
func (*Connection) GetNFollowersFromScreenName ¶
func (c *Connection) GetNFollowersFromScreenName(n int, screenName string) (Users, error)
func (*Connection) GetNFriendsFromID ¶
func (c *Connection) GetNFriendsFromID(n int, userID string) (Users, error)
func (*Connection) GetNFriendsFromScreenName ¶
func (c *Connection) GetNFriendsFromScreenName(n int, screenName string) (Users, error)
func (*Connection) GetPopularTweetsByQuery ¶
func (c *Connection) GetPopularTweetsByQuery(query string) (Tweets, error)
func (*Connection) GetRecentNFavoritesFromScreenName ¶
func (c *Connection) GetRecentNFavoritesFromScreenName(screenName string, n int) (Tweets, error)
func (*Connection) GetRecentNHomeTimelineTweets ¶
func (c *Connection) GetRecentNHomeTimelineTweets(n int) (Tweets, error)
func (*Connection) GetRecentNMentions ¶
func (c *Connection) GetRecentNMentions(n int) (Tweets, error)
func (*Connection) GetRecentNMentionsSince ¶
func (c *Connection) GetRecentNMentionsSince(n int, sinceID int64) (Tweets, error)
func (*Connection) GetRecentNTweetsFromScreenName ¶
func (c *Connection) GetRecentNTweetsFromScreenName(screenName string, n int) (Tweets, error)
func (*Connection) GetRecentTweetsByQuery ¶
func (c *Connection) GetRecentTweetsByQuery(query string) (Tweets, error)
func (*Connection) GetScreenNameFromID ¶
func (c *Connection) GetScreenNameFromID(id int64) (string, error)
func (*Connection) GetSingleTweetFromID ¶
func (c *Connection) GetSingleTweetFromID(id int64) (Tweet, error)
func (*Connection) GetTopUsersFromQuery ¶
func (c *Connection) GetTopUsersFromQuery(query string) (Users, error)
func (*Connection) GetXTweetsByQuery ¶
func (*Connection) PublishCollageTweet ¶
func (c *Connection) PublishCollageTweet(filePaths []string, text string) (int64, error)
func (*Connection) PublishCollageTweetAsReply ¶
func (*Connection) PublishPictureTweet ¶
func (c *Connection) PublishPictureTweet(filepath string, text string) (int64, error)
func (*Connection) PublishPictureTweetAsReply ¶
func (*Connection) PublishTextTweet ¶
func (c *Connection) PublishTextTweet(text string) (int64, error)
func (*Connection) PublishTextTweetAsReply ¶
func (c *Connection) PublishTextTweetAsReply(text string, replyTweetID int64) (int64, error)
func (*Connection) PublishVideoTweet ¶
func (c *Connection) PublishVideoTweet(filepath string, text string) (int64, error)
func (*Connection) PublishVideoTweetAsReply ¶
func (*Connection) Reconnect ¶ added in v0.4.0
func (c *Connection) Reconnect()
func (*Connection) UploadImage ¶
func (c *Connection) UploadImage(filepath string) (int64, error)
func (*Connection) UploadVideo ¶
func (c *Connection) UploadVideo(filepath string) (int64, error)
type Credentials ¶
type Credentials struct { APIKey string `json:"APIKey" yaml:"APIKey"` APISecret string `json:"APISecret" yaml:"APISecret"` AccessToken string `json:"accessToken" yaml:"accessToken"` AccessSecret string `json:"accessSecret" yaml:"accessSecret"` BearerToken string `json:"bearerToken" yaml:"bearerToken"` }
func LoadCredentials ¶
func LoadCredentials(filepath string) (Credentials, error)
func LoadJSONCredentials ¶
func LoadJSONCredentials(filepath string) (Credentials, error)
func LoadYAMLCredentials ¶
func LoadYAMLCredentials(filepath string) (Credentials, error)
type RelationFunc ¶
type RelationFunc func(v url.Values) (c anaconda.UserCursor, err error)
type RelationInfo ¶
type RelationInfo struct { Func RelationFunc Type string }
type Tweet ¶
func (Tweet) ContainsGIF ¶
func (Tweet) ContainsOnlyText ¶
func (Tweet) ContainsPhoto ¶
func (Tweet) ContainsVideo ¶
func (Tweet) GetFullText ¶
func (Tweet) GetHashtags ¶
func (Tweet) GetMediaURLs ¶ added in v0.3.0
func (Tweet) GetTextURLs ¶
func (Tweet) GetUserMentions ¶
func (t Tweet) GetUserMentions() []SimpleUser
type TweetEntity ¶
type TweetEntity struct { Func EntityFunc Entity string }
type User ¶
func (User) GetBackgroundImageURL ¶
func (User) GetDescription ¶
func (User) GetFavoritesCount ¶
func (User) GetFollowersCount ¶
func (User) GetFollowingCount ¶
func (User) GetProfileImageURL ¶
func (User) GetScreenName ¶
func (User) GetStatusCount ¶
func (User) IsProtected ¶
func (User) IsVerified ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.