|
| 1 | +# codechef_client |
| 2 | +CodeChef API to support different applications. |
| 3 | + |
| 4 | +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: |
| 5 | + |
| 6 | +- API version: 1.0.0 |
| 7 | +- Package version: 1.0.0 |
| 8 | +- Build package: io.swagger.codegen.languages.PythonClientCodegen |
| 9 | + |
| 10 | +## Requirements. |
| 11 | + |
| 12 | +Python 2.7 and 3.4+ |
| 13 | + |
| 14 | +## Installation & Usage |
| 15 | +### pip install |
| 16 | + |
| 17 | +If the python package is hosted on Github, you can install directly from Github |
| 18 | + |
| 19 | +```sh |
| 20 | +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git |
| 21 | +``` |
| 22 | +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) |
| 23 | + |
| 24 | +Then import the package: |
| 25 | +```python |
| 26 | +import codechef_client |
| 27 | +``` |
| 28 | + |
| 29 | +### Setuptools |
| 30 | + |
| 31 | +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). |
| 32 | + |
| 33 | +```sh |
| 34 | +python setup.py install --user |
| 35 | +``` |
| 36 | +(or `sudo python setup.py install` to install the package for all users) |
| 37 | + |
| 38 | +Then import the package: |
| 39 | +```python |
| 40 | +import codechef_client |
| 41 | +``` |
| 42 | + |
| 43 | +## Getting Started |
| 44 | + |
| 45 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 46 | + |
| 47 | +```python |
| 48 | +from __future__ import print_function |
| 49 | +import time |
| 50 | +import codechef_client |
| 51 | +from codechef_client.rest import ApiException |
| 52 | +from pprint import pprint |
| 53 | + |
| 54 | +# Configure OAuth2 access token for authorization: codechef_auth |
| 55 | +codechef_client.configuration.access_token = 'YOUR_ACCESS_TOKEN' |
| 56 | +# create an instance of the API class |
| 57 | +api_instance = codechef_client.ContestProblemsApi() |
| 58 | +problem_code = 'problem_code_example' # str | Problem code of the problem, eg. SALARY |
| 59 | +contest_code = 'contest_code_example' # str | Contest code of the contest, eg. PRACTICE, COOK97, JAN17 |
| 60 | +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) |
| 61 | + |
| 62 | +try: |
| 63 | + # Get details of a problem. |
| 64 | + api_response = api_instance.contests_contest_code_problems_problem_code_get(problem_code, contest_code, fields=fields) |
| 65 | + pprint(api_response) |
| 66 | +except ApiException as e: |
| 67 | + print("Exception when calling ContestProblemsApi->contests_contest_code_problems_problem_code_get: %s\n" % e) |
| 68 | + |
| 69 | +``` |
| 70 | + |
| 71 | +## Documentation for API Endpoints |
| 72 | + |
| 73 | +All URIs are relative to *https://api.codechef.com* |
| 74 | + |
| 75 | +Class | Method | HTTP request | Description |
| 76 | +------------ | ------------- | ------------- | ------------- |
| 77 | +*ContestProblemsApi* | [**contests_contest_code_problems_problem_code_get**](docs/ContestProblemsApi.md#contests_contest_code_problems_problem_code_get) | **GET** /contests/{contestCode}/problems/{problemCode} | Get details of a problem. |
| 78 | +*ContestsApi* | [**contests_contest_code_get**](docs/ContestsApi.md#contests_contest_code_get) | **GET** /contests/{contestCode} | Get contest details. |
| 79 | +*ContestsApi* | [**contests_get**](docs/ContestsApi.md#contests_get) | **GET** /contests | Get the list of contests. |
| 80 | +*CountriesApi* | [**country_get**](docs/CountriesApi.md#country_get) | **GET** /country | Get the list of countries on codechef. |
| 81 | +*IDEApi* | [**ide_run_post**](docs/IDEApi.md#ide_run_post) | **POST** /ide/run | Runs a code submitted by user. |
| 82 | +*IDEApi* | [**ide_status_get**](docs/IDEApi.md#ide_status_get) | **GET** /ide/status | Get status of submitted code. |
| 83 | +*InstitutionsApi* | [**institution_get**](docs/InstitutionsApi.md#institution_get) | **GET** /institution | Get the list of institutions on codechef. |
| 84 | +*LanguagesApi* | [**language_get**](docs/LanguagesApi.md#language_get) | **GET** /language | Get the list of languages on codechef. |
| 85 | +*ProblemsApi* | [**problems_category_name_get**](docs/ProblemsApi.md#problems_category_name_get) | **GET** /problems/{categoryName} | Get the list of problems for given categoryName. |
| 86 | +*RankingsApi* | [**rankings_contest_code_get**](docs/RankingsApi.md#rankings_contest_code_get) | **GET** /rankings/{contestCode} | Return ranklist for a particular contest. |
| 87 | +*RatingsApi* | [**ratings_contest_type_get**](docs/RatingsApi.md#ratings_contest_type_get) | **GET** /ratings/{contestType} | Return ratinglist for a particular contest type. |
| 88 | +*SetsApi* | [**sets_add_post**](docs/SetsApi.md#sets_add_post) | **POST** /sets/add | Adds set to the user's account to whom the access token being used belongs. |
| 89 | +*SetsApi* | [**sets_delete_delete**](docs/SetsApi.md#sets_delete_delete) | **DELETE** /sets/delete | Deletes set from the user's account to whom the access token belongs. |
| 90 | +*SetsApi* | [**sets_get**](docs/SetsApi.md#sets_get) | **GET** /sets/ | Get set details for logged in user |
| 91 | +*SetsApi* | [**sets_members_add_post**](docs/SetsApi.md#sets_members_add_post) | **POST** /sets/members/add | Adds set members to an existing set of the user to whom the access token belongs. |
| 92 | +*SetsApi* | [**sets_members_delete_delete**](docs/SetsApi.md#sets_members_delete_delete) | **DELETE** /sets/members/delete | Removes members belonging to a set. |
| 93 | +*SetsApi* | [**sets_members_get_get**](docs/SetsApi.md#sets_members_get_get) | **GET** /sets/members/get | Get set details for particular sets of the logged in user |
| 94 | +*SetsApi* | [**sets_update_put**](docs/SetsApi.md#sets_update_put) | **PUT** /sets/update | Updates set of the logged in user's account. |
| 95 | +*SubmissionApi* | [**submissions_get**](docs/SubmissionApi.md#submissions_get) | **GET** /submissions/ | Get submissions for particular user, problemCode, result and year. |
| 96 | +*SubmissionApi* | [**submissions_submission_id_get**](docs/SubmissionApi.md#submissions_submission_id_get) | **GET** /submissions/{submissionId} | Get details of a submission. |
| 97 | +*TagsApi* | [**tags_problems_get**](docs/TagsApi.md#tags_problems_get) | **GET** /tags/problems | Get list of tags for a given problem. |
| 98 | +*TodoApi* | [**todo_add_post**](docs/TodoApi.md#todo_add_post) | **POST** /todo/add | Adds a problem to todo list. |
| 99 | +*TodoApi* | [**todo_delete_all_delete**](docs/TodoApi.md#todo_delete_all_delete) | **DELETE** /todo/delete/all | Deletes all the problems added to the todo list. |
| 100 | +*TodoApi* | [**todo_delete_delete**](docs/TodoApi.md#todo_delete_delete) | **DELETE** /todo/delete/ | Deletes a problem added to the todo list. |
| 101 | +*TodoApi* | [**todo_problems_get**](docs/TodoApi.md#todo_problems_get) | **GET** /todo/problems | Gets problems listed in todo. |
| 102 | +*UsersApi* | [**users_get**](docs/UsersApi.md#users_get) | **GET** /users | Get the list of users maximum 20. |
| 103 | +*UsersApi* | [**users_me_get**](docs/UsersApi.md#users_me_get) | **GET** /users/me | Fetches all the details of logged-in user. |
| 104 | +*UsersApi* | [**users_username_get**](docs/UsersApi.md#users_username_get) | **GET** /users/{username} | Fetches all the details of a user. |
| 105 | + |
| 106 | + |
| 107 | +## Documentation For Models |
| 108 | + |
| 109 | + - [AddSetMemberParameters](docs/AddSetMemberParameters.md) |
| 110 | + - [AddSetParameters](docs/AddSetParameters.md) |
| 111 | + - [AddTodoParameters](docs/AddTodoParameters.md) |
| 112 | + - [AllRanking](docs/AllRanking.md) |
| 113 | + - [City](docs/City.md) |
| 114 | + - [Contest](docs/Contest.md) |
| 115 | + - [ContestList](docs/ContestList.md) |
| 116 | + - [ContestProblem](docs/ContestProblem.md) |
| 117 | + - [ContestProblemsList](docs/ContestProblemsList.md) |
| 118 | + - [ContestWiseProblems](docs/ContestWiseProblems.md) |
| 119 | + - [Country](docs/Country.md) |
| 120 | + - [CountryList](docs/CountryList.md) |
| 121 | + - [Error](docs/Error.md) |
| 122 | + - [ErrorResult](docs/ErrorResult.md) |
| 123 | + - [ErrorResultErrors](docs/ErrorResultErrors.md) |
| 124 | + - [IDERun](docs/IDERun.md) |
| 125 | + - [IDEStatus](docs/IDEStatus.md) |
| 126 | + - [IdeRunSourceCode](docs/IdeRunSourceCode.md) |
| 127 | + - [InlineResponse200](docs/InlineResponse200.md) |
| 128 | + - [InlineResponse2001](docs/InlineResponse2001.md) |
| 129 | + - [InlineResponse20010](docs/InlineResponse20010.md) |
| 130 | + - [InlineResponse20010Result](docs/InlineResponse20010Result.md) |
| 131 | + - [InlineResponse20010ResultData](docs/InlineResponse20010ResultData.md) |
| 132 | + - [InlineResponse20010ResultDataContent](docs/InlineResponse20010ResultDataContent.md) |
| 133 | + - [InlineResponse20011](docs/InlineResponse20011.md) |
| 134 | + - [InlineResponse20011Result](docs/InlineResponse20011Result.md) |
| 135 | + - [InlineResponse20011ResultData](docs/InlineResponse20011ResultData.md) |
| 136 | + - [InlineResponse20012](docs/InlineResponse20012.md) |
| 137 | + - [InlineResponse20012Result](docs/InlineResponse20012Result.md) |
| 138 | + - [InlineResponse20012ResultData](docs/InlineResponse20012ResultData.md) |
| 139 | + - [InlineResponse20013](docs/InlineResponse20013.md) |
| 140 | + - [InlineResponse20013Result](docs/InlineResponse20013Result.md) |
| 141 | + - [InlineResponse20013ResultData](docs/InlineResponse20013ResultData.md) |
| 142 | + - [InlineResponse20014](docs/InlineResponse20014.md) |
| 143 | + - [InlineResponse20014Result](docs/InlineResponse20014Result.md) |
| 144 | + - [InlineResponse20014ResultData](docs/InlineResponse20014ResultData.md) |
| 145 | + - [InlineResponse20015](docs/InlineResponse20015.md) |
| 146 | + - [InlineResponse20016](docs/InlineResponse20016.md) |
| 147 | + - [InlineResponse20017](docs/InlineResponse20017.md) |
| 148 | + - [InlineResponse20017Result](docs/InlineResponse20017Result.md) |
| 149 | + - [InlineResponse20017ResultData](docs/InlineResponse20017ResultData.md) |
| 150 | + - [InlineResponse20018](docs/InlineResponse20018.md) |
| 151 | + - [InlineResponse20019](docs/InlineResponse20019.md) |
| 152 | + - [InlineResponse2001Result](docs/InlineResponse2001Result.md) |
| 153 | + - [InlineResponse2001ResultData](docs/InlineResponse2001ResultData.md) |
| 154 | + - [InlineResponse2002](docs/InlineResponse2002.md) |
| 155 | + - [InlineResponse20020](docs/InlineResponse20020.md) |
| 156 | + - [InlineResponse20020Result](docs/InlineResponse20020Result.md) |
| 157 | + - [InlineResponse20020ResultData](docs/InlineResponse20020ResultData.md) |
| 158 | + - [InlineResponse20020ResultDataContent](docs/InlineResponse20020ResultDataContent.md) |
| 159 | + - [InlineResponse20021](docs/InlineResponse20021.md) |
| 160 | + - [InlineResponse20022](docs/InlineResponse20022.md) |
| 161 | + - [InlineResponse20022Result](docs/InlineResponse20022Result.md) |
| 162 | + - [InlineResponse20022ResultContent](docs/InlineResponse20022ResultContent.md) |
| 163 | + - [InlineResponse20023](docs/InlineResponse20023.md) |
| 164 | + - [InlineResponse20023Result](docs/InlineResponse20023Result.md) |
| 165 | + - [InlineResponse20023ResultContent](docs/InlineResponse20023ResultContent.md) |
| 166 | + - [InlineResponse2002Result](docs/InlineResponse2002Result.md) |
| 167 | + - [InlineResponse2002ResultData](docs/InlineResponse2002ResultData.md) |
| 168 | + - [InlineResponse2002ResultDataContent](docs/InlineResponse2002ResultDataContent.md) |
| 169 | + - [InlineResponse2003](docs/InlineResponse2003.md) |
| 170 | + - [InlineResponse2003Result](docs/InlineResponse2003Result.md) |
| 171 | + - [InlineResponse2003ResultData](docs/InlineResponse2003ResultData.md) |
| 172 | + - [InlineResponse2004](docs/InlineResponse2004.md) |
| 173 | + - [InlineResponse2004Result](docs/InlineResponse2004Result.md) |
| 174 | + - [InlineResponse2004ResultData](docs/InlineResponse2004ResultData.md) |
| 175 | + - [InlineResponse2005](docs/InlineResponse2005.md) |
| 176 | + - [InlineResponse2005Result](docs/InlineResponse2005Result.md) |
| 177 | + - [InlineResponse2005ResultData](docs/InlineResponse2005ResultData.md) |
| 178 | + - [InlineResponse2005ResultDataContent](docs/InlineResponse2005ResultDataContent.md) |
| 179 | + - [InlineResponse2006](docs/InlineResponse2006.md) |
| 180 | + - [InlineResponse2006Result](docs/InlineResponse2006Result.md) |
| 181 | + - [InlineResponse2006ResultData](docs/InlineResponse2006ResultData.md) |
| 182 | + - [InlineResponse2006ResultDataContent](docs/InlineResponse2006ResultDataContent.md) |
| 183 | + - [InlineResponse2007](docs/InlineResponse2007.md) |
| 184 | + - [InlineResponse2007Result](docs/InlineResponse2007Result.md) |
| 185 | + - [InlineResponse2007ResultData](docs/InlineResponse2007ResultData.md) |
| 186 | + - [InlineResponse2007ResultDataContent](docs/InlineResponse2007ResultDataContent.md) |
| 187 | + - [InlineResponse2008](docs/InlineResponse2008.md) |
| 188 | + - [InlineResponse2008Result](docs/InlineResponse2008Result.md) |
| 189 | + - [InlineResponse2008ResultData](docs/InlineResponse2008ResultData.md) |
| 190 | + - [InlineResponse2008ResultDataContent](docs/InlineResponse2008ResultDataContent.md) |
| 191 | + - [InlineResponse2009](docs/InlineResponse2009.md) |
| 192 | + - [InlineResponse2009Result](docs/InlineResponse2009Result.md) |
| 193 | + - [InlineResponse2009ResultData](docs/InlineResponse2009ResultData.md) |
| 194 | + - [InlineResponse2009ResultDataContent](docs/InlineResponse2009ResultDataContent.md) |
| 195 | + - [InlineResponse200Result](docs/InlineResponse200Result.md) |
| 196 | + - [InlineResponse200ResultData](docs/InlineResponse200ResultData.md) |
| 197 | + - [Institution](docs/Institution.md) |
| 198 | + - [Language](docs/Language.md) |
| 199 | + - [Problems](docs/Problems.md) |
| 200 | + - [RankList](docs/RankList.md) |
| 201 | + - [RankListProblemScore](docs/RankListProblemScore.md) |
| 202 | + - [Ranking](docs/Ranking.md) |
| 203 | + - [Rating](docs/Rating.md) |
| 204 | + - [RatingList](docs/RatingList.md) |
| 205 | + - [SetMembers](docs/SetMembers.md) |
| 206 | + - [Sets](docs/Sets.md) |
| 207 | + - [SetsaddResult](docs/SetsaddResult.md) |
| 208 | + - [SetsaddResultData](docs/SetsaddResultData.md) |
| 209 | + - [SetsupdateResult](docs/SetsupdateResult.md) |
| 210 | + - [SetsupdateResultData](docs/SetsupdateResultData.md) |
| 211 | + - [State](docs/State.md) |
| 212 | + - [Submission](docs/Submission.md) |
| 213 | + - [Tag](docs/Tag.md) |
| 214 | + - [TodoProblemDetails](docs/TodoProblemDetails.md) |
| 215 | + - [TodoaddResult](docs/TodoaddResult.md) |
| 216 | + - [TodoaddResultData](docs/TodoaddResultData.md) |
| 217 | + - [TododeleteResult](docs/TododeleteResult.md) |
| 218 | + - [TododeleteResultData](docs/TododeleteResultData.md) |
| 219 | + - [UpdateSetParameters](docs/UpdateSetParameters.md) |
| 220 | + - [User](docs/User.md) |
| 221 | + - [UserProblemStats](docs/UserProblemStats.md) |
| 222 | + - [UserSubmissionStats](docs/UserSubmissionStats.md) |
| 223 | + - [Users](docs/Users.md) |
| 224 | + |
| 225 | + |
| 226 | +## Documentation For Authorization |
| 227 | + |
| 228 | + |
| 229 | +## codechef_auth |
| 230 | + |
| 231 | +- **Type**: OAuth |
| 232 | +- **Flow**: accessCode |
| 233 | +- **Authorization URL**: https://api.codechef.com/oauth/authorize |
| 234 | +- **Scopes**: |
| 235 | + - **public**: public |
| 236 | + - **private**: private |
| 237 | + - **set**: set |
| 238 | + - **todo**: todo |
| 239 | + - **submission**: submission |
| 240 | + |
| 241 | + |
| 242 | +## Author |
| 243 | + |
| 244 | + |
| 245 | + |
0 commit comments