All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
v1_clone_problem | POST /domains/{domain}/problems/clone | Clone Problem |
v1_create_problem | POST /domains/{domain}/problems | Create Problem |
v1_delete_problem | DELETE /domains/{domain}/problems/{problem} | Delete Problem |
v1_get_problem | GET /domains/{domain}/problems/{problem} | Get Problem |
v1_list_problems | GET /domains/{domain}/problems | List Problems |
v1_submit_solution_to_problem | POST /domains/{domain}/problems/{problem} | Submit Solution To Problem |
v1_update_problem | PATCH /domains/{domain}/problems/{problem} | Update Problem |
ProblemListResp v1_clone_problem(body, domain)
Clone Problem
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.ProblemApi(joj.horse_client.ApiClient(configuration))
body = joj.horse_client.ProblemClone() # ProblemClone |
domain = 'domain_example' # str | url or id of the domain
try:
# Clone Problem
api_response = api_instance.v1_clone_problem(body, domain)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProblemApi->v1_clone_problem: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ProblemClone | ||
domain | str | url or id of the domain |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProblemDetailResp v1_create_problem(body, domain)
Create Problem
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.ProblemApi(joj.horse_client.ApiClient(configuration))
body = joj.horse_client.ProblemCreate() # ProblemCreate |
domain = 'domain_example' # str | url or id of the domain
try:
# Create Problem
api_response = api_instance.v1_create_problem(body, domain)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProblemApi->v1_create_problem: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ProblemCreate | ||
domain | str | url or id of the domain |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmptyResp v1_delete_problem(domain, problem)
Delete Problem
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.ProblemApi(joj.horse_client.ApiClient(configuration))
domain = 'domain_example' # str | url or id of the domain
problem = 'problem_example' # str | url or id of the problem
try:
# Delete Problem
api_response = api_instance.v1_delete_problem(domain, problem)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProblemApi->v1_delete_problem: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
domain | str | url or id of the domain | |
problem | str | url or id of the problem |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProblemDetailWithLatestRecordResp v1_get_problem(domain, problem)
Get Problem
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.ProblemApi(joj.horse_client.ApiClient(configuration))
domain = 'domain_example' # str | url or id of the domain
problem = 'problem_example' # str | url or id of the problem
try:
# Get Problem
api_response = api_instance.v1_get_problem(domain, problem)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProblemApi->v1_get_problem: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
domain | str | url or id of the domain | |
problem | str | url or id of the problem |
ProblemDetailWithLatestRecordResp
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProblemWithLatestRecordListResp v1_list_problems(domain, ordering=ordering, offset=offset, limit=limit)
List Problems
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.ProblemApi(joj.horse_client.ApiClient(configuration))
domain = 'domain_example' # str | url or id of the domain
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:
# List Problems
api_response = api_instance.v1_list_problems(domain, ordering=ordering, offset=offset, limit=limit)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProblemApi->v1_list_problems: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
domain | str | url or id of the domain | |
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 | int | [optional] [default to 0] | |
limit | int | [optional] [default to 100] |
ProblemWithLatestRecordListResp
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RecordResp v1_submit_solution_to_problem(language, files, domain, problem)
Submit Solution To Problem
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.ProblemApi(joj.horse_client.ApiClient(configuration))
language = 'language_example' # str |
files = ['files_example'] # list[str] |
domain = 'domain_example' # str | url or id of the domain
problem = 'problem_example' # str | url or id of the problem
try:
# Submit Solution To Problem
api_response = api_instance.v1_submit_solution_to_problem(language, files, domain, problem)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProblemApi->v1_submit_solution_to_problem: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
language | str | ||
files | list[str] | ||
domain | str | url or id of the domain | |
problem | str | url or id of the problem |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProblemResp v1_update_problem(body, domain, problem)
Update Problem
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.ProblemApi(joj.horse_client.ApiClient(configuration))
body = joj.horse_client.ProblemEdit() # ProblemEdit |
domain = 'domain_example' # str | url or id of the domain
problem = 'problem_example' # str | url or id of the problem
try:
# Update Problem
api_response = api_instance.v1_update_problem(body, domain, problem)
pprint(api_response)
except ApiException as e:
print("Exception when calling ProblemApi->v1_update_problem: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | ProblemEdit | ||
domain | str | url or id of the domain | |
problem | str | url or id of the problem |
[Back to top] [Back to API list] [Back to Model list] [Back to README]