Skip to content

SorryDB/sorrydb-api-sdk

Repository files navigation

sorrydb-api-client

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

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

  • API version: 0.1.0
  • Package version: 1.0.0
  • Generator version: 7.17.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

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 sorrydb_api_client

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 sorrydb_api_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import sorrydb_api_client
from sorrydb_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = sorrydb_api_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]


# Enter a context with an instance of the API client
with sorrydb_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sorrydb_api_client.AuthApi(api_client)
    password_change = sorrydb_api_client.PasswordChange() # PasswordChange | 

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

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AuthApi change_password_auth_change_password_post POST /auth/change-password Change Password
AuthApi get_current_user_info_auth_me_get GET /auth/me Get Current User Info
AuthApi login_auth_token_post POST /auth/token Login
AuthApi register_auth_register_post POST /auth/register Register
DefaultApi add_sorry_sorries_post POST /sorries/ Add Sorry
DefaultApi get_agent_agents_agent_id_get GET /agents/{agent_id} Get Agent
DefaultApi get_agent_challenges_agents_agent_id_challenges_get GET /agents/{agent_id}/challenges/ Get Agent Challenges
DefaultApi get_leaderboard_leaderboard_get GET /leaderboard Get Leaderboard
DefaultApi list_agents_agents_get GET /agents/ List Agents
DefaultApi register_agent_agents_post POST /agents/ Register Agent
DefaultApi request_sorry_challenge_agents_agent_id_challenges_post POST /agents/{agent_id}/challenges/ Request Sorry Challenge
DefaultApi submit_proof_agents_agent_id_challenges_challenge_id_submit_post POST /agents/{agent_id}/challenges/{challenge_id}/submit/ Submit Proof
DefaultApi update_agent_agents_agent_id_patch PATCH /agents/{agent_id} Update Agent

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

OAuth2PasswordBearer

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes: N/A

Author

About

Automatically generated Python sdk for sorrydb api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •