Skip to content

Latest commit

 

History

History
358 lines (241 loc) · 9.14 KB

NFTApi.md

File metadata and controls

358 lines (241 loc) · 9.14 KB

Obada\NFTApi

All URIs are relative to http://obs.node.obada.io, except if the operation defines another base path.

Method HTTP request Description
batchMint() POST /nft/batch-mint Mints batches of NFT
batchSend() POST /nft/batch-send Send a batch of NFTs to another address
mint() POST /nft/{key}/mint Mints NFT
nft() GET /nft/{key} Fetch NFT from OBADA blockchain Node
send() POST /nft/{key}/send Send NFT to another address
updateMetadata() POST /nft/{key}/metadata Update NFT metadata

batchMint()

batchMint($batchMintNFTRequest)

Mints batches of NFT

Example

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


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


$apiInstance = new Obada\Api\NFTApi(
    // 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
);
$batchMintNFTRequest = new \Obada\ClientHelper\BatchMintNFTRequest(); // \Obada\ClientHelper\BatchMintNFTRequest

try {
    $apiInstance->batchMint($batchMintNFTRequest);
} catch (Exception $e) {
    echo 'Exception when calling NFTApi->batchMint: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
batchMintNFTRequest \Obada\ClientHelper\BatchMintNFTRequest [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

batchSend()

batchSend($batchSendNFTRequest)

Send a batch of NFTs to another address

Example

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


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


$apiInstance = new Obada\Api\NFTApi(
    // 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
);
$batchSendNFTRequest = new \Obada\ClientHelper\BatchSendNFTRequest(); // \Obada\ClientHelper\BatchSendNFTRequest

try {
    $apiInstance->batchSend($batchSendNFTRequest);
} catch (Exception $e) {
    echo 'Exception when calling NFTApi->batchSend: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
batchSendNFTRequest \Obada\ClientHelper\BatchSendNFTRequest [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

mint()

mint($key)

Mints NFT

Example

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


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


$apiInstance = new Obada\Api\NFTApi(
    // 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
);
$key = did:obada:fe096095-e0f0-4918-9607-6567bd5756b5; // string | The given ObitDID or USN argument

try {
    $apiInstance->mint($key);
} catch (Exception $e) {
    echo 'Exception when calling NFTApi->mint: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
key string The given ObitDID or USN argument

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

nft()

nft($key): \Obada\ClientHelper\NFT

Fetch NFT from OBADA blockchain Node

Example

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


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


$apiInstance = new Obada\Api\NFTApi(
    // 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
);
$key = did:obada:fe096095-e0f0-4918-9607-6567bd5756b5; // string | The given ObitDID or USN argument

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

Parameters

Name Type Description Notes
key string The given ObitDID or USN argument

Return type

\Obada\ClientHelper\NFT

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

send()

send($key, $sendNFTRequest)

Send NFT to another address

Example

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


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


$apiInstance = new Obada\Api\NFTApi(
    // 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
);
$key = did:obada:fe096095-e0f0-4918-9607-6567bd5756b5; // string | The given ObitDID or USN argument
$sendNFTRequest = new \Obada\ClientHelper\SendNFTRequest(); // \Obada\ClientHelper\SendNFTRequest

try {
    $apiInstance->send($key, $sendNFTRequest);
} catch (Exception $e) {
    echo 'Exception when calling NFTApi->send: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
key string The given ObitDID or USN argument
sendNFTRequest \Obada\ClientHelper\SendNFTRequest [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateMetadata()

updateMetadata($key)

Update NFT metadata

Example

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


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


$apiInstance = new Obada\Api\NFTApi(
    // 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
);
$key = did:obada:fe096095-e0f0-4918-9607-6567bd5756b5; // string | The given ObitDID or USN argument

try {
    $apiInstance->updateMetadata($key);
} catch (Exception $e) {
    echo 'Exception when calling NFTApi->updateMetadata: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
key string The given ObitDID or USN argument

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]