This commit is contained in:
2025-10-28 22:07:44 +11:00
parent 4b6f488f59
commit b99d06a2de
78 changed files with 315 additions and 283 deletions

View File

@@ -1,6 +1,7 @@
package endpoint
import (
"context"
"fmt"
pb "github.com/bestnite/go-igdb/proto"
@@ -23,8 +24,8 @@ func NewEventLogos(request RequestFunc) *EventLogos {
return a
}
func (a *EventLogos) Query(query string) ([]*pb.EventLogo, error) {
resp, err := a.request("POST", fmt.Sprintf("https://api.igdb.com/v4/%s.pb", a.endpointName), query)
func (a *EventLogos) Query(ctx context.Context, query string) ([]*pb.EventLogo, error) {
resp, err := a.request(ctx, "POST", fmt.Sprintf("https://api.igdb.com/v4/%s.pb", a.endpointName), query)
if err != nil {
return nil, fmt.Errorf("failed to request: %w", err)
}