CodeChef API to support different applications.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import codechef_client
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import codechef_client
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import codechef_client
from codechef_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: codechef_auth
codechef_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = codechef_client.ContestProblemsApi()
problem_code = 'problem_code_example' # str | Problem code of the problem, eg. SALARY
contest_code = 'contest_code_example' # str | Contest code of the contest, eg. PRACTICE, COOK97, JAN17
fields = 'fields_example' # str | Possible fields are- problemCode, author, problemName, languagesSupported, sourceSizeLimit, dateAdded, challengeType, maxTimeLimit, successfulSubmissions, body, totalSubmissions, partialSubmissions, tags. Multiple fields can be entered using comma. (optional)
try:
# Get details of a problem.
api_response = api_instance.contests_contest_code_problems_problem_code_get(problem_code, contest_code, fields=fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContestProblemsApi->contests_contest_code_problems_problem_code_get: %s\n" % e)
All URIs are relative to https://api.codechef.com
Class | Method | HTTP request | Description |
---|---|---|---|
ContestProblemsApi | contests_contest_code_problems_problem_code_get | GET /contests/{contestCode}/problems/{problemCode} | Get details of a problem. |
ContestsApi | contests_contest_code_get | GET /contests/{contestCode} | Get contest details. |
ContestsApi | contests_get | GET /contests | Get the list of contests. |
CountriesApi | country_get | GET /country | Get the list of countries on codechef. |
IDEApi | ide_run_post | POST /ide/run | Runs a code submitted by user. |
IDEApi | ide_status_get | GET /ide/status | Get status of submitted code. |
InstitutionsApi | institution_get | GET /institution | Get the list of institutions on codechef. |
LanguagesApi | language_get | GET /language | Get the list of languages on codechef. |
ProblemsApi | problems_category_name_get | GET /problems/{categoryName} | Get the list of problems for given categoryName. |
RankingsApi | rankings_contest_code_get | GET /rankings/{contestCode} | Return ranklist for a particular contest. |
RatingsApi | ratings_contest_type_get | GET /ratings/{contestType} | Return ratinglist for a particular contest type. |
SetsApi | sets_add_post | POST /sets/add | Adds set to the user's account to whom the access token being used belongs. |
SetsApi | sets_delete_delete | DELETE /sets/delete | Deletes set from the user's account to whom the access token belongs. |
SetsApi | sets_get | GET /sets/ | Get set details for logged in user |
SetsApi | sets_members_add_post | POST /sets/members/add | Adds set members to an existing set of the user to whom the access token belongs. |
SetsApi | sets_members_delete_delete | DELETE /sets/members/delete | Removes members belonging to a set. |
SetsApi | sets_members_get_get | GET /sets/members/get | Get set details for particular sets of the logged in user |
SetsApi | sets_update_put | PUT /sets/update | Updates set of the logged in user's account. |
SubmissionApi | submissions_get | GET /submissions/ | Get submissions for particular user, problemCode, result and year. |
SubmissionApi | submissions_submission_id_get | GET /submissions/{submissionId} | Get details of a submission. |
TagsApi | tags_problems_get | GET /tags/problems | Get list of tags for a given problem. |
TodoApi | todo_add_post | POST /todo/add | Adds a problem to todo list. |
TodoApi | todo_delete_all_delete | DELETE /todo/delete/all | Deletes all the problems added to the todo list. |
TodoApi | todo_delete_delete | DELETE /todo/delete/ | Deletes a problem added to the todo list. |
TodoApi | todo_problems_get | GET /todo/problems | Gets problems listed in todo. |
UsersApi | users_get | GET /users | Get the list of users maximum 20. |
UsersApi | users_me_get | GET /users/me | Fetches all the details of logged-in user. |
UsersApi | users_username_get | GET /users/{username} | Fetches all the details of a user. |
- AddSetMemberParameters
- AddSetParameters
- AddTodoParameters
- AllRanking
- City
- Contest
- ContestList
- ContestProblem
- ContestProblemsList
- ContestWiseProblems
- Country
- CountryList
- Error
- ErrorResult
- ErrorResultErrors
- IDERun
- IDEStatus
- IdeRunSourceCode
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20010Result
- InlineResponse20010ResultData
- InlineResponse20010ResultDataContent
- InlineResponse20011
- InlineResponse20011Result
- InlineResponse20011ResultData
- InlineResponse20012
- InlineResponse20012Result
- InlineResponse20012ResultData
- InlineResponse20013
- InlineResponse20013Result
- InlineResponse20013ResultData
- InlineResponse20014
- InlineResponse20014Result
- InlineResponse20014ResultData
- InlineResponse20015
- InlineResponse20016
- InlineResponse20017
- InlineResponse20017Result
- InlineResponse20017ResultData
- InlineResponse20018
- InlineResponse20019
- InlineResponse2001Result
- InlineResponse2001ResultData
- InlineResponse2002
- InlineResponse20020
- InlineResponse20020Result
- InlineResponse20020ResultData
- InlineResponse20020ResultDataContent
- InlineResponse20021
- InlineResponse20022
- InlineResponse20022Result
- InlineResponse20022ResultContent
- InlineResponse20023
- InlineResponse20023Result
- InlineResponse20023ResultContent
- InlineResponse2002Result
- InlineResponse2002ResultData
- InlineResponse2002ResultDataContent
- InlineResponse2003
- InlineResponse2003Result
- InlineResponse2003ResultData
- InlineResponse2004
- InlineResponse2004Result
- InlineResponse2004ResultData
- InlineResponse2005
- InlineResponse2005Result
- InlineResponse2005ResultData
- InlineResponse2005ResultDataContent
- InlineResponse2006
- InlineResponse2006Result
- InlineResponse2006ResultData
- InlineResponse2006ResultDataContent
- InlineResponse2007
- InlineResponse2007Result
- InlineResponse2007ResultData
- InlineResponse2007ResultDataContent
- InlineResponse2008
- InlineResponse2008Result
- InlineResponse2008ResultData
- InlineResponse2008ResultDataContent
- InlineResponse2009
- InlineResponse2009Result
- InlineResponse2009ResultData
- InlineResponse2009ResultDataContent
- InlineResponse200Result
- InlineResponse200ResultData
- Institution
- Language
- Problems
- RankList
- RankListProblemScore
- Ranking
- Rating
- RatingList
- SetMembers
- Sets
- SetsaddResult
- SetsaddResultData
- SetsupdateResult
- SetsupdateResultData
- State
- Submission
- Tag
- TodoProblemDetails
- TodoaddResult
- TodoaddResultData
- TododeleteResult
- TododeleteResultData
- UpdateSetParameters
- User
- UserProblemStats
- UserSubmissionStats
- Users
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://api.codechef.com/oauth/authorize
- Scopes:
- public: public
- private: private
- set: set
- todo: todo
- submission: submission