This project is licensed under the MIT license.
If you have any questions regarding the library's endpoint structure, please refer to the Clash of Clans API documentation.
As of now, this library does not have neither rate limiting nor caching. However, these functionality may be implemented in a future version.
You can install Sharp of Clans via the package manager with the following command:
Install-Package SharpOfClans
For different installation ways, please refer to the Sharp of Clans nuget page.
Make sure you're importing the library with using
:
using SharpOfClans;
After that, you can get an instance of the entrypoint's class.
// Replace 'cocApiToken' with your CoC API Token
var cocApiToken = "token";
var clashApi = ClashApi.GetInstance(cocApiToken);
You can then use clashApi
to access the API's endpoints, for example:
// Get a player with specific tag through the players endpoint
var player = await clashApi.Players.GetPlayerAsync("#L22YL908");
// Write player's name to the console
Console.WriteLine($"The player's name is {player.Name}.");
You can find more documentation on SharpOfClans' documentation page.
This is the first library I developed, hence I had no idea of how one should be structured. For that reason I referred to the RiotSharp library to get an idea of how a library should be structured, so thanks Ben!
This material is unofficial and is not endorsed by Supercell. For more information see Supercell's Fan Content Policy: www.supercell.com/fan-content-policy.