A wrapper for the API of rawg.io, to get a game or creator including all their data.
- .NET Core 6.0
- Newtonsoft.Json
- Through methods, like
GetGame()andIsGameExisting(), you can check if a game exists or get the data of it. - Through methods, like
GetCreators(),GetCreator(), andIsCreatorExisting(), you can check if a creator exists or get the data of them.
RawgClientclient=new(newClientOptions("YOUR KEY FROM https://rawg.io/apidocs"));conststringquery="overwatch";if(awaitclient.IsGameExisting(query)){Console.WriteLine($"Querying the input '{query}'");// Fetch detailed information about the gameGamegame=awaitclient.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!");}At https://rawg.io/apidocs, just press the "Get API Key" button.
Rawg.io has terms of use, please read them and be sure to comply to them - https://api.rawg.io/docs/
Software: RawgNET
License: GNU General Public License v3.0
Licensor: Kim Mario Liebl
- Get everything from the API inside RawgNet (WIP)
- Clean up and reduce code
- More to come…
