symbol-blockchain-community/symbol-rest-client

v1.0.1 2024-07-26 04:02 UTC

This package is not auto-updated.

Last update: 2024-09-20 04:35:30 UTC


README

catapult-rest的OpenAPI规范

安装与使用

要求

PHP 7.4及更高版本。也应与PHP 8.0兼容。

Composer

要通过Composer安装绑定,请将以下内容添加到composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

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

入门

请按照安装过程进行操作,然后运行以下命令

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




$apiInstance = new SymbolRestClient\Api\AccountRoutesApi(
    // 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()
);
$account_id = 'account_id_example'; // string | Account public key or address encoded using a 32-character set.

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

API端点

所有URI都相对于https://:3000

模型

授权

端点不需要授权。

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

此PHP包由OpenAPI Generator项目自动生成

  • API版本: 1.0.4
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen