ventureleap / leap-one-user-sdk
dev-master
2021-09-15 13:31 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-07 13:26:39 UTC
README
未提供描述(由 Swagger Codegen 生成 https://github.com/swagger-api/swagger-codegen)
此 PHP 包是由 Swagger Codegen 项目自动生成的
- API 版本:1.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上
安装与使用
Composer
要通过 Composer 安装绑定,请在 composer.json
中添加以下内容
{
"repositories": [
{
"type": "git",
"url": "https://github.com/ventureleap/leap-one-user-sdk.git"
}
],
"require": {
"ventureleap/leap-one-user-sdk": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循 安装和用法过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apiKey $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\UserService\Api\AccountApi( // 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 ); $id = "id_example"; // string | $username = "username_example"; // string | $email = "email_example"; // string | $first_name = "first_name_example"; // string | $last_name = "last_name_example"; // string | $custom_data = "custom_data_example"; // string | $user_type = "user_type_example"; // string | $active = true; // bool | $deleted = true; // bool | $page = 1; // int | The collection page number $items_per_page = 10; // int | The number of items per page $pagination = true; // bool | Enable or disable pagination try { $result = $apiInstance->apiAccountsUsersGetSubresource($id, $username, $email, $first_name, $last_name, $custom_data, $user_type, $active, $deleted, $page, $items_per_page, $pagination); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->apiAccountsUsersGetSubresource: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\UserService\Api\AccountApi( // 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 ); $account_number = "account_number_example"; // string | $active = true; // bool | $deleted = true; // bool | $page = 1; // int | The collection page number $items_per_page = 10; // int | The number of items per page $pagination = true; // bool | Enable or disable pagination try { $result = $apiInstance->getAccountCollection($account_number, $active, $deleted, $page, $items_per_page, $pagination); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getAccountCollection: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\UserService\Api\AccountApi( // 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 ); $id = "id_example"; // string | try { $result = $apiInstance->getAccountItem($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->getAccountItem: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\UserService\Api\AccountApi( // 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 ); $body = new \VentureLeap\UserService\Model\AccountJsonldAccountWrite(); // \VentureLeap\UserService\Model\AccountJsonldAccountWrite | The new Account resource try { $result = $apiInstance->postAccountCollection($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->postAccountCollection: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new VentureLeap\UserService\Api\AccountApi( // 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 ); $id = "id_example"; // string | $body = new \VentureLeap\UserService\Model\AccountJsonldAccountWrite(); // \VentureLeap\UserService\Model\AccountJsonldAccountWrite | The updated Account resource try { $result = $apiInstance->putAccountItem($id, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->putAccountItem: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 /
模型文档
- AccountJsonldAccountRead
- AccountJsonldAccountWrite
- AddressJsonldAddressRead
- AddressJsonldAddressWrite
- AddressJsonldUserRead
- AddressJsonldUserWrite
- ConfigurationEntryJsonldConfigurationRead
- ConfigurationEntryJsonldConfigurationWrite
- Credentials
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse200Hydrasearch
- InlineResponse200HydrasearchHydramapping
- InlineResponse200Hydraview
- SocialAuthUrl
- UserJsonldAccountRead
- UserJsonldAddressRead
- UserJsonldMfaCheck
- UserJsonldMfaRequest
- UserJsonldMfaSms
- UserJsonldPasswordRequest
- UserJsonldUserRead
- UserJsonldUserWrite
- UserPasswordReset
授权文档
apiKey
- 类型:API密钥
- API密钥参数名:Authorization
- 位置:HTTP头