deeparteffects / sdk-php
Deep Art Effects SDK for PHP
1.1
2020-04-11 19:51 UTC
Requires
- php: >=5.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- aws/aws-sdk-php: ^3.28
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-23 08:10:59 UTC
README
使用此 SDK 通过 PHP 访问 Deep Art Effects API。
要求
PHP 5.4.0 及以上版本
安装与使用
Composer
要通过 Composer 安装绑定,请在 composer.json
中添加以下内容:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/deeparteffects/sdk-php.git"
}
],
"require": {
"deeparteffects/sdk-php": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/sdk-php/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请遵循 安装过程,然后运行以下命令:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $api_key = '--Your API Key--'; $access_key = '--Your ACCESS Key--'; $secret_key = '--Your SECRET KEY--'; $api_instance = new \Deeparteffects\Client\Api\DefaultApi(); $api_instance->setApiKey($api_key); $api_instance->setApiAccessKey($access_key); $api_instance->setApiSecretKey($secret_key); try { $styles = $api_instance->stylesGet(); foreach ($styles as $style) { print_r($style->getTitle()); } } catch (Exception $e) { echo 'Exception when calling DefaultApi->stylesGet: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都是相对于 https://api.deeparteffects.com/v1
模型文档
授权文档
api_key
- 类型: API 密钥
- API 密钥参数名: x-api-key
- 位置: HTTP 头部
作者
Deep Art Effects GmbH