Go package for RAWG
  • Go 98.4%
  • Pkl 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tim Hårek Andreassen aacff002ed
All checks were successful
ci / check (push) Successful in 41s
fix(games): Accept numbers for twitch_count and youtube_count
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.
2026-09-30 23:10:09 +02:00
.forgejo/workflows build: Manage the toolchain with mise and hk 2026-09-16 10:00:18 +02:00
api Initial commit 2026-03-12 21:53:28 +01:00
internal/openapi fix(games): Accept numbers for twitch_count and youtube_count 2026-09-30 23:10:09 +02:00
.golangci.toml Initial commit 2026-03-12 21:53:28 +01:00
client.go feat(games): Return the fields /games/{id} actually sends 2026-09-16 10:25:04 +02:00
client_test.go build: Manage the toolchain with mise and hk 2026-09-16 10:00:18 +02:00
creator_roles.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
creators.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
developers.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
errors.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
games.go games: name the release date type 2026-09-16 11:44:58 +02:00
games_test.go fix(games): Accept numbers for twitch_count and youtube_count 2026-09-30 23:10:09 +02:00
genres.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
go.mod build: Move module path to src.timharek.no/tim/rawg-go 2026-09-09 21:51:44 +02:00
go.sum Initial commit 2026-03-12 21:53:28 +01:00
hk.pkl build: Manage the toolchain with mise and hk 2026-09-16 10:00:18 +02:00
LICENSE.md Initial commit 2026-03-12 21:53:28 +01:00
mise.toml build: Manage the toolchain with mise and hk 2026-09-16 10:00:18 +02:00
oapi-codegen.tool.mod build: Manage the toolchain with mise and hk 2026-09-16 10:00:18 +02:00
oapi-codegen.tool.sum build: Manage the toolchain with mise and hk 2026-09-16 10:00:18 +02:00
platforms.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
publishers.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
README.md build: Move module path to src.timharek.no/tim/rawg-go 2026-09-09 21:51:44 +02:00
stores.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00
tags.go Return ErrNotFound for a 404 2026-09-16 11:36:49 +02:00

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.