Documentation
¶
Index ¶
- Variables
- func Init()
- type Author
- type FxTwitterApiResp
- type Media
- type MediaItem
- type Tweet
- type Twitter
- func (t *Twitter) FetchNewArtworks(ctx context.Context, limit int) ([]*dto.FetchedArtwork, error)
- func (t *Twitter) GetArtworkInfo(ctx context.Context, sourceURL string) (*dto.FetchedArtwork, error)
- func (t *Twitter) MatchesSourceURL(text string) (string, bool)
- func (t *Twitter) PrettyFileName(artwork shared.ArtworkLike, picture shared.PictureLike) string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type FxTwitterApiResp ¶
type FxTwitterApiResp struct {
Tweet *Tweet `json:"tweet"`
Message string `json:"message"`
Code int `json:"code"`
}
func (*FxTwitterApiResp) ToArtwork ¶
func (resp *FxTwitterApiResp) ToArtwork() (*dto.FetchedArtwork, error)
type MediaItem ¶
type MediaItem struct {
Type string `json:"type"`
URL string `json:"url"` // Direct link to the media
Format string `json:"format,omitempty"` // video's mime type or format, e.g. "video/mp4", "gif"
ThumbnailUrl string `json:"thumbnail_url,omitempty"` // for videos poster image
Width int `json:"width"`
Height int `json:"height"`
Duration float64 `json:"duration,omitempty"` // in seconds, for videos only
}
type Twitter ¶
type Twitter struct {
// contains filtered or unexported fields
}
func (*Twitter) FetchNewArtworks ¶
func (*Twitter) GetArtworkInfo ¶
func (*Twitter) PrettyFileName ¶
func (t *Twitter) PrettyFileName(artwork shared.ArtworkLike, picture shared.PictureLike) string
PrettyFileName implements source.ArtworkSource.
Click to show internal directories.
Click to hide internal directories.