Documentation
¶
Index ¶
Constants ¶
View Source
const (
MaxNoteLength = 500
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BirdwatchPivot ¶
type BirdwatchPivot struct {
DestinationUrl string `json:"destinationUrl"`
Text string `json:"text"`
Entities []struct {
FromIndex int `json:"fromIndex"`
ToIndex int `json:"toIndex"`
Ref struct {
Type string `json:"type"`
Url string `json:"url"`
UrlType string `json:"urlType"`
} `json:"ref"`
} `json:"entities"`
} `json:"footer"`
Note struct {
RestId string `json:"rest_id"`
} `json:"note"`
Subtitle struct {
Text string `json:"text"`
Entities []struct {
FromIndex int `json:"fromIndex"`
ToIndex int `json:"toIndex"`
Ref struct {
Type string `json:"type"`
Url string `json:"url"`
UrlType string `json:"urlType"`
} `json:"ref"`
} `json:"entities"`
} `json:"subtitle"`
Title string `json:"title"`
IconType string `json:"iconType"`
}
type Card ¶
type Card struct {
RestId string `json:"rest_id"`
Legacy struct {
BindingValues []struct {
Key string `json:"key"`
Value struct {
StringValue string `json:"string_value,omitempty"`
Type string `json:"type"`
BooleanValue bool `json:"boolean_value,omitempty"`
ScribeKey string `json:"scribe_key,omitempty"`
} `json:"value"`
} `json:"binding_values"`
CardPlatform struct {
Platform struct {
Audience struct {
Name string `json:"name"`
} `json:"audience"`
Device struct {
Name string `json:"name"`
Version string `json:"version"`
} `json:"device"`
} `json:"platform"`
} `json:"card_platform"`
Name string `json:"name"`
Url string `json:"url"`
UserRefsResults []any `json:"user_refs_results"`
} `json:"legacy"`
}
type Legacy ¶
type Legacy struct {
BookmarkCount int `json:"bookmark_count"`
CreatedAt string `json:"created_at"`
ConversationIdStr string `json:"conversation_id_str"`
DisplayTextRange []int `json:"display_text_range"`
Entities struct {
Media []struct {
DisplayUrl string `json:"display_url"`
ExpandedUrl string `json:"expanded_url"`
IdStr string `json:"id_str"`
Indices []int `json:"indices"`
MediaUrlHttps string `json:"media_url_https"`
Type string `json:"type"`
Url string `json:"url"`
Sizes struct {
Large struct {
H int `json:"h"`
W int `json:"w"`
Resize string `json:"resize"`
} `json:"large"`
Medium struct {
H int `json:"h"`
W int `json:"w"`
Resize string `json:"resize"`
} `json:"medium"`
Small struct {
H int `json:"h"`
W int `json:"w"`
Resize string `json:"resize"`
} `json:"small"`
Thumb struct {
H int `json:"h"`
W int `json:"w"`
Resize string `json:"resize"`
} `json:"thumb"`
} `json:"sizes"`
OriginalInfo struct {
Height int `json:"height"`
Width int `json:"width"`
FocusRects []struct {
X int `json:"x"`
Y int `json:"y"`
W int `json:"w"`
H int `json:"h"`
} `json:"focus_rects"`
} `json:"original_info"`
} `json:"media"`
UserMentions []any `json:"user_mentions"`
Urls []Url `json:"urls"`
} `json:"entities"`
ExtendedEntities struct {
Media []Medium `json:"media"`
} `json:"extended_entities"`
FavoriteCount int `json:"favorite_count"`
Favorited bool `json:"favorited"`
FullText string `json:"full_text"`
IsQuoteStatus bool `json:"is_quote_status"`
Lang string `json:"lang"`
PossiblySensitive bool `json:"possibly_sensitive"`
PossiblySensitiveEditable bool `json:"possibly_sensitive_editable"`
QuoteCount int `json:"quote_count"`
ReplyCount int `json:"reply_count"`
RetweetCount int `json:"retweet_count"`
Retweeted bool `json:"retweeted"`
UserIdStr string `json:"user_id_str"`
IdStr string `json:"id_str"`
}
type Medium ¶
type Medium struct {
DisplayUrl string `json:"display_url"`
ExpandedUrl string `json:"expanded_url"`
IdStr string `json:"id_str"`
Indices []int `json:"indices"`
MediaKey string `json:"media_key"`
MediaUrlHttps string `json:"media_url_https"`
Type string `json:"type"`
Url string `json:"url"`
ExtMediaAvailability struct {
Status string `json:"status"`
} `json:"ext_media_availability"`
MediaStats struct {
ViewCount int `json:"viewCount"`
} `json:"mediaStats"`
VideoInfo struct {
Variants []struct {
Url string `json:"url"`
Bitrate int `json:"bitrate"`
} `json:"variants"`
} `json:"video_info"`
}
func (*Medium) InputFile ¶
func (m *Medium) InputFile() gotgbot.InputFileOrString
type NoteTweet ¶
type NoteTweet struct {
IsExpandable bool `json:"is_expandable"`
NoteTweetResults struct {
Result struct {
Id string `json:"id"`
Text string `json:"text"`
EntitySet struct {
UserMentions []any `json:"user_mentions"`
Urls []struct {
DisplayUrl string `json:"display_url"`
ExpandedUrl string `json:"expanded_url"`
Url string `json:"url"`
Indices []int `json:"indices"`
} `json:"urls"`
Hashtags []any `json:"hashtags"`
Symbols []any `json:"symbols"`
} `json:"entity_set"`
} `json:"result"`
} `json:"note_tweet_results"`
}
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Commands ¶
func (p *Plugin) Commands() []gotgbot.BotCommand
type TokenResponse ¶
type TokenResponse struct {
GuestToken string `json:"guest_token"`
}
type Tweet ¶
type Tweet struct {
RestId string `json:"rest_id"`
BirdwatchPivot BirdwatchPivot `json:"birdwatch_pivot"`
Core struct {
UserResults UserResult `json:"user_results"`
} `json:"core"`
NoteTweet NoteTweet `json:"note_tweet"`
Source string `json:"source"`
Legacy Legacy `json:"legacy"`
Card Card `json:"card"`
}
type TweetInfo ¶
type TweetInfo struct {
RestId string `json:"rest_id"`
BirdwatchPivot BirdwatchPivot `json:"birdwatch_pivot"`
Core struct {
UserResults UserResult `json:"user_results"`
} `json:"core"`
UnmentionInfo struct {
} `json:"unmention_info"`
Source string `json:"source"`
NoteTweet NoteTweet `json:"note_tweet"`
Legacy Legacy `json:"legacy"`
QuotedStatusResult struct {
Result struct {
Tweet
Reason string `json:"reason"`
Typename string `json:"__typename"`
TweetSub Tweet `json:"tweet"`
} `json:"result"`
} `json:"quoted_status_result"`
}
type TweetResponse ¶
type TweetResponse struct {
Data struct {
TweetResult struct {
Result Result `json:"result"`
} `json:"tweetResult"`
} `json:"data"`
}
type UserResult ¶
type UserResult struct {
Result struct {
Typename string `json:"__typename"`
Id string `json:"id"`
RestId string `json:"rest_id"`
AffiliatesHighlightedLabel struct {
} `json:"affiliates_highlighted_label"`
Avatar struct {
ImageUrl string `json:"image_url"`
} `json:"avatar"`
Core struct {
CreatedAt string `json:"created_at"`
Name string `json:"name"`
ScreenName string `json:"screen_name"`
} `json:"core"`
HasNftAvatar bool `json:"has_nft_avatar"`
IsBlueVerified bool `json:"is_blue_verified"`
Legacy struct {
DefaultProfile bool `json:"default_profile"`
DefaultProfileImage bool `json:"default_profile_image"`
Description string `json:"description"`
Entities struct {
Description struct {
Urls []struct {
DisplayUrl string `json:"display_url"`
ExpandedUrl string `json:"expanded_url"`
Url string `json:"url"`
Indices []int `json:"indices"`
} `json:"urls"`
} `json:"description"`
Url struct {
Urls []struct {
DisplayUrl string `json:"display_url"`
ExpandedUrl string `json:"expanded_url"`
Url string `json:"url"`
Indices []int `json:"indices"`
} `json:"urls"`
} `json:"url"`
} `json:"entities"`
FastFollowersCount int `json:"fast_followers_count"`
FavouritesCount int `json:"favourites_count"`
FollowersCount int `json:"followers_count"`
FriendsCount int `json:"friends_count"`
HasCustomTimelines bool `json:"has_custom_timelines"`
IsTranslator bool `json:"is_translator"`
ListedCount int `json:"listed_count"`
MediaCount int `json:"media_count"`
NormalFollowersCount int `json:"normal_followers_count"`
PinnedTweetIdsStr []string `json:"pinned_tweet_ids_str"`
PossiblySensitive bool `json:"possibly_sensitive"`
ProfileBannerUrl string `json:"profile_banner_url"`
ProfileInterstitialType string `json:"profile_interstitial_type"`
Protected bool `json:"protected"`
StatusesCount int `json:"statuses_count"`
TranslatorType string `json:"translator_type"`
Url string `json:"url"`
VerifiedType string `json:"verified_type"`
WithheldInCountries []any `json:"withheld_in_countries"`
} `json:"legacy"`
Location struct {
Location string `json:"location"`
} `json:"location"`
Verification struct {
Verified bool `json:"verified"`
} `json:"verification"`
} `json:"result"`
}
func (*UserResult) Author ¶
func (u *UserResult) Author() string
Click to show internal directories.
Click to hide internal directories.