Skip to content

wasm-oj/woj-py

Repository files navigation

woj

You can interact with WASM OJ Wonderland through this API

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.1
  • Package version: 0.0.2
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

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 woj

Setuptools

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 woj

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import time
import woj
from woj.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://woj.csie.cool
# See configuration.py for a list of all supported configuration parameters.
configuration = woj.Configuration(
    host = "https://woj.csie.cool"
)



# Enter a context with an instance of the API client
with woj.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = woj.AuthApi(api_client)
    token = 'token_example' # str | 

    try:
        api_response = api_instance.api_auth_get(token)
        print("The response of AuthApi->api_auth_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthApi->api_auth_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://woj.csie.cool

Class Method HTTP request Description
AuthApi api_auth_get GET /api/auth
AuthApi api_auth_send_post POST /api/auth/send
ProblemApi api_problem_get GET /api/problem
ProblemApi api_problem_id_get GET /api/problem/{id}
SubmissionApi api_submission_get GET /api/submission
SubmissionApi api_submission_id_get GET /api/submission/{id}
SubmissionApi submit POST /api/submission
DefaultApi api_me_get GET /api/me
DefaultApi api_sys_get GET /api/sys

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

jacob@csie.cool

Releases

No releases published

Packages

No packages published

Languages