ken / douyin-open
dev-master
2020-07-11 07:51 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 not auto-updated.
Last update: 2024-09-30 03:13: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/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/douyin_open/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循安装程序,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Douyin\Open\Api\ToutiaoVideoListApi( // 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() ); $open_id = "ba253642-0590-40bc-9bdf-9a1334b94059"; // string | 通过/oauth/access_token/获取,用户唯一标志 $access_token = "act.1d1021d2aee3d41fee2d2add43456badMFZnrhFhfWotu3Ecuiuka27L56lr"; // string | 调用/oauth/access_token/生成的token,此token需要用户授权。 $count = 10; // int | 每页数量 $cursor = 0; // int | 分页游标, 第一页请求cursor是0, response中会返回下一页请求用到的cursor, 同时response还会返回has_more来表明是否有更多的数据。 try { $result = $apiInstance->toutiaoVideoListGet($open_id, $access_token, $count, $cursor); print_r($result); } catch (Exception $e) { echo 'Exception when calling ToutiaoVideoListApi->toutiaoVideoListGet: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI相对于https://open.douyin.com
模型文档
授权文档
所有端点均不需要授权。