Git version: c5741c9@2023-02-03T15:02:34Z
This Python package is automatically generated by the Swagger Codegen project:
- API version: 1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.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/joint-online-judge/horse-python-client.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/joint-online-judge/horse-python-client.git
)
Then import the package:
import joj.horse_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 joj.horse_client
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import joj.horse_client
from joj.horse_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = joj.horse_client.AdminApi(joj.horse_client.ApiClient(configuration))
body = joj.horse_client.JudgerCreate() # JudgerCreate |
try:
# Admin Create Judger
api_response = api_instance.v1_admin_create_judger(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->v1_admin_create_judger: %s\n" % e)
# create an instance of the API class
api_instance = joj.horse_client.AdminApi(joj.horse_client.ApiClient(configuration))
uid = 'uid_example' # str |
try:
# Admin Get User
api_response = api_instance.v1_admin_get_user(uid)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->v1_admin_get_user: %s\n" % e)
# create an instance of the API class
api_instance = joj.horse_client.AdminApi(joj.horse_client.ApiClient(configuration))
ordering = '' # str | Comma separated list of ordering the results. You may specify reverse orderings by prefixing the field name with '-'. Available fields: created_at,updated_at (optional)
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Admin List Domain Roles
api_response = api_instance.v1_admin_list_domain_roles(ordering=ordering, offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->v1_admin_list_domain_roles: %s\n" % e)
# create an instance of the API class
api_instance = joj.horse_client.AdminApi(joj.horse_client.ApiClient(configuration))
ordering = '' # str | Comma separated list of ordering the results. You may specify reverse orderings by prefixing the field name with '-'. Available fields: created_at,updated_at (optional)
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Admin List Judgers
api_response = api_instance.v1_admin_list_judgers(ordering=ordering, offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->v1_admin_list_judgers: %s\n" % e)
# create an instance of the API class
api_instance = joj.horse_client.AdminApi(joj.horse_client.ApiClient(configuration))
uid = 'uid_example' # str |
role = ['role_example'] # list[str] | (optional)
groups = ['groups_example'] # list[str] | (optional)
ordering = '' # str | Comma separated list of ordering the results. You may specify reverse orderings by prefixing the field name with '-'. Available fields: created_at,updated_at (optional)
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Admin List User Domains
api_response = api_instance.v1_admin_list_user_domains(uid, role=role, groups=groups, ordering=ordering, offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->v1_admin_list_user_domains: %s\n" % e)
# create an instance of the API class
api_instance = joj.horse_client.AdminApi(joj.horse_client.ApiClient(configuration))
ordering = '' # str | Comma separated list of ordering the results. You may specify reverse orderings by prefixing the field name with '-'. Available fields: created_at,updated_at (optional)
offset = 0 # int | (optional) (default to 0)
limit = 100 # int | (optional) (default to 100)
try:
# Admin List Users
api_response = api_instance.v1_admin_list_users(ordering=ordering, offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->v1_admin_list_users: %s\n" % e)
All URIs are relative to /api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AdminApi | v1_admin_create_judger | POST /admin/judgers | Admin Create Judger |
AdminApi | v1_admin_get_user | GET /admin/{uid} | Admin Get User |
AdminApi | v1_admin_list_domain_roles | GET /admin/domain_roles | Admin List Domain Roles |
AdminApi | v1_admin_list_judgers | GET /admin/judgers | Admin List Judgers |
AdminApi | v1_admin_list_user_domains | GET /admin/{uid}/domains | Admin List User Domains |
AdminApi | v1_admin_list_users | GET /admin/users | Admin List Users |
AuthApi | v1_get_token | GET /auth/token | Get Token |
AuthApi | v1_list_oauth2 | GET /auth/oauth2 | List Oauth2 |
AuthApi | v1_login | POST /auth/login | Login |
AuthApi | v1_logout | POST /auth/logout | Logout |
AuthApi | v1_oauth_authorize | GET /auth/oauth2/{oauth2}/authorize | Oauth Authorize |
AuthApi | v1_refresh | POST /auth/refresh | Refresh |
AuthApi | v1_register | POST /auth/register | Register |
DomainApi | v1_add_domain_user | POST /domains/{domain}/users | Add Domain User |
DomainApi | v1_create_domain | POST /domains | Create Domain |
DomainApi | v1_create_domain_invitation | POST /domains/{domain}/invitations | Create Domain Invitation |
DomainApi | v1_create_domain_role | POST /domains/{domain}/roles | Create Domain Role |
DomainApi | v1_delete_domain | DELETE /domains/{domain} | Delete Domain |
DomainApi | v1_delete_domain_invitation | DELETE /domains/{domain}/invitations/{invitation} | Delete Domain Invitation |
DomainApi | v1_delete_domain_role | DELETE /domains/{domain}/roles/{role} | Delete Domain Role |
DomainApi | v1_get_domain | GET /domains/{domain} | Get Domain |
DomainApi | v1_get_domain_invitation | GET /domains/{domain}/invitations/{invitation} | Get Domain Invitation |
DomainApi | v1_get_domain_role | GET /domains/{domain}/roles/{role} | Get Domain Role |
DomainApi | v1_get_domain_user | GET /domains/{domain}/users/{user} | Get Domain User |
DomainApi | v1_get_domain_user_permission | GET /domains/{domain}/users/{user}/permission | Get Domain User Permission |
DomainApi | v1_join_domain_by_invitation | POST /domains/{domain}/join | Join Domain By Invitation |
DomainApi | v1_list_domain_invitations | GET /domains/{domain}/invitations | List Domain Invitations |
DomainApi | v1_list_domain_roles | GET /domains/{domain}/roles | List Domain Roles |
DomainApi | v1_list_domain_users | GET /domains/{domain}/users | List Domain Users |
DomainApi | v1_list_domains | GET /domains | List Domains |
DomainApi | v1_remove_domain_user | DELETE /domains/{domain}/users/{user} | Remove Domain User |
DomainApi | v1_search_domain_candidates | GET /domains/{domain}/candidates | Search Domain Candidates |
DomainApi | v1_search_domain_groups | GET /domains/groups | Search Domain Groups |
DomainApi | v1_transfer_domain | POST /domains/{domain}/transfer | Transfer Domain |
DomainApi | v1_update_domain | PATCH /domains/{domain} | Update Domain |
DomainApi | v1_update_domain_invitation | PATCH /domains/{domain}/invitations/{invitation} | Update Domain Invitation |
DomainApi | v1_update_domain_role | PATCH /domains/{domain}/roles/{role} | Update Domain Role |
DomainApi | v1_update_domain_user | PATCH /domains/{domain}/users/{user} | Update Domain User |
JudgeApi | v1_claim_record_by_judger | POST /domains/{domain}/records/{record}/judge/claim | Claim Record By Judger |
JudgeApi | v1_submit_case_by_judger | PUT /domains/{domain}/records/{record}/cases/{index}/judge | Submit Case By Judger |
JudgeApi | v1_submit_record_by_judger | PUT /domains/{domain}/records/{record}/judge | Submit Record By Judger |
MiscellaneousApi | v1_jwt_decoded | GET /jwt_decoded | Jwt Decoded |
MiscellaneousApi | v1_test_error_report | GET /test/report | Test Error Report |
MiscellaneousApi | v1_version | GET /version | Version |
ProblemApi | v1_clone_problem | POST /domains/{domain}/problems/clone | Clone Problem |
ProblemApi | v1_create_problem | POST /domains/{domain}/problems | Create Problem |
ProblemApi | v1_delete_problem | DELETE /domains/{domain}/problems/{problem} | Delete Problem |
ProblemApi | v1_get_problem | GET /domains/{domain}/problems/{problem} | Get Problem |
ProblemApi | v1_list_problems | GET /domains/{domain}/problems | List Problems |
ProblemApi | v1_submit_solution_to_problem | POST /domains/{domain}/problems/{problem} | Submit Solution To Problem |
ProblemApi | v1_update_problem | PATCH /domains/{domain}/problems/{problem} | Update Problem |
ProblemConfigApi | v1_diff_problem_config_default_branch | GET /domains/{domain}/problems/{problem}/configs/latest/diff | Diff Problem Config Default Branch |
ProblemConfigApi | v1_download_problem_config_archive | GET /domains/{domain}/problems/{problem}/configs/{config} | Download Problem Config Archive |
ProblemConfigApi | v1_get_problem_config_json | GET /domains/{domain}/problems/{problem}/configs/{config}/json | Get Problem Config Json |
ProblemConfigApi | v1_list_latest_problem_config_objects_under_a_given_prefix | GET /domains/{domain}/problems/{problem}/configs/latest/ls | List Latest Problem Config Objects Under A Given Prefix |
ProblemConfigApi | v1_list_problem_config_commits | GET /domains/{domain}/problems/{problem}/configs | List Problem Config Commits |
ProblemConfigApi | v1_update_problem_config_by_archive | POST /domains/{domain}/problems/{problem}/configs | Update Problem Config By Archive |
ProblemConfigApi | v1_update_problem_config_json | POST /domains/{domain}/problems/{problem}/configs/json | Update Problem Config Json |
ProblemGroupApi | v1_list_problem_groups | GET /problem_groups | List Problem Groups |
ProblemSetApi | v1_add_problem_in_problem_set | POST /domains/{domain}/problem_sets/{problemSet}/problems | Add Problem In Problem Set |
ProblemSetApi | v1_create_problem_set | POST /domains/{domain}/problem_sets | Create Problem Set |
ProblemSetApi | v1_delete_problem_in_problem_set | DELETE /domains/{domain}/problem_sets/{problemSet}/problems/{problem} | Delete Problem In Problem Set |
ProblemSetApi | v1_delete_problem_set | DELETE /domains/{domain}/problem_sets/{problemSet} | Delete Problem Set |
ProblemSetApi | v1_get_problem_in_problem_set | GET /domains/{domain}/problem_sets/{problemSet}/problems/{problem} | Get Problem In Problem Set |
ProblemSetApi | v1_get_problem_set | GET /domains/{domain}/problem_sets/{problemSet} | Get Problem Set |
ProblemSetApi | v1_list_problem_sets | GET /domains/{domain}/problem_sets | List Problem Sets |
ProblemSetApi | v1_list_problems_in_problem_set | GET /domains/{domain}/problem_sets/{problemSet}/problems | List Problems In Problem Set |
ProblemSetApi | v1_submit_solution_to_problem_set | POST /domains/{domain}/problem_sets/{problemSet}/problems/{problem}/submit | Submit Solution To Problem Set |
ProblemSetApi | v1_update_problem_in_problem_set | PATCH /domains/{domain}/problem_sets/{problemSet}/problems/{problem} | Update Problem In Problem Set |
ProblemSetApi | v1_update_problem_set | PATCH /domains/{domain}/problem_sets/{problemSet} | Update Problem Set |
RecordApi | v1_get_record | GET /domains/{domain}/records/{record} | Get Record |
RecordApi | v1_list_records_in_domain | GET /domains/{domain}/records | List Records In Domain |
UserApi | v1_change_password | PATCH /users/me/password | Change Password |
UserApi | v1_get_current_user | GET /users/me | Get Current User |
UserApi | v1_get_user | GET /users/{uid} | Get User |
UserApi | v1_update_current_user | PATCH /users/me | Update Current User |
- AllOfDomainPermissionGeneral
- AllOfDomainPermissionProblem
- AllOfDomainPermissionProblemSet
- AllOfDomainPermissionRecord
- AllOfRecordCaseState
- AllOfRecordDetailState
- AllOfRecordListDetailState
- AllOfRecordState
- AnyOfValidationErrorLocItems
- ArchiveFormat
- ArchiveType
- AuthTokens
- AuthTokensResp
- AuthTokensWithLakefs
- AuthTokensWithLakefsResp
- Case
- ConfigJsonOnMissing
- ConfigMissing
- Detail
- Diff
- DiffList
- DiffListResp
- DiffTypeEnum
- Domain
- DomainCreate
- DomainDetail
- DomainDetailResp
- DomainEdit
- DomainInvitation
- DomainInvitationCreate
- DomainInvitationEdit
- DomainInvitationList
- DomainInvitationListResp
- DomainInvitationResp
- DomainList
- DomainListResp
- DomainPermission
- DomainResp
- DomainRole
- DomainRoleCreate
- DomainRoleDetail
- DomainRoleDetailResp
- DomainRoleEdit
- DomainRoleList
- DomainRoleListResp
- DomainRoleResp
- DomainTag
- DomainTagList
- DomainTagListResp
- DomainTransfer
- DomainUserAdd
- DomainUserPermission
- DomainUserPermissionResp
- DomainUserUpdate
- Empty
- EmptyResp
- ErrorCode
- FileUpload
- GeneralPermission
- HTTPValidationError
- JWTAccessToken
- JWTAccessTokenResp
- JudgerClaim
- JudgerCreate
- JudgerCredentials
- JudgerCredentialsResp
- JudgerDetail
- JudgerDetailList
- JudgerDetailListResp
- Language
- LanguageDefault
- OAuth2Client
- OAuth2ClientList
- OAuth2ClientListResp
- OAuth2PasswordRequestForm
- ObjectStats
- ObjectStatsList
- ObjectStatsListResp
- Pagination
- PathTypeEnum
- Problem
- ProblemClone
- ProblemConfigDataDetail
- ProblemConfigDataDetailResp
- ProblemConfigDetail
- ProblemConfigDetailList
- ProblemConfigDetailListResp
- ProblemConfigDetailResp
- ProblemConfigJson
- ProblemCreate
- ProblemDetail
- ProblemDetailResp
- ProblemDetailWithLatestRecord
- ProblemDetailWithLatestRecordResp
- ProblemEdit
- ProblemGroup
- ProblemGroupList
- ProblemGroupListResp
- ProblemList
- ProblemListResp
- ProblemPermission
- ProblemPreviewWithLatestRecord
- ProblemResp
- ProblemSet
- ProblemSetAddProblem
- ProblemSetCreate
- ProblemSetDetail
- ProblemSetDetailResp
- ProblemSetEdit
- ProblemSetList
- ProblemSetListResp
- ProblemSetPermission
- ProblemSetResp
- ProblemSetUpdateProblem
- ProblemSolutionSubmit
- ProblemWithLatestRecord
- ProblemWithLatestRecordList
- ProblemWithLatestRecordListResp
- Record
- RecordCase
- RecordCaseResult
- RecordCaseSubmit
- RecordDetail
- RecordDetailResp
- RecordListDetail
- RecordListDetailList
- RecordListDetailListResp
- RecordPermission
- RecordPreview
- RecordResp
- RecordState
- RecordSubmit
- Redirect
- RedirectResp
- User
- UserCreate
- UserDetail
- UserDetailResp
- UserDetailWithDomainRole
- UserDetailWithDomainRoleList
- UserDetailWithDomainRoleListResp
- UserDetailWithDomainRoleResp
- UserEdit
- UserList
- UserListResp
- UserPreview
- UserPreviewResp
- UserResetPassword
- UserWithDomainRole
- UserWithDomainRoleList
- UserWithDomainRoleListResp
- UserWithDomainRoleResp
- ValidationError
- Version