mentortools/libs/: access-server-connector-v2-1.0.0+2642596146 metadata and description

Simple index Newer version available

Mentortools Access Server

author OpenAPI Generator community
author_email OpenAPI Generator Community <team@openapitools.org>
description_content_type text/markdown
keywords OpenAPI, OpenAPI-Generator, Mentortools Access Server
project_urls
  • Repository, https://github.com/GIT_USER_ID/GIT_REPO_ID
requires_dist
  • python-dateutil>=2.8.2
  • aiohttp>=3.8.4
  • aiohttp-retry>=2.8.3
  • pydantic>=2.11
  • typing-extensions>=4.7.1
requires_python >=3.9
File Tox results History
access_server_connector_v2-1.0.0+2642596146-py3-none-any.whl
Size
135 KB
Type
Python Wheel
Python
3
access_server_connector_v2-1.0.0+2642596146.tar.gz
Size
62 KB
Type
Source

access-server-connector-v2

Mentortools service for Access Packages with lazy access resolution

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

Requirements.

Python 3.10+

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 access_server_connector_v2

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 access_server_connector_v2

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import access_server_connector_v2
from access_server_connector_v2.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 = access_server_connector_v2.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.

# Configure Bearer authorization: Bearer Authorization
configuration = access_server_connector_v2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: ServerName Authorization
configuration.api_key['ServerName Authorization'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ServerName Authorization'] = 'Bearer'


# Enter a context with an instance of the API client
async with access_server_connector_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = access_server_connector_v2.AccessApi(api_client)
    check_in = access_server_connector_v2.CheckIn() # CheckIn | 
    origin = 'origin_example' # str |  (optional)
    referer = 'referer_example' # str |  (optional)
    portal_id = 56 # int |  (optional)

    try:
        # Check a single resource
        api_response = await api_instance.check_v1_access_check_post(check_in, origin=origin, referer=referer, portal_id=portal_id)
        print("The response of AccessApi->check_v1_access_check_post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccessApi->check_v1_access_check_post: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AccessApi check_v1_access_check_post POST /v1/access/check Check a single resource
AccessApi courses_summary_v1_access_users_member_id_courses_get GET /v1/access/users/{member_id}/courses List a member's course access summary
AccessApi resolve_v1_access_resolve_post POST /v1/access/resolve Resolve a resource tree
AccessApi tree_v1_access_users_member_id_courses_course_id_tree_post POST /v1/access/users/{member_id}/courses/{course_id}/tree Resolve a course access tree
AdminApi consume_v1_admin_consume_post POST /v1/admin/consume Apply an access.order-events payload
AdminApi health_health_get GET /health Health check
IndividualApi batch_overrides_v1_individual_overrides_batch_post POST /v1/individual/overrides:batch Batch-write per-member access overrides
OwnershipApi deactivate_v1_ownership_reason_id_deactivate_post POST /v1/ownership/{reason_id}/deactivate Deactivate (revoke) an ownership reason
OwnershipApi grant_v1_ownership_grant_post POST /v1/ownership/grant Manually grant an access package
OwnershipApi member_packages_v1_ownership_packages_post POST /v1/ownership/packages List the access packages a member owns (with count)
OwnershipApi ownership_list_v1_ownership_list_post POST /v1/ownership/list List a member's ownership reasons
PackagesApi count_members_v1_packages_access_package_id_members_count_get GET /v1/packages/{access_package_id}/members/count Count members who have access to this package
PackagesApi count_packages_v1_packages_count_get GET /v1/packages/count Count a portal's access packages
PackagesApi create_package_v1_packages_post POST /v1/packages Create an access package
PackagesApi get_package_by_slug_v1_packages_by_slug_slug_get GET /v1/packages/by-slug/{slug} Get public package data by its direct-link slug (unauthenticated)
PackagesApi get_package_v1_packages_access_package_id_get GET /v1/packages/{access_package_id} Get a single access package (with its rules)
PackagesApi get_rules_v1_packages_access_package_id_rules_get GET /v1/packages/{access_package_id}/rules List a package's access rules
PackagesApi link_product_v1_packages_access_package_id_products_put PUT /v1/packages/{access_package_id}/products Link a marketplace product to a package
PackagesApi list_members_v1_packages_access_package_id_members_get GET /v1/packages/{access_package_id}/members List members who have access to this package (paginated)
PackagesApi list_packages_v1_packages_get GET /v1/packages List a portal's access packages (paginated)
PackagesApi patch_package_v1_packages_access_package_id_patch PATCH /v1/packages/{access_package_id} Toggle is_active / is_locked
PackagesApi set_rule_v1_packages_access_package_id_rules_put PUT /v1/packages/{access_package_id}/rules Set an access rule on a package

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

ServerName Authorization

Bearer Authorization

Author