topphp / topphp-huawei
v1.1.0
2020-09-30 06:40 UTC
Requires
- php: ~7.2
- ext-curl: *
- ext-json: *
- topphp/topphp-log: ^1.0.0
- topthink/framework: ^6.0.2
Requires (Dev)
- squizlabs/php_codesniffer: ^3.5
- topphp/topphp-testing: ^1.0.0
This package is auto-updated.
Last update: 2025-01-29 07:02:01 UTC
README
华为违禁词过滤组件
目前仅支持文本过滤
#安装
$ composer require topphp/topphp-huawei
Usage
<?php use Topphp\TopphpHuawei\Moderation\ModerationText; function ModerationText() { $result = ModerationText::text('haha 曹尼玛','key','secret'); var_dump($result); }
获取vod点播资源列表和详情
<?php public function testVodList() { $vodConfig = new VodConfig(); $vodConfig->setAk(''); $vodConfig->setSk(''); $vodConfig->setProjectId(''); $vodConfig->setVodHost('vod.cn-north-4.myhuaweicloud.com'); $vodClient = new VodClient($vodConfig); $req = new QueryAssetListReq(); $rsp = $vodClient->queryAssetList($req); echo $rsp->getBody(); } public function testVodDetail() { $vodConfig = new VodConfig(); $vodConfig->setAk(''); $vodConfig->setSk(''); $vodConfig->setProjectId(''); $vodConfig->setVodHost('vod.cn-north-4.myhuaweicloud.com'); $vodClient = new VodClient($vodConfig); $req = new QueryAssetDetailReq(); $req->setAssetId('1d9e9f555b07f053d2588d0ccd0580bb'); $req->setCategories(array('base_info', 'review_info')); $rsp = $vodClient->queryAssetDetail($req); echo $rsp->getBody(); }
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email sleep@kaituocn.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.