Skip to content

energywebfoundation/ddhub_gateway_client_lib

Repository files navigation

ddhub-gateway-client-lib

DDHub Client Gateway Library

This Python library connects to DDHub Client Gateway.

Requirements.

Python >=3.6

Installation & Usage

pip install

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

pip install git+https://github.com/energywebfoundation/ddhub_gateway_client_lib.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/energywebfoundation/ddhub_gateway_client_lib.git)

Then import the package:

import ddhub_gateway_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 ddhub_gateway_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import ddhub_gateway_client
from pprint import pprint
from ddhub_gateway_client.api import applications_api
from ddhub_gateway_client.model.application_dto import ApplicationDTO
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = ddhub_gateway_client.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with ddhub_gateway_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = applications_api.ApplicationsApi(api_client)
    role_name = "topiccreator" # str | 

    try:
        api_response = api_instance.applications_controller_get_applications(role_name)
        pprint(api_response)
    except ddhub_gateway_client.ApiException as e:
        print("Exception when calling ApplicationsApi->applications_controller_get_applications: %s\n" % e)

Examples

See potential use cases in the examples directory.

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
ApplicationsApi applications_controller_get_applications GET /api/v2/applications
ApplicationsApi applications_controller_get_applications_by_namespace GET /api/v2/applications/{namespace}
ChannelsApi channel_controller_create POST /api/v2/channels
ChannelsApi channel_controller_delete DELETE /api/v2/channels/{fqcn}
ChannelsApi channel_controller_get GET /api/v2/channels/{fqcn}
ChannelsApi channel_controller_get_by_type GET /api/v2/channels
ChannelsApi channel_controller_get_qualified_dids GET /api/v2/channels/{fqcn}/qualifiedDids
ChannelsApi channel_controller_refresh_did POST /api/v2/channels/refresh
ChannelsApi channel_controller_update PUT /api/v2/channels/{fqcn}
EnrolmentApi enrolment_controller_get GET /api/v2/enrol
EnrolmentApi enrolment_controller_init POST /api/v2/enrol
GatewayApi gateway_controller_get GET /api/v2/gateway
GatewayConfigurationApi certificate_controller_save POST /api/v2/certificate
GatewayConfigurationApi keys_controller_derive POST /api/v2/keys
HealthApi health_controller_check GET /api/v2/health
IdentityApi identity_controller_get GET /api/v2/identity
IdentityApi identity_controller_get_claims GET /api/v2/identity/claims
IdentityApi identity_controller_post POST /api/v2/identity
MessagingApi message_controlller_create POST /api/v2/messages
MessagingApi message_controlller_download_message GET /api/v2/messages/download
MessagingApi message_controlller_get_message GET /api/v2/messages
MessagingApi message_controlller_upload_file POST /api/v2/messages/upload
TopicsApi topics_controller_delete_topics DELETE /api/v2/topics/{id}
TopicsApi topics_controller_delete_topics_by_version DELETE /api/v2/topics/{id}/versions/{versionNumber}
TopicsApi topics_controller_get_topic_history_by_id_and_version GET /api/v2/topics/{id}/versions/{versionNumber}
TopicsApi topics_controller_get_topics GET /api/v2/topics
TopicsApi topics_controller_get_topics_by_search GET /api/v2/topics/search
TopicsApi topics_controller_get_topics_count_by_owner GET /api/v2/topics/count
TopicsApi topics_controller_get_topics_history_by_id GET /api/v2/topics/{id}/versions
TopicsApi topics_controller_post_topics POST /api/v2/topics
TopicsApi topics_controller_update_topics PUT /api/v2/topics/{id}
TopicsApi topics_controller_update_topics_by_id_and_version PUT /api/v2/topics/{id}/versions/{versionNumber}
DefaultApi cron_controller_get_jobs_results GET /api/v2/cron

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

License

This project is licensed under GNU General Public License Version 3 (GPLv3)