404
+ +Page not found
+ + +diff --git a/docs/payments.md b/docs/payments.md index 63b1a29..cb6dff2 100644 --- a/docs/payments.md +++ b/docs/payments.md @@ -33,6 +33,8 @@ Methods: - `get_asset_ddo`: Gets the asset DDO. - `get_subscription_balance`: Gets the subscription balance. - `get_service_token`: Gets the service token. + - `get_subscription_associated_services`: Gets the subscription associated services. + - `get_subscription_associated_files`: Gets the subscription associated files. - `get_subscription_details`: Gets the subscription details. - `get_service_details`: Gets the service details. - `get_file_details`: Gets the file details. @@ -40,7 +42,7 @@ Methods: - + ### method `__init__` @@ -63,7 +65,7 @@ __init__( --- - + ### method `create_file` @@ -133,7 +135,7 @@ Creates a new file. --- - + ### method `create_service` @@ -201,7 +203,7 @@ Creates a new service. --- - + ### method `create_subscription` @@ -239,7 +241,7 @@ Creates a new subscription. --- - + ### method `get_asset_ddo` @@ -263,7 +265,7 @@ Gets the asset DDO. --- - + ### method `get_checkout_subscription` @@ -287,7 +289,7 @@ Gets the checkout subscription. --- - + ### method `get_file_details` @@ -311,7 +313,7 @@ Gets the file details. --- - + ### method `get_service_details` @@ -335,7 +337,7 @@ Gets the service details. --- - + ### method `get_service_token` @@ -359,7 +361,7 @@ Gets the service token. --- - + ### method `get_subscription_associated_files` @@ -383,7 +385,7 @@ Gets the subscription associated files. --- - + ### method `get_subscription_associated_services` @@ -407,7 +409,7 @@ Gets the subscription associated services. --- - + ### method `get_subscription_balance` @@ -435,7 +437,7 @@ Gets the subscription balance. --- - + ### method `get_subscription_details` diff --git a/site/404.html b/site/404.html new file mode 100644 index 0000000..53c9283 --- /dev/null +++ b/site/404.html @@ -0,0 +1,117 @@ + + +
+ + + + +Page not found
+ + +environments
Environment
Enum class to define the different environments
+Attributes:
+local
: Local environment appStaging
: Staging environment appTesting
: Testing environment appArbitrum
: Arbitrum environment appGnosis
: Gnosis environment appMatic
: Matic environment This file was automatically generated via lazydocs.
+ +environments
payments
utils
environments.Environment
: Enum class to define the different environmentspayments.Payments
: A class representing a payment system.utils.snake_to_camel
: Convert snake_case to camelCase.This file was automatically generated via lazydocs.
+ +payments
Payments
A class representing a payment system.
+Attributes:
+session_key
(str): The session key for authentication. environment
(Environment): The environment for the payment system. marketplace_auth_token
(str, optional): The marketplace authentication token. app_id
(str, optional): The application ID. version
(str, optional): The version of the payment system. Methods:
+ - create_ubscription
: Creates a new subscription.
+ - create_service
: Creates a new service.
+ - create_file
: Creates a new file.
+ - get_asset_ddo
: Gets the asset DDO.
+ - get_subscription_balance
: Gets the subscription balance.
+ - get_service_token
: Gets the service token.
+ - get_subscription_associated_services
: Gets the subscription associated services.
+ - get_subscription_associated_files
: Gets the subscription associated files.
+ - get_subscription_details
: Gets the subscription details.
+ - get_service_details
: Gets the service details.
+ - get_file_details
: Gets the file details.
+ - get_checkout_subscription
: Gets the checkout subscription.
__init__
__init__(
+ session_key: str,
+ environment: Environment,
+ marketplace_auth_token: Optional[str] = None,
+ app_id: Optional[str] = None,
+ version: Optional[str] = None
+)
+
+create_file
create_file(
+ subscription_did: str,
+ asset_type: str,
+ name: str,
+ description: str,
+ files: List[dict],
+ price: int,
+ token_address: str,
+ data_schema: Optional[str] = None,
+ sample_code: Optional[str] = None,
+ files_format: Optional[str] = None,
+ usage_example: Optional[str] = None,
+ programming_language: Optional[str] = None,
+ framework: Optional[str] = None,
+ task: Optional[str] = None,
+ training_details: Optional[str] = None,
+ variations: Optional[str] = None,
+ fine_tunable: Optional[bool] = None,
+ amount_of_credits: Optional[int] = None,
+ min_credits_to_charge: Optional[int] = None,
+ max_credits_to_charge: Optional[int] = None,
+ curation: Optional[dict] = None,
+ duration: Optional[int] = None,
+ tags: Optional[List[str]] = None
+)
+
+Creates a new file.
+Args:
+subscription_did
(str): The DID of the subscription. asset_type
(str): The type of the asset. -> 'algorithm' | 'model' | 'dataset' | 'file' name
(str): The name of the file. description
(str): The description of the file. files
(List[dict]): The files of the file. price
(int): The price of the file. token_address
(str): The token address. data_schema
(str, optional): The data schema of the file. sample_code
(str, optional): The sample code of the file. files_format
(str, optional): The files format of the file. usage_example
(str, optional): The usage example of the file. programming_language
(str, optional): The programming language of the file. framework
(str, optional): The framework of the file. task
(str, optional): The task of the file. training_details
(str, optional): The training details of the file. variations
(str, optional): The variations of the file. fine_tunable
(bool, optional): The fine tunable of the file. amount_of_credits
(int, optional): The amount of credits for the file. min_credits_to_charge
(int, optional): The minimum credits to charge for the file. max_credits_to_charge
(int, optional): The maximum credits to charge for the file. curation
(dict, optional): The curation information of the file. duration
(int, optional): The duration of the file. tags
(List[str], optional): The tags associated with the file. Returns:
+Response
: The response from the API call. create_service
create_service(
+ subscription_did: str,
+ name: str,
+ description: str,
+ price: int,
+ token_address: str,
+ service_charge_type: str,
+ auth_type: str,
+ amount_of_credits: Optional[int] = None,
+ min_credits_to_charge: Optional[int] = None,
+ max_credits_to_charge: Optional[int] = None,
+ username: Optional[str] = None,
+ password: Optional[str] = None,
+ token: Optional[str] = None,
+ endpoints: Optional[List[dict]] = None,
+ open_endpoints: Optional[List[str]] = None,
+ open_api_url: Optional[str] = None,
+ integration: Optional[str] = None,
+ sample_link: Optional[str] = None,
+ api_description: Optional[str] = None,
+ curation: Optional[dict] = None,
+ duration: Optional[int] = None,
+ tags: Optional[List[str]] = None
+)
+
+Creates a new service.
+Args:
+subscription_did
(str): The DID of the subscription. name
(str): The name of the service. description
(str): The description of the service. price
(int): The price of the service. token_address
(str): The token address. service_charge_type
(str): The charge type of the service. -> 'fixed' | 'dynamic' auth_type
(str): The authentication type of the service. -> 'none' | 'basic' | 'oauth' amount_of_credits
(int, optional): The amount of credits for the service. min_credits_to_charge
(int, optional): The minimum credits to charge for the service. max_credits_to_charge
(int, optional): The maximum credits to charge for the service. username
(str, optional): The username for authentication. password
(str, optional): The password for authentication. token
(str, optional): The token for authentication. endpoints
(List[dict], optional): The endpoints of the service. open_endpoints
(List[str], optional): The open endpoints of the service. -> [{"post": "https://api.example.app/api/v1/example"}] open_api_url
(str, optional): The OpenAPI URL of the service. integration
(str, optional): The integration type of the service. sample_link
(str, optional): The sample link of the service. api_description
(str, optional): The API description of the service. curation
(dict, optional): The curation information of the service. duration
(int, optional): The duration of the service. tags
(List[str], optional): The tags associated with the service. Returns:
+Response
: The response from the API call. create_subscription
create_subscription(
+ name: str,
+ description: str,
+ price: int,
+ token_address: str,
+ amount_of_credits: Optional[int],
+ duration: Optional[int],
+ tags: Optional[List[str]]
+)
+
+Creates a new subscription.
+Args:
+name
(str): The name of the subscription. description
(str): The description of the subscription. price
(int): The price of the subscription. token_address
(str): The token address. amount_of_credits
(int, optional): The amount of credits for the subscription. duration
(int, optional): The duration of the subscription. tags
(List[str], optional): The tags associated with the subscription. Returns:
+Response
: The response from the API call. get_asset_ddo
get_asset_ddo(did: str)
+
+Gets the asset DDO.
+Args:
+did
(str): The DID of the asset. Returns:
+Response
: The response from the API call. get_checkout_subscription
get_checkout_subscription(subscription_did: str)
+
+Gets the checkout subscription.
+Args:
+subscription_did
(str): The DID of the subscription. Returns:
+Response
: The url of the checkout subscription. get_file_details
get_file_details(file_did: str)
+
+Gets the file details.
+Args:
+file_did
(str): The DID of the file. Returns:
+Response
: The url of the file details. get_service_details
get_service_details(service_did: str)
+
+Gets the service details.
+Args:
+service_did
(str): The DID of the service. Returns:
+Response
: The url of the service details. get_service_token
get_service_token(service_did: str)
+
+Gets the service token.
+Args:
+service_did
(str): The DID of the service. Returns:
+Response
: The response from the API call. get_subscription_associated_files
get_subscription_associated_files(subscription_did: str)
+
+Gets the subscription associated files.
+Args:
+subscription_did
(str): The DID of the subscription. Returns:
+Response
: List of DIDs of the associated files. get_subscription_associated_services
get_subscription_associated_services(subscription_did: str)
+
+Gets the subscription associated services.
+Args:
+subscription_did
(str): The DID of the subscription. Returns:
+Response
: List of DIDs of the associated services. get_subscription_balance
get_subscription_balance(
+ subscription_did: str,
+ account_address: Optional[str] = None
+)
+
+Gets the subscription balance.
+Args:
+subscription_did
(str): The DID of the subscription. account_address
: Optional[str]: The account address. Returns:
+Response
: The response from the API call. get_subscription_details
get_subscription_details(subscription_did: str)
+
+Gets the subscription details.
+Args:
+subscription_did
(str): The DID of the subscription. Returns:
+Response
: The url of the subscription details. This file was automatically generated via lazydocs.
+ +' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/site/search/search_index.json b/site/search/search_index.json new file mode 100644 index 0000000..2d40e89 --- /dev/null +++ b/site/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"API Overview Modules environments payments utils Classes environments.Environment : Enum class to define the different environments payments.Payments : A class representing a payment system. Functions utils.snake_to_camel : Convert snake_case to camelCase. This file was automatically generated via lazydocs .","title":"Overview"},{"location":"#api-overview","text":"","title":"API Overview"},{"location":"#modules","text":"environments payments utils","title":"Modules"},{"location":"#classes","text":"environments.Environment : Enum class to define the different environments payments.Payments : A class representing a payment system.","title":"Classes"},{"location":"#functions","text":"utils.snake_to_camel : Convert snake_case to camelCase. This file was automatically generated via lazydocs .","title":"Functions"},{"location":"environments/","text":"module environments class Environment Enum class to define the different environments Attributes: local : Local environment appStaging : Staging environment appTesting : Testing environment appArbitrum : Arbitrum environment appGnosis : Gnosis environment appMatic : Matic environment This file was automatically generated via lazydocs .","title":"Environments"},{"location":"environments/#module-environments","text":"","title":"module environments"},{"location":"environments/#class-environment","text":"Enum class to define the different environments Attributes: local : Local environment appStaging : Staging environment appTesting : Testing environment appArbitrum : Arbitrum environment appGnosis : Gnosis environment appMatic : Matic environment This file was automatically generated via lazydocs .","title":"class Environment"},{"location":"payments/","text":"module payments class Payments A class representing a payment system. Attributes: session_key (str): The session key for authentication. environment (Environment): The environment for the payment system. marketplace_auth_token (str, optional): The marketplace authentication token. app_id (str, optional): The application ID. version (str, optional): The version of the payment system. Methods: - create_ubscription : Creates a new subscription. - create_service : Creates a new service. - create_file : Creates a new file. - get_asset_ddo : Gets the asset DDO. - get_subscription_balance : Gets the subscription balance. - get_service_token : Gets the service token. - get_subscription_associated_services : Gets the subscription associated services. - get_subscription_associated_files : Gets the subscription associated files. - get_subscription_details : Gets the subscription details. - get_service_details : Gets the service details. - get_file_details : Gets the file details. - get_checkout_subscription : Gets the checkout subscription. method __init__ __init__( session_key: str, environment: Environment, marketplace_auth_token: Optional[str] = None, app_id: Optional[str] = None, version: Optional[str] = None ) method create_file create_file( subscription_did: str, asset_type: str, name: str, description: str, files: List[dict], price: int, token_address: str, data_schema: Optional[str] = None, sample_code: Optional[str] = None, files_format: Optional[str] = None, usage_example: Optional[str] = None, programming_language: Optional[str] = None, framework: Optional[str] = None, task: Optional[str] = None, training_details: Optional[str] = None, variations: Optional[str] = None, fine_tunable: Optional[bool] = None, amount_of_credits: Optional[int] = None, min_credits_to_charge: Optional[int] = None, max_credits_to_charge: Optional[int] = None, curation: Optional[dict] = None, duration: Optional[int] = None, tags: Optional[List[str]] = None ) Creates a new file. Args: subscription_did (str): The DID of the subscription. asset_type (str): The type of the asset. -> 'algorithm' | 'model' | 'dataset' | 'file' name (str): The name of the file. description (str): The description of the file. files (List[dict]): The files of the file. price (int): The price of the file. token_address (str): The token address. data_schema (str, optional): The data schema of the file. sample_code (str, optional): The sample code of the file. files_format (str, optional): The files format of the file. usage_example (str, optional): The usage example of the file. programming_language (str, optional): The programming language of the file. framework (str, optional): The framework of the file. task (str, optional): The task of the file. training_details (str, optional): The training details of the file. variations (str, optional): The variations of the file. fine_tunable (bool, optional): The fine tunable of the file. amount_of_credits (int, optional): The amount of credits for the file. min_credits_to_charge (int, optional): The minimum credits to charge for the file. max_credits_to_charge (int, optional): The maximum credits to charge for the file. curation (dict, optional): The curation information of the file. duration (int, optional): The duration of the file. tags (List[str], optional): The tags associated with the file. Returns: Response : The response from the API call. method create_service create_service( subscription_did: str, name: str, description: str, price: int, token_address: str, service_charge_type: str, auth_type: str, amount_of_credits: Optional[int] = None, min_credits_to_charge: Optional[int] = None, max_credits_to_charge: Optional[int] = None, username: Optional[str] = None, password: Optional[str] = None, token: Optional[str] = None, endpoints: Optional[List[dict]] = None, open_endpoints: Optional[List[str]] = None, open_api_url: Optional[str] = None, integration: Optional[str] = None, sample_link: Optional[str] = None, api_description: Optional[str] = None, curation: Optional[dict] = None, duration: Optional[int] = None, tags: Optional[List[str]] = None ) Creates a new service. Args: subscription_did (str): The DID of the subscription. name (str): The name of the service. description (str): The description of the service. price (int): The price of the service. token_address (str): The token address. service_charge_type (str): The charge type of the service. -> 'fixed' | 'dynamic' auth_type (str): The authentication type of the service. -> 'none' | 'basic' | 'oauth' amount_of_credits (int, optional): The amount of credits for the service. min_credits_to_charge (int, optional): The minimum credits to charge for the service. max_credits_to_charge (int, optional): The maximum credits to charge for the service. username (str, optional): The username for authentication. password (str, optional): The password for authentication. token (str, optional): The token for authentication. endpoints (List[dict], optional): The endpoints of the service. open_endpoints (List[str], optional): The open endpoints of the service. -> [{\"post\": \"https://api.example.app/api/v1/example\"}] open_api_url (str, optional): The OpenAPI URL of the service. integration (str, optional): The integration type of the service. sample_link (str, optional): The sample link of the service. api_description (str, optional): The API description of the service. curation (dict, optional): The curation information of the service. duration (int, optional): The duration of the service. tags (List[str], optional): The tags associated with the service. Returns: Response : The response from the API call. method create_subscription create_subscription( name: str, description: str, price: int, token_address: str, amount_of_credits: Optional[int], duration: Optional[int], tags: Optional[List[str]] ) Creates a new subscription. Args: name (str): The name of the subscription. description (str): The description of the subscription. price (int): The price of the subscription. token_address (str): The token address. amount_of_credits (int, optional): The amount of credits for the subscription. duration (int, optional): The duration of the subscription. tags (List[str], optional): The tags associated with the subscription. Returns: Response : The response from the API call. method get_asset_ddo get_asset_ddo(did: str) Gets the asset DDO. Args: did (str): The DID of the asset. Returns: Response : The response from the API call. method get_checkout_subscription get_checkout_subscription(subscription_did: str) Gets the checkout subscription. Args: subscription_did (str): The DID of the subscription. Returns: Response : The url of the checkout subscription. method get_file_details get_file_details(file_did: str) Gets the file details. Args: file_did (str): The DID of the file. Returns: Response : The url of the file details. method get_service_details get_service_details(service_did: str) Gets the service details. Args: service_did (str): The DID of the service. Returns: Response : The url of the service details. method get_service_token get_service_token(service_did: str) Gets the service token. Args: service_did (str): The DID of the service. Returns: Response : The response from the API call. method get_subscription_associated_files get_subscription_associated_files(subscription_did: str) Gets the subscription associated files. Args: subscription_did (str): The DID of the subscription. Returns: Response : List of DIDs of the associated files. method get_subscription_associated_services get_subscription_associated_services(subscription_did: str) Gets the subscription associated services. Args: subscription_did (str): The DID of the subscription. Returns: Response : List of DIDs of the associated services. method get_subscription_balance get_subscription_balance( subscription_did: str, account_address: Optional[str] = None ) Gets the subscription balance. Args: subscription_did (str): The DID of the subscription. account_address : Optional[str]: The account address. Returns: Response : The response from the API call. method get_subscription_details get_subscription_details(subscription_did: str) Gets the subscription details. Args: subscription_did (str): The DID of the subscription. Returns: Response : The url of the subscription details. This file was automatically generated via lazydocs .","title":"Payments"},{"location":"payments/#module-payments","text":"","title":"module payments"},{"location":"payments/#class-payments","text":"A class representing a payment system. Attributes: session_key (str): The session key for authentication. environment (Environment): The environment for the payment system. marketplace_auth_token (str, optional): The marketplace authentication token. app_id (str, optional): The application ID. version (str, optional): The version of the payment system. Methods: - create_ubscription : Creates a new subscription. - create_service : Creates a new service. - create_file : Creates a new file. - get_asset_ddo : Gets the asset DDO. - get_subscription_balance : Gets the subscription balance. - get_service_token : Gets the service token. - get_subscription_associated_services : Gets the subscription associated services. - get_subscription_associated_files : Gets the subscription associated files. - get_subscription_details : Gets the subscription details. - get_service_details : Gets the service details. - get_file_details : Gets the file details. - get_checkout_subscription : Gets the checkout subscription.","title":"class Payments"},{"location":"payments/#method-__init__","text":"__init__( session_key: str, environment: Environment, marketplace_auth_token: Optional[str] = None, app_id: Optional[str] = None, version: Optional[str] = None )","title":"method __init__"},{"location":"payments/#method-create_file","text":"create_file( subscription_did: str, asset_type: str, name: str, description: str, files: List[dict], price: int, token_address: str, data_schema: Optional[str] = None, sample_code: Optional[str] = None, files_format: Optional[str] = None, usage_example: Optional[str] = None, programming_language: Optional[str] = None, framework: Optional[str] = None, task: Optional[str] = None, training_details: Optional[str] = None, variations: Optional[str] = None, fine_tunable: Optional[bool] = None, amount_of_credits: Optional[int] = None, min_credits_to_charge: Optional[int] = None, max_credits_to_charge: Optional[int] = None, curation: Optional[dict] = None, duration: Optional[int] = None, tags: Optional[List[str]] = None ) Creates a new file. Args: subscription_did (str): The DID of the subscription. asset_type (str): The type of the asset. -> 'algorithm' | 'model' | 'dataset' | 'file' name (str): The name of the file. description (str): The description of the file. files (List[dict]): The files of the file. price (int): The price of the file. token_address (str): The token address. data_schema (str, optional): The data schema of the file. sample_code (str, optional): The sample code of the file. files_format (str, optional): The files format of the file. usage_example (str, optional): The usage example of the file. programming_language (str, optional): The programming language of the file. framework (str, optional): The framework of the file. task (str, optional): The task of the file. training_details (str, optional): The training details of the file. variations (str, optional): The variations of the file. fine_tunable (bool, optional): The fine tunable of the file. amount_of_credits (int, optional): The amount of credits for the file. min_credits_to_charge (int, optional): The minimum credits to charge for the file. max_credits_to_charge (int, optional): The maximum credits to charge for the file. curation (dict, optional): The curation information of the file. duration (int, optional): The duration of the file. tags (List[str], optional): The tags associated with the file. Returns: Response : The response from the API call.","title":"method create_file"},{"location":"payments/#method-create_service","text":"create_service( subscription_did: str, name: str, description: str, price: int, token_address: str, service_charge_type: str, auth_type: str, amount_of_credits: Optional[int] = None, min_credits_to_charge: Optional[int] = None, max_credits_to_charge: Optional[int] = None, username: Optional[str] = None, password: Optional[str] = None, token: Optional[str] = None, endpoints: Optional[List[dict]] = None, open_endpoints: Optional[List[str]] = None, open_api_url: Optional[str] = None, integration: Optional[str] = None, sample_link: Optional[str] = None, api_description: Optional[str] = None, curation: Optional[dict] = None, duration: Optional[int] = None, tags: Optional[List[str]] = None ) Creates a new service. Args: subscription_did (str): The DID of the subscription. name (str): The name of the service. description (str): The description of the service. price (int): The price of the service. token_address (str): The token address. service_charge_type (str): The charge type of the service. -> 'fixed' | 'dynamic' auth_type (str): The authentication type of the service. -> 'none' | 'basic' | 'oauth' amount_of_credits (int, optional): The amount of credits for the service. min_credits_to_charge (int, optional): The minimum credits to charge for the service. max_credits_to_charge (int, optional): The maximum credits to charge for the service. username (str, optional): The username for authentication. password (str, optional): The password for authentication. token (str, optional): The token for authentication. endpoints (List[dict], optional): The endpoints of the service. open_endpoints (List[str], optional): The open endpoints of the service. -> [{\"post\": \"https://api.example.app/api/v1/example\"}] open_api_url (str, optional): The OpenAPI URL of the service. integration (str, optional): The integration type of the service. sample_link (str, optional): The sample link of the service. api_description (str, optional): The API description of the service. curation (dict, optional): The curation information of the service. duration (int, optional): The duration of the service. tags (List[str], optional): The tags associated with the service. Returns: Response : The response from the API call.","title":"method create_service"},{"location":"payments/#method-create_subscription","text":"create_subscription( name: str, description: str, price: int, token_address: str, amount_of_credits: Optional[int], duration: Optional[int], tags: Optional[List[str]] ) Creates a new subscription. Args: name (str): The name of the subscription. description (str): The description of the subscription. price (int): The price of the subscription. token_address (str): The token address. amount_of_credits (int, optional): The amount of credits for the subscription. duration (int, optional): The duration of the subscription. tags (List[str], optional): The tags associated with the subscription. Returns: Response : The response from the API call.","title":"method create_subscription"},{"location":"payments/#method-get_asset_ddo","text":"get_asset_ddo(did: str) Gets the asset DDO. Args: did (str): The DID of the asset. Returns: Response : The response from the API call.","title":"method get_asset_ddo"},{"location":"payments/#method-get_checkout_subscription","text":"get_checkout_subscription(subscription_did: str) Gets the checkout subscription. Args: subscription_did (str): The DID of the subscription. Returns: Response : The url of the checkout subscription.","title":"method get_checkout_subscription"},{"location":"payments/#method-get_file_details","text":"get_file_details(file_did: str) Gets the file details. Args: file_did (str): The DID of the file. Returns: Response : The url of the file details.","title":"method get_file_details"},{"location":"payments/#method-get_service_details","text":"get_service_details(service_did: str) Gets the service details. Args: service_did (str): The DID of the service. Returns: Response : The url of the service details.","title":"method get_service_details"},{"location":"payments/#method-get_service_token","text":"get_service_token(service_did: str) Gets the service token. Args: service_did (str): The DID of the service. Returns: Response : The response from the API call.","title":"method get_service_token"},{"location":"payments/#method-get_subscription_associated_files","text":"get_subscription_associated_files(subscription_did: str) Gets the subscription associated files. Args: subscription_did (str): The DID of the subscription. Returns: Response : List of DIDs of the associated files.","title":"method get_subscription_associated_files"},{"location":"payments/#method-get_subscription_associated_services","text":"get_subscription_associated_services(subscription_did: str) Gets the subscription associated services. Args: subscription_did (str): The DID of the subscription. Returns: Response : List of DIDs of the associated services.","title":"method get_subscription_associated_services"},{"location":"payments/#method-get_subscription_balance","text":"get_subscription_balance( subscription_did: str, account_address: Optional[str] = None ) Gets the subscription balance. Args: subscription_did (str): The DID of the subscription. account_address : Optional[str]: The account address. Returns: Response : The response from the API call.","title":"method get_subscription_balance"},{"location":"payments/#method-get_subscription_details","text":"get_subscription_details(subscription_did: str) Gets the subscription details. Args: subscription_did (str): The DID of the subscription. Returns: Response : The url of the subscription details. This file was automatically generated via lazydocs .","title":"method get_subscription_details"},{"location":"utils/","text":"module utils function snake_to_camel snake_to_camel(name) Convert snake_case to camelCase. :param name: str :return: str This file was automatically generated via lazydocs .","title":"Utils"},{"location":"utils/#module-utils","text":"","title":"module utils"},{"location":"utils/#function-snake_to_camel","text":"snake_to_camel(name) Convert snake_case to camelCase. :param name: str :return: str This file was automatically generated via lazydocs .","title":"function snake_to_camel"}]} \ No newline at end of file diff --git a/site/search/worker.js b/site/search/worker.js new file mode 100644 index 0000000..8628dbc --- /dev/null +++ b/site/search/worker.js @@ -0,0 +1,133 @@ +var base_path = 'function' === typeof importScripts ? '.' : '/search/'; +var allowSearch = false; +var index; +var documents = {}; +var lang = ['en']; +var data; + +function getScript(script, callback) { + console.log('Loading script: ' + script); + $.getScript(base_path + script).done(function () { + callback(); + }).fail(function (jqxhr, settings, exception) { + console.log('Error: ' + exception); + }); +} + +function getScriptsInOrder(scripts, callback) { + if (scripts.length === 0) { + callback(); + return; + } + getScript(scripts[0], function() { + getScriptsInOrder(scripts.slice(1), callback); + }); +} + +function loadScripts(urls, callback) { + if( 'function' === typeof importScripts ) { + importScripts.apply(null, urls); + callback(); + } else { + getScriptsInOrder(urls, callback); + } +} + +function onJSONLoaded () { + data = JSON.parse(this.responseText); + var scriptsToLoad = ['lunr.js']; + if (data.config && data.config.lang && data.config.lang.length) { + lang = data.config.lang; + } + if (lang.length > 1 || lang[0] !== "en") { + scriptsToLoad.push('lunr.stemmer.support.js'); + if (lang.length > 1) { + scriptsToLoad.push('lunr.multi.js'); + } + if (lang.includes("ja") || lang.includes("jp")) { + scriptsToLoad.push('tinyseg.js'); + } + for (var i=0; i < lang.length; i++) { + if (lang[i] != 'en') { + scriptsToLoad.push(['lunr', lang[i], 'js'].join('.')); + } + } + } + loadScripts(scriptsToLoad, onScriptsLoaded); +} + +function onScriptsLoaded () { + console.log('All search scripts loaded, building Lunr index...'); + if (data.config && data.config.separator && data.config.separator.length) { + lunr.tokenizer.separator = new RegExp(data.config.separator); + } + + if (data.index) { + index = lunr.Index.load(data.index); + data.docs.forEach(function (doc) { + documents[doc.location] = doc; + }); + console.log('Lunr pre-built index loaded, search ready'); + } else { + index = lunr(function () { + if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) { + this.use(lunr[lang[0]]); + } else if (lang.length > 1) { + this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility + } + this.field('title'); + this.field('text'); + this.ref('location'); + + for (var i=0; i < data.docs.length; i++) { + var doc = data.docs[i]; + this.add(doc); + documents[doc.location] = doc; + } + }); + console.log('Lunr index built, search ready'); + } + allowSearch = true; + postMessage({config: data.config}); + postMessage({allowSearch: allowSearch}); +} + +function init () { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", onJSONLoaded); + var index_path = base_path + '/search_index.json'; + if( 'function' === typeof importScripts ){ + index_path = 'search_index.json'; + } + oReq.open("GET", index_path); + oReq.send(); +} + +function search (query) { + if (!allowSearch) { + console.error('Assets for search still loading'); + return; + } + + var resultDocuments = []; + var results = index.search(query); + for (var i=0; i < results.length; i++){ + var result = results[i]; + doc = documents[result.ref]; + doc.summary = doc.text.substring(0, 200); + resultDocuments.push(doc); + } + return resultDocuments; +} + +if( 'function' === typeof importScripts ) { + onmessage = function (e) { + if (e.data.init) { + init(); + } else if (e.data.query) { + postMessage({ results: search(e.data.query) }); + } else { + console.error("Worker - Unrecognized message: " + e); + } + }; +} diff --git a/site/sitemap.xml b/site/sitemap.xml new file mode 100644 index 0000000..389eabb --- /dev/null +++ b/site/sitemap.xml @@ -0,0 +1,23 @@ + +utils
snake_to_camel
snake_to_camel(name)
+
+Convert snake_case to camelCase.
+:param name: str :return: str
+This file was automatically generated via lazydocs.
+ +