softonic / download_stats_api_sdk
此包已被 放弃 并不再维护。未建议替代包。
2.2.0
2020-01-15 12:33 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
README
要查看项目文档,请访问 https://download-stats-api-v2.docs.softonic.io/
此PHP包是由 Swagger Codegen 项目自动生成的
- API版本:2.2.0
- 包版本:1.21.0
- 构建包:io.swagger.codegen.languages.PhpClientCodegen
要求
PHP 5.5 及更高版本
安装和用法
Composer
要使用Composer安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/softonic/download_stats_api_sdk.git"
}
],
"require": {
"softonic/download_stats_api_sdk": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/DownloadStatsApiSdk/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门
请按照 安装过程 操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: softonic $config = Softonic\DownloadStatsApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Softonic\DownloadStatsApiSdk\Api\DownloadStatsApi( // 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 = 56; // int | Download stats identifier try { $result = $apiInstance->getDownloadStat($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling DownloadStatsApi->getDownloadStat: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI相对于 https://localhost
类 | 方法 | HTTP请求 | 描述 |
---|---|---|---|
DownloadStatsApi | getDownloadStat | GET /download-stats/{id} | 检索指定的下载统计信息 |
DownloadStatsApi | getDownloadStats | GET /download-stats | 获取指定应用的下载统计列表 |
DownloadStatsApi | postDownloadStats | POST /download-stats | 为指定应用创建下载统计信息 |
DownloadStatsApi | putDownloadStats | PUT /download-stats/{id} | 替换指定的下载统计信息 |
ProgramsApi | findProgram | GET /programs | 按下载量获取下载统计列表 |
ProgramsApi | getProgramPlatform | GET /programs/{id_program}/platforms/{id_platform} | 获取指定程序平台的下载统计列表 |
ProgramsApi | getProgramPlatformLanguage | GET /programs/{id_program}/platforms/{id_platform}/languages/{id_language} | 获取指定程序平台语言的下载统计列表 |
模型文档
- DownloadStats
- DownloadStatsInput
- ItemsPaginationModel
- ItemsPaginationModel2
- Program
- ProgramPlatform
- ProgramPlatformLanguage
- TotalItemsPagePerPageTotalPagesNextModel
授权文档
软onic
- 类型: OAuth
- 流程: 应用程序
- 授权URL:
- 作用域:
- sft_download_stats_api.find.all: 查找下载统计信息
- sft_download_stats_api.read.all: 读取下载统计信息
- sft_download_stats_api.create.all: 创建下载统计信息
- sft_download_stats_api.replace.all: 替换下载统计信息