Skip to content

Releases: liebki/RawgNET

Get All Stores which sell games

17 Apr 07:49
Compare
Choose a tag to compare

This version adds a method to get all Games which sell games with the games on the storefront, example code:

RawgClient client = new(new ClientOptions("YOUR KEY FROM https://rawg.io/apidocs"));
Store[] stores = await client.GetAllGameStores();

foreach (Store store in stores)
{
    Console.WriteLine($"\n{store}");

    foreach(StoreGame sg in store.GameList)
    {
        Console.WriteLine($"- {sg}");
    }
}

which gives us something like this:
Stores-Example

Thats it!

Code reduction, collection change etc.

28 Aug 19:38
Compare
Choose a tag to compare

Nothing serious has changed, only internal

  • Renaming of methods, variables etc. (No RawgClient methods tho)
  • Reduced code
  • Changed all relevant collections, from List to IEnumerable
  • Added more example code to the Demo-project
  • Added more/better comments on the methods

V0.1 - Requirements are parsed now

01 Jun 13:06
Compare
Choose a tag to compare

Get the individual components of Minimum and Recommended requirements for PC's:

Implemented #12 : Enhanced the Requirements, so RecommendedParsed() and MinimumParsed() can be called,
to get a Dictionary<string, string> in order to get single components like CPU, GPU etc. if available.

In order to use this, access the MinimumParsed() and RecommendedParsed() methods in the Requirements-class, they try to parse the components and put them inside a Dictionary<string, string>, inside this Dictionary the TKey equals OS, CPU, RAM, GPU and STORAGE.

You have to filter the platforms, because only a computer (PC) has this many individual components and this certain structure, every other platform doesn't work but shouldn't throw an exception:

Requirements GamePcRequirements = game.Platforms.First(platform => platform.Platform.Name.Equals("PC", StringComparison.InvariantCultureIgnoreCase)).Requirements;

Example:

Game game = .....

Requirements GamePcRequirements = game.Platforms.First(platform => platform.Platform.Name.Equals("PC", StringComparison.InvariantCultureIgnoreCase)).Requirements;

Console.WriteLine("Minimum:");
foreach (KeyValuePair<string, string> m in GamePcRequirements.MinimumParsed())
{
    Console.WriteLine($"{m.Key} = {m.Value}");
}

Console.WriteLine();

Console.WriteLine("Recommended:");
foreach (KeyValuePair<string, string> r in GamePcRequirements.RecommendedParsed())
{
    Console.WriteLine($"{r.Key} = {r.Value}");
}

Outputs this:

Minimum:
OS = Windows 10
CPU = INTEL CORE I5-8400 or AMD RYZEN 3 3300X
RAM = 12 GB RAM
GPU = NVIDIA GEFORCE GTX 1060 3 GB or AMD RADEON RX 580 4 GB
STORAGE = 60 GB

Recommended:
OS = Windows 10/11
CPU = INTEL CORE I7-8700K or AMD RYZEN 5 3600X
RAM = 16 GB RAM
GPU = NVIDIA GEFORCE GTX 1070 8 GB or AMD RADEON RX VEGA 56 8 GB
STORAGE = 60 GB

V0.0.9 - Little bug is gone

03 Jan 21:22
Compare
Choose a tag to compare

There was a possibility that the use of the RawgRequestGameExists method, could give back "false" as a result when the game actually did exist.
This problem is gone now, it should work just fine, and that's basically it.

Please be aware of the releases V0.0.7 and V0.0.8 because of the structural changes.

Thanks.

V0.0.8 - Removed Disposable

02 Jan 20:15
7d3b23a
Compare
Choose a tag to compare

Servus, today mostly only internal changes nothing really new or breaking, except:

  • RawgClient can't longer be used with using (example down below)
  • QueryType moved to Models
  • More comments
  • Renamed the APIKEY field to Key in ClientOptions

That's basically all for the Commit

Edited example (from last release) down below (old then new):

Getting a creator (old, with disposable):

using (RawgClient client = new(new ClientOptions("YOUR KEY FROM https://rawg.io/login?forward=developer")))
{
	string creatorid = "123";
	Creator cr = await client.GetCreator(creatorid);

	Console.WriteLine(cr.ToString());
}

Getting a creator (new, without disposable):

RawgClient client = new(new ClientOptions("YOUR KEY FROM https://rawg.io/login?forward=developer"));
string creatorid = "123";

Creator cr = await client.GetCreator(creatorid);
Console.WriteLine(cr.ToString());

Bye.

V0.0.7 - Creators

26 Dec 15:15
7db814d
Compare
Choose a tag to compare

Hi, now you can use RawgNet, to get creators, the next step for RawgNet of many to come.
Furthermore, now all methods are async, you decide if you use them that way tho.

Examples down below:

Getting a list with 99 creators, (of all known 26385) - I don't recommend getting all, because it takes very long

using (RawgClient client = new(new ClientOptions("YOUR KEY FROM https://rawg.io/login?forward=developer")))
{
	int count = 99;
	List<Creator> creators = await client.GetCreators(count);
	
	for (int i = 0; i < count; i++)
	{
		Console.WriteLine(creators[i].Name);
	}
}

Getting a creator

using (RawgClient client = new(new ClientOptions("YOUR KEY FROM https://rawg.io/login?forward=developer")))
{
	string creatorid = "2612";
	Creator cr = await client.GetCreator(creatorid);

	Console.WriteLine(cr.ToString());
}

Getting a bool, if a creator exists with the wanted creatorid

using (RawgClient client = new(new ClientOptions("YOUR KEY FROM https://rawg.io/login?forward=developer")))
{
	string creatorid = "26386";
	bool Exist = await client.IsCreatorExisting(creatorid);

	if(Exist)
	{
		Creator cr = await client.GetCreator(creatorid);
		Console.WriteLine(cr.Name);
	}
}

But there is a bool, that should indicate without needing IsCreatorExisting in the creator object, when using GetCreator, you can look for the bool "IsCreatorExisting".

V0.0.6

19 Aug 20:28
Compare
Choose a tag to compare

For 0.0.6 I reduced the duplicate code a bit, thats why I created #9 as a goal.
I noticed so much duplicate code, that could be spared and I want it gone throughout the next releases.
Nuget for 0.0.6 is up under: https://www.nuget.org/packages/RawgNET

Should be working fine, just open an issue for anything.

V0.0.5 - Nuget!

18 Aug 18:56
Compare
Choose a tag to compare

So #8 is closed now, screenshots are output as screenshots now and not achievements.
Nuget for 0.0.5 is up under: https://www.nuget.org/packages/RawgNET

Should be working fine, just open an issue for anything.

V0.0.3

17 Aug 15:16
Compare
Choose a tag to compare

Nothing special, just the .dll to use it right away.

  • It could be that you need the Newtonsoft.Json-Nuget, to use this (I still don't know no..)

If the nuget is not needed, tell me in an issue 👍🏼

V0.0.2

12 Aug 16:38
Compare
Choose a tag to compare

Nothing special, just the .dll to use it right away.

  • It could be that you need the Newtonsoft.Json-Nuget, to use this (I don't know right now..)