rawg-sdk-go
Go library for the [RAWG Video Games Database](https://rawg.io/) API
About rawg-sdk-go
RAWG Video Games Database Golang client
This is unofficial RAWG SDK GO. This library contains methods for interacting with RAWG API.
Installation
go get github.com/dimuska139/rawg-sdk-go
Usage
package main
import (
"context"
"fmt"
"net/http"
"strings"
"time"
"github.com/dimuska139/rawg-sdk-go/v3"
)
func main() {
config := rawg.Config{
ApiKey: "yourapikey", // Your personal API key (see https://rawg.io/apidocs)
Language: "ru",
Rps: 5,
}
client := rawg.NewClient(http.DefaultClient, &config)
filter := rawg.NewGamesFilter().
SetSearch("Gta5").
SetPage(1).
SetPageSize(10).
ExcludeCollection(1).
WithoutParents()
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(time.Millisecond*500))
defer cancel()
data, total, err := client.GetGames(ctx, filter)
...
}
The tests should be considered a part of the documentation. Also you can read official docs.
API limitations
Only 5 requests per second allowed from one IP. The "Rps" parameter in configuration performs this limitation. So you don't worry about it.
License
RAWG SDK GO is released under the MIT License.
Frequently Asked Questions
What is rawg-sdk-go?
rawg-sdk-go is a Third-party APIs library for the Go programming language. Go library for the [RAWG Video Games Database](https://rawg.io/) API
How do I install rawg-sdk-go?
Install rawg-sdk-go with the Go module system using `go get dimuska139/rawg-sdk-go`. Check the repository for the current installation instructions.
What category does rawg-sdk-go belong to?
rawg-sdk-go is listed under Third-party APIs, specifically Third-party APIs.