Skip to content

FrediKats/codeforces-sdk

Repository files navigation

CodeforcesApiWrapper

CodeforcesApiWrapper - Codeforces API implementation in .NET.

Getting Started

Used technologies

CodeforcesDocsParser

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.

CodeforcesApiWrapper

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.

TODO:

  • 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

About

Sdk для работы с Codeforces API

Topics

Resources

License

Stars

Watchers

Forks

Languages