https://github.com/liebki/rawgnet
Simple .NET wrapper to get all games and more things using rawg.io's API!
https://github.com/liebki/rawgnet
csharp-library dotnetcore rawg-api rawg-database-api rawgapi wrapper
Last synced: about 1 year ago
JSON representation
Simple .NET wrapper to get all games and more things using rawg.io's API!
- Host: GitHub
- URL: https://github.com/liebki/rawgnet
- Owner: liebki
- License: gpl-3.0
- Created: 2022-03-04T16:51:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T14:13:58.000Z (about 2 years ago)
- Last Synced: 2025-03-24T03:15:46.609Z (about 1 year ago)
- Topics: csharp-library, dotnetcore, rawg-api, rawg-database-api, rawgapi, wrapper
- Language: C#
- Homepage: https://www.nuget.org/packages/RawgNET
- Size: 109 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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:
- [GitHub Repository](https://github.com/sgamesdev)
## Features
### Nuget
- [NuGet Package](https://www.nuget.org/packages/RawgNET)
### 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)
```csharp
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](https://choosealicense.com/licenses/gpl-3.0/)
## Roadmap
- Get everything from the API inside RawgNet (WIP)
- Clean up and reduce code
- More to come…