RawgNET 0.2.1

dotnet add package RawgNET --version 0.2.1                
NuGet\Install-Package RawgNET -Version 0.2.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RawgNET" Version="0.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RawgNET --version 0.2.1                
#r "nuget: RawgNET, 0.2.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RawgNET as a Cake Addin
#addin nuget:?package=RawgNET&version=0.2.1

// Install RawgNET as a Cake Tool
#tool nuget:?package=RawgNET&version=0.2.1                

RawgNET

A wrapper for the API of rawg.io, to get a game or creator including all their data.

Technologies

Created using

  • .NET Core 6.0

NuGet/Dependencies used

  • Newtonsoft.Json

Projects/People (I know of) using it:

Features

Nuget

General

  • Through methods, like GetGame() and IsGameExisting(), you can check if a game exists or get the data of it.
  • Through methods, like GetCreators(), GetCreator(), and IsCreatorExisting(), you can check if a creator exists or get the data of them.

Usage

Example (see the "RawgNetDemo" project)

RawgClient client = new(new ClientOptions("YOUR KEY FROM https://rawg.io/apidocs"));
const string query = "overwatch";

if (await client.IsGameExisting(query))
{
    Console.WriteLine($"Querying the input '{query}'");

    // Fetch detailed information about the game
    Game game = await client.GetGame(query, true, true);

    Console.WriteLine($"Game Name: {game.NameOriginal}");
    Console.WriteLine($"Rating: {game.Rating}");
    Console.WriteLine($"Background Image: {game.BackgroundImage}");
    Console.WriteLine($"Metacritic Score: {game.Metacritic}");
    Console.WriteLine($"Release Date: {game.Released}");
    Console.WriteLine($"Platforms: {string.Join(", ", game.Platforms.Select(p => p.Platform.Name))}");

    if (game.AreScreenshotsAvailable)
    {
        Console.WriteLine($"First Screenshot: {game.Screenshots.First().Image}");
    }

    if (game.AreAchievementsAvailable)
    {
        Console.WriteLine($"First Achievement: {game.Achievements.First().Name}");
    }
}
else
{
    Console.WriteLine("Game does not exist!");
}

FAQ

Where do I get an API-Key?

At https://rawg.io/apidocs, just press the "Get API Key" button.

What do I have to be aware of?

Rawg.io has terms of use, please read them and be sure to comply to them - https://api.rawg.io/docs/

License

Software: RawgNET

License: GNU General Public License v3.0

Licensor: Kim Mario Liebl

GNU

Roadmap

  • Get everything from the API inside RawgNet (WIP)
  • Clean up and reduce code
  • More to come…
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.1 145 4/17/2024
0.2.0 190 8/28/2023
0.1.0 139 6/1/2023
0.0.9 303 1/3/2023
0.0.8 277 1/2/2023
0.0.7 302 12/26/2022
0.0.6 407 8/19/2022
0.0.5 393 8/18/2022
0.0.4 380 8/18/2022

Added a new method to get all stores which sell games and the games on the storefront