This is unofficial RAWG SDK GO. This library contains methods for interacting with RAWG API.
go get github.com/dimuska139/rawg-sdk-go
package main
import (
"fmt"
"net/http"
"strings"
"github.com/dimuska139/rawg-sdk-go"
)
func main() {
config := rawg.Config{
AppName: "YourAppName", // 'YourAppName' will be set as User-Agent header
Language: "ru",
Rps: 5,
}
client := rawg.NewClient(http.DefaultClient, &config)
filter := rawg.NewGamesFilter().
SetSearch("Gta5").
SetPage(1).
SetPageSize(10).
ExcludeCollection(1).
WithoutParents()
data, total, err := client.GetGames(filter)
...
}
The tests should be considered a part of the documentation. Also you can read official docs.
Only 5 requests per second allowed from one IP. The "Rps" parameter in configuration performs this limitation. So you don't worry about it.
RAWG SDK GO is released under the MIT License.