Documentation
¶
Index ¶
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request) (*http.Response, error)
- func (c *Client) Games(ctx context.Context, criteria string) ([]Game, error)
- func (c *Client) Genres(ctx context.Context, ids []int) ([]Genre, error)
- func (c *Client) Platforms(ctx context.Context, ids []int) ([]Platform, error)
- type Config
- type Game
- type Genre
- type Platform
- type TwitchClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client communicates with the igdb api.
func (*Client) Do ¶
Do executes c.doFunc(), which in turn allows wrapping c.client.Do() and manipulating the request behavior of the api client.
type Config ¶
type Config struct { BaseURL string Logger *slog.Logger TwitchClient TwitchClient }
Config contains igdb client configurations.
type Game ¶
type Game struct { ID int `json:"id"` FirstReleaseDate int64 `json:"first_release_date"` Genres []int `json:"genres"` Name string `json:"name"` Platforms []int `json:"platforms"` Slug string `json:"slug"` Summary string `json:"summary"` }
Game represents a IGDB game.
func ParseGamesResponse ¶
ParseGamesResponse parses the given data and returns a list of games.
type Genre ¶
Genre represents a IGDB game genre.
func ParseGenresResponse ¶
ParseGenresResponse parses the given data and returns a list of genres.
type Platform ¶
Platform represents a IGDB game platform.
func ParsePlatformsResponse ¶
ParsePlatformsResponse parses the given data and returns a list of platforms.
Click to show internal directories.
Click to hide internal directories.