All URIs are relative to https://leetcode.com
Method | HTTP request | Description |
---|---|---|
api_problems_topic_get | GET /api/problems/{topic}/ | |
graphql_post | POST /graphql | |
problems_problem_interpret_solution_post | POST /problems/{problem}/interpret_solution/ | |
problems_problem_submit_post | POST /problems/{problem}/submit/ | |
submissions_detail_id_check_get | GET /submissions/detail/{id}/check/ |
Problems api_problems_topic_get(topic)
from __future__ import print_function
import time
import leetcode
from leetcode.rest import ApiException
from pprint import pprint
# Configure API key authorization: cookieCSRF
configuration = leetcode.Configuration()
configuration.api_key['csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['csrftoken'] = 'Bearer'
# Configure API key authorization: cookieSession
configuration = leetcode.Configuration()
configuration.api_key['LEETCODE_SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['LEETCODE_SESSION'] = 'Bearer'
# Configure API key authorization: headerCSRF
configuration = leetcode.Configuration()
configuration.api_key['x-csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-csrftoken'] = 'Bearer'
# Configure API key authorization: referer
configuration = leetcode.Configuration()
configuration.api_key['Referer'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'
# create an instance of the API class
api_instance = leetcode.DefaultApi(leetcode.ApiClient(configuration))
topic = 'topic_example' # str |
try:
api_response = api_instance.api_problems_topic_get(topic)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->api_problems_topic_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
topic | str |
cookieCSRF, cookieSession, headerCSRF, referer
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GraphqlResponse graphql_post(body=body)
from __future__ import print_function
import time
import leetcode
from leetcode.rest import ApiException
from pprint import pprint
# Configure API key authorization: cookieCSRF
configuration = leetcode.Configuration()
configuration.api_key['csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['csrftoken'] = 'Bearer'
# Configure API key authorization: cookieSession
configuration = leetcode.Configuration()
configuration.api_key['LEETCODE_SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['LEETCODE_SESSION'] = 'Bearer'
# Configure API key authorization: headerCSRF
configuration = leetcode.Configuration()
configuration.api_key['x-csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-csrftoken'] = 'Bearer'
# Configure API key authorization: referer
configuration = leetcode.Configuration()
configuration.api_key['Referer'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'
# create an instance of the API class
api_instance = leetcode.DefaultApi(leetcode.ApiClient(configuration))
body = leetcode.GraphqlQuery() # GraphqlQuery | GraphQL query (optional)
try:
api_response = api_instance.graphql_post(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->graphql_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | GraphqlQuery | GraphQL query | [optional] |
cookieCSRF, cookieSession, headerCSRF, referer
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Interpretation problems_problem_interpret_solution_post(problem, body=body)
from __future__ import print_function
import time
import leetcode
from leetcode.rest import ApiException
from pprint import pprint
# Configure API key authorization: cookieCSRF
configuration = leetcode.Configuration()
configuration.api_key['csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['csrftoken'] = 'Bearer'
# Configure API key authorization: cookieSession
configuration = leetcode.Configuration()
configuration.api_key['LEETCODE_SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['LEETCODE_SESSION'] = 'Bearer'
# Configure API key authorization: headerCSRF
configuration = leetcode.Configuration()
configuration.api_key['x-csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-csrftoken'] = 'Bearer'
# Configure API key authorization: referer
configuration = leetcode.Configuration()
configuration.api_key['Referer'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'
# create an instance of the API class
api_instance = leetcode.DefaultApi(leetcode.ApiClient(configuration))
problem = 'problem_example' # str |
body = leetcode.TestSubmission() # TestSubmission | Solution to test (optional)
try:
api_response = api_instance.problems_problem_interpret_solution_post(problem, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->problems_problem_interpret_solution_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
problem | str | ||
body | TestSubmission | Solution to test | [optional] |
cookieCSRF, cookieSession, headerCSRF, referer
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubmissionId problems_problem_submit_post(problem, body=body)
from __future__ import print_function
import time
import leetcode
from leetcode.rest import ApiException
from pprint import pprint
# Configure API key authorization: cookieCSRF
configuration = leetcode.Configuration()
configuration.api_key['csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['csrftoken'] = 'Bearer'
# Configure API key authorization: cookieSession
configuration = leetcode.Configuration()
configuration.api_key['LEETCODE_SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['LEETCODE_SESSION'] = 'Bearer'
# Configure API key authorization: headerCSRF
configuration = leetcode.Configuration()
configuration.api_key['x-csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-csrftoken'] = 'Bearer'
# Configure API key authorization: referer
configuration = leetcode.Configuration()
configuration.api_key['Referer'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'
# create an instance of the API class
api_instance = leetcode.DefaultApi(leetcode.ApiClient(configuration))
problem = 'problem_example' # str |
body = leetcode.Submission() # Submission | Solution to test (optional)
try:
api_response = api_instance.problems_problem_submit_post(problem, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->problems_problem_submit_post: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
problem | str | ||
body | Submission | Solution to test | [optional] |
cookieCSRF, cookieSession, headerCSRF, referer
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 submissions_detail_id_check_get(id)
from __future__ import print_function
import time
import leetcode
from leetcode.rest import ApiException
from pprint import pprint
# Configure API key authorization: cookieCSRF
configuration = leetcode.Configuration()
configuration.api_key['csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['csrftoken'] = 'Bearer'
# Configure API key authorization: cookieSession
configuration = leetcode.Configuration()
configuration.api_key['LEETCODE_SESSION'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['LEETCODE_SESSION'] = 'Bearer'
# Configure API key authorization: headerCSRF
configuration = leetcode.Configuration()
configuration.api_key['x-csrftoken'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-csrftoken'] = 'Bearer'
# Configure API key authorization: referer
configuration = leetcode.Configuration()
configuration.api_key['Referer'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Referer'] = 'Bearer'
# create an instance of the API class
api_instance = leetcode.DefaultApi(leetcode.ApiClient(configuration))
id = leetcode.Id() # Id | Either submission id (int) or interpretation id (string)
try:
api_response = api_instance.submissions_detail_id_check_get(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->submissions_detail_id_check_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | Id | Either submission id (int) or interpretation id (string) |
cookieCSRF, cookieSession, headerCSRF, referer
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]