This commit is contained in:
2025-04-06 03:24:50 +10:00
parent f88ba544c2
commit a8e650e4d7
75 changed files with 1250 additions and 533 deletions

View File

@@ -4,11 +4,25 @@ import (
"fmt"
pb "github.com/bestnite/go-igdb/proto"
"github.com/go-resty/resty/v2"
"google.golang.org/protobuf/proto"
)
type GameTimeToBeats struct{ BaseEndpoint }
type GameTimeToBeats struct {
BaseEndpoint[pb.GameTimeToBeat]
}
func NewGameTimeToBeats(request func(URL string, dataBody any) (*resty.Response, error)) *GameTimeToBeats {
a := &GameTimeToBeats{
BaseEndpoint[pb.GameTimeToBeat]{
endpointName: EPGameTimeToBeats,
request: request,
},
}
a.queryFunc = a.Query
return a
}
func (a *GameTimeToBeats) Query(query string) ([]*pb.GameTimeToBeat, error) {
resp, err := a.request("https://api.igdb.com/v4/game_time_to_beats.pb", query)