CodeforcesApiWrapper - Codeforces API implementation in .NET.
- .NET Standard 2.0
- .NET Core 2.2 (Unit-tests)
- MSTest (Unit-tests)
- Refit 4.6.58
- HtmlAgilityPack 1.8.11
This project contains code for parsing https://codeforces.com/api/help/objects and generating models on C# language. Probably, it's easy enough to implement generating to other language. Generated classes you can find here: CodeforcesApiWrapper/Types.
Contains implementation of https://codeforces.com/api/help/methods. You can user class Codeforces
for access to methods:
var codeforces = new Codeforces();
ResponseContainer<List<Comment>> response = codeforces.BlogEntity.Comments(79).Result;
Each method call returns a JSON-object (ResponseContainer<T>
) with three possible fields: status, comment and result.
- Status is either "OK" or "FAILED".
- If status is "FAILED" then comment contains the reason why the request failed. If status is "OK", then there is no comment.
- If status is "OK" then result contains method-dependent JSON-element which will be described for each method separately. If status is "FAILED", then there is no result.
- Add missing method with argument list (like
user.info
) - Build as nuget package and add to marketplace
- Fix some problems with API docs
- Add methods with access token
- Implement other language code-generationg
- Remove "dirty hacks from code"
- Return full data if no handles from arguments wasn't found. Seem like bug