discord-bot/Clients/CompatApiClient
13xforever 92751ba6e9 use file-scoped namespaces to reduce nesting
some formatting might be fucked
2022-06-30 00:59:46 +05:00
..
Compression use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00
Formatters use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00
POCOs use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00
Utils use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00
ApiConfig.cs use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00
Client.cs use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00
CompatApiClient.csproj clean up and update 3rd party deps 2022-06-20 16:12:56 +05:00
readme.md some docs 2019-04-01 22:52:27 +05:00
RequestBuilder.cs use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00

Compatibility API Client

There is no documentation, but the source code is available.

This project also contains all of the Web API infrastructure to facilitate the automatic serialization/deserialization of data.

Some terminology:

  • POCO - plain old C# object, is a barebones class with fields/properties only, that is used for automatic [de]serialization.

General advise on web client implementation and usage:

  • Do use HttpClientFactory.Create() instead of new HttpClient(), as every instance will reserve an outgoing port number, and factory keeps a pool.
  • Do reuse the same client instance whenever possible, it's thread-safe and there's no reason not to keep a single copy of it.

Compression contains handler implementation that provides support for transparent http request compression (Content-Encoding header), and implements standard gzip/deflate types.

Formatters contain JSON contract resolver that handles popular naming conventions for [de]serialization (dashed-style, underscore_style, and PascalStyle).

Utils have some handy Uri extension methods for easy query parameters manipulation.

Game Compatibility Status

Does game status lookup by product code, game title (English or using romaji for Japanese titles), or game title abbreviation. We use this for most embeds, including log parsing results, standalone game information embeds, compatibility lists, etc.

RPCS3 Update Information

Accepts current build commit hash as an argument. Provides information about the build requested, as well as information about the latest build available.