Skip to content

obada-foundation/client-api-library-php

Repository files navigation

OpenAPIClient-php

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

For more information, please visit https://www.obada.io.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/obada-foundation/client-api-library-php.git"
    }
  ],
  "require": {
    "obada-foundation/client-api-library-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer (JWT) authorization: bearerAuth
$config = Obada\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Obada\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$address = obada1yxxnd624tgwqm3eyv5smdvjrrydfh9h943qptg; // string | OBADA address

try {
    $result = $apiInstance->account($address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->account: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://obs.node.obada.io

Class Method HTTP request Description
AccountsApi account GET /accounts/{address} Fetches an information about single account
AccountsApi accounts GET /accounts Returns a list of OBADA accounts
AccountsApi deleteImportedAccount DELETE /accounts/{address} Delete imported account
AccountsApi exportAccount POST /accounts/export-account Export OBADA account (private key) from client-helper
AccountsApi getMnemonic GET /accounts/mnemonic Fetching an existing mnemonic phrase
AccountsApi importAccount POST /accounts/import-account Imports an existing OBADA account (private key) to the client-helper user profile
AccountsApi importWallet POST /accounts/import-wallet Imports an existing HD wallet to the client-helper user profile
AccountsApi newAccount POST /accounts/new-account Creates a new OBADA account from HD wallet master key
AccountsApi newMnemonic GET /accounts/new-mnemonic Generate a new mnemonic phrase for seeding wallet
AccountsApi newWallet POST /accounts/new-wallet Creates profile HD wallet
AccountsApi register POST /accounts/register Register a new client-helper user profile
AccountsApi sendCoins POST /accounts/{address}/send-coins Send coins from selected account
AccountsApi updateAccount POST /accounts/{address} Sets account specific information
NFTApi batchMint POST /nft/batch-mint Mints batches of NFT
NFTApi batchSend POST /nft/batch-send Send a batch of NFTs to another address
NFTApi mint POST /nft/{key}/mint Mints NFT
NFTApi nft GET /nft/{key} Fetch NFT from OBADA blockchain Node
NFTApi send POST /nft/{key}/send Send NFT to another address
NFTApi updateMetadata POST /nft/{key}/metadata Update NFT metadata
ObitApi batchSave POST /obits/batch Batch Save Obit
ObitApi get GET /obits/{key} Get Obit by DID or USN
ObitApi history GET /obits/{key}/history Get Obit history by DID or USN
ObitApi save POST /obits Save Obit
ObitApi search GET /obits Search obits by query
UtilsApi generateChecksum POST /obit/checksum Generates Obit checksum
UtilsApi generateDID POST /obit/did Generate Obit DID

Models

Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

[email protected]

About this package

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

  • API version: 0.0.1
    • Generator version: 7.9.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen