Add models for vods.speedrun.club API.
parent
5860325923
commit
589209864d
|
@ -0,0 +1,5 @@
|
||||||
|
package vodsspeedrunclub
|
||||||
|
|
||||||
|
// https://vods.speedrun.club/api/v1/gdq/runs?event=agdq2023
|
||||||
|
// https://vods.speedrun.club/api/v1/gdq/events
|
||||||
|
const baseURL = "https://vods.speedrun.club"
|
|
@ -0,0 +1,30 @@
|
||||||
|
package vodsspeedrunclub
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type Event struct {
|
||||||
|
ID int `json:"id"`
|
||||||
|
Short string `json:"short"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Hashtag string `json:"hashtag"`
|
||||||
|
CharityName string `json:"charityName"`
|
||||||
|
TargetAmount float64 `json:"targetAmount"`
|
||||||
|
MinimumDonation float64 `json:"minimumDonation"`
|
||||||
|
PaypalCurrency string `json:"paypalCurrency"`
|
||||||
|
StartTime time.Time `json:"startTime"`
|
||||||
|
EndTime any `json:"endTime"`
|
||||||
|
TimeStatus string `json:"timeStatus"`
|
||||||
|
Timezone string `json:"timezone"`
|
||||||
|
Locked bool `json:"locked"`
|
||||||
|
AllowDonations bool `json:"allowDonations"`
|
||||||
|
CanonicalURL string `json:"canonicalUrl"`
|
||||||
|
Public string `json:"public"`
|
||||||
|
Amount float64 `json:"amount"`
|
||||||
|
Count int `json:"count"`
|
||||||
|
Max float64 `json:"max"`
|
||||||
|
Avg float64 `json:"avg"`
|
||||||
|
HoraroEvent any `json:"horaroEvent"`
|
||||||
|
HoraroSchedule any `json:"horaroSchedule"`
|
||||||
|
DonationURL string `json:"donationUrl"`
|
||||||
|
ScheduleURL string `json:"scheduleUrl"`
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
package vodsspeedrunclub
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type Run struct {
|
||||||
|
GamesDoneQuickID int `json:"gdqId"`
|
||||||
|
HoraroID any `json:"horaroId"`
|
||||||
|
Event int `json:"event"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
DisplayName string `json:"displayName"`
|
||||||
|
TwitchName string `json:"twitchName"`
|
||||||
|
Console string `json:"console"`
|
||||||
|
Commentators []any `json:"commentators"`
|
||||||
|
Hosts []Hosts `json:"hosts"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
StartTime time.Time `json:"startTime"`
|
||||||
|
EndTime time.Time `json:"endTime"`
|
||||||
|
Order int `json:"order"`
|
||||||
|
RunTime string `json:"runTime"`
|
||||||
|
SetupTime string `json:"setupTime"`
|
||||||
|
CoOp bool `json:"coop"`
|
||||||
|
Category string `json:"category"`
|
||||||
|
ReleaseYear any `json:"releaseYear"`
|
||||||
|
Runners []Runner `json:"runners"`
|
||||||
|
RunnersAsString string `json:"runnersAsString"`
|
||||||
|
Bids []any `json:"bids"`
|
||||||
|
VODs []VOD `json:"vods"`
|
||||||
|
Source any `json:"src"`
|
||||||
|
TimeStatus string `json:"timeStatus"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Hosts struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Pronouns string `json:"pronouns"`
|
||||||
|
Public string `json:"public"`
|
||||||
|
}
|
||||||
|
type Runner struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Stream string `json:"stream"`
|
||||||
|
Twitter string `json:"twitter"`
|
||||||
|
Youtube string `json:"youtube"`
|
||||||
|
Pronouns string `json:"pronouns"`
|
||||||
|
Public string `json:"public"`
|
||||||
|
URL string `json:"url"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type VOD struct {
|
||||||
|
Type string `json:"type"`
|
||||||
|
VideoID string `json:"videoId"`
|
||||||
|
Timestamp string `json:"timestamp"`
|
||||||
|
URL string `json:"url"`
|
||||||
|
ContributorID any `json:"contributorId"`
|
||||||
|
}
|
Loading…
Reference in New Issue