Documentation
¶
Index ¶
Constants ¶
View Source
const (
ApiBaseUri = "https://archive.ragtag.moe"
)
Variables ¶
View Source
var ( None = SortBy{""} ArchivedTimestamp = SortBy{"archived_timestamp"} UploadDate = SortBy{"upload_date"} Duration = SortBy{"duration"} ViewCount = SortBy{"view_count"} LikeCount = SortBy{"like_count"} DislikeCount = SortBy{"dislike_count"} )
View Source
var ( Ascending = SortOrder{"asc"} Descending = SortOrder{"desc"} )
Functions ¶
func ApiChannels ¶
Types ¶
type ResultHits ¶
type ResultShards ¶
type SearchQuery ¶
type SearchResult ¶
type SearchResult struct {
Took int `json:"took"`
TimedOut bool `json:"timed_out"`
Shards ResultShards `json:"_shards"`
Hits ResultHits `json:"hits"`
}
func ApiChannel ¶
func ApiChannel(channel string) (*SearchResult, error)
func ApiSearch ¶
func ApiSearch(q SearchQuery) (*SearchResult, error)
type VideoData ¶
type VideoData struct {
Index string `json:"_index"`
Id string `json:"_id"`
Score float64 `json:"_score"`
Source VideoSource `json:"_source"`
}
type VideoFiles ¶
type VideoSource ¶
type VideoSource struct {
ChannelName string `json:"channel_name"`
DriveBase string `json:"drive_base"`
LikeCount int `json:"like_count"`
Timestamps VideoTimestamps `json:"timestamps"`
Fps int `json:"fps"`
Description string `json:"description"`
Title string `json:"title"`
Duration int `json:"duration"`
ArchivedTimestamp string `json:"archived_timestamp"`
Width int `json:"width"`
FormatId string `json:"format_id"`
Files []VideoFiles `json:"files"`
ChannelId string `json:"channel_id"`
ViewCount int `json:"view_count"`
DislikeCount int `json:"dislike_count"`
VideoId string `json:"video_id"`
UploadDate string `json:"upload_date"`
Height int `json:"height"`
}
Click to show internal directories.
Click to hide internal directories.