Go package for RAWG
- Go 98.4%
- Pkl 1.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
ci / check (push) Successful in 41s
Two more GameSingle fields where the spec claims a string and the API sends a number - the same drift parent_achievements_count showed, and both confirmed against clients built from live RAWG payloads. Fields are decoded in spec order, which is why each fix only moved the failure to the next one. The pinning test now covers all three. |
||
| .forgejo/workflows | ||
| api | ||
| internal/openapi | ||
| .golangci.toml | ||
| client.go | ||
| client_test.go | ||
| creator_roles.go | ||
| creators.go | ||
| developers.go | ||
| errors.go | ||
| games.go | ||
| games_test.go | ||
| genres.go | ||
| go.mod | ||
| go.sum | ||
| hk.pkl | ||
| LICENSE.md | ||
| mise.toml | ||
| oapi-codegen.tool.mod | ||
| oapi-codegen.tool.sum | ||
| platforms.go | ||
| publishers.go | ||
| README.md | ||
| stores.go | ||
| tags.go | ||
rawg-go
A Go client for the RAWG Video Games Database API.
Install
go get src.timharek.no/tim/rawg-go
Quick start
package main
import (
"context"
"fmt"
"log"
"src.timharek.no/tim/rawg-go"
)
func main() {
client := rawg.New("your-api-key")
games, err := client.Games.List(context.Background(), &rawg.GamesListParams{})
if err != nil {
log.Fatal(err)
}
for _, game := range *games.Results {
fmt.Println(*game.Name)
}
}
You can get an API key at rawg.io/apidocs.
Resources
- Games
- Genres
- Platforms
- Publishers
- Developers
- Stores
- Tags
- Creators
- Creator Roles
Each resource provides List and Read methods. The Games resource has
additional methods for additions, screenshots, achievements, and more.
Attribution
This project uses the RAWG Video Games Database API. All game data is provided by RAWG.