kydev / umeng-sdk
UMeng Open Api SDK
Installs: 2 672
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: >=8.0
- ext-curl: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: >=7.0
- swoole/ide-helper: ^4.5
Suggests
- swow/swow: Required to create swow components.
This package is auto-updated.
Last update: 2024-11-28 09:38:59 UTC
README
文档
安装
composer require kydev/umeng-sdk
使用
use KY\UMeng\AppTrack\UMengAppTrackAppDownload; use KY\UMeng\Client\APIId; use KY\UMeng\Client\APIRequest; use KY\UMeng\Client\Policy\ClientPolicy; use KY\UMeng\Client\Policy\RequestPolicy; use KY\UMeng\Client\SyncAPIClient; use KY\UMeng\UApp\UMengUAppGetDailyDataParam; use KY\UMeng\UApp\UMengUAppGetDailyDataResult; $syncAPIClient = new SyncAPIClient(new ClientPolicy( '123', 'xxx', 'gateway.open.umeng.com' )); $reqPolicy = new RequestPolicy(useHttps: true); $param = new UMengUAppGetDailyDataParam(); $param->key = 'xxx'; $param->date = '2022-05-01'; $request = new APIRequest( new APIId('com.umeng.uapp', 'umeng.uapp.getDailyData', 1), $param ); $res = $syncAPIClient->send($request, UMengUAppGetDailyDataResult::class, $reqPolicy); var_dump($res);