topphp/topphp-huawei

v1.1.0 2020-09-30 06:40 UTC

This package is auto-updated.

Last update: 2024-03-29 04:25:55 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

华为违禁词过滤组件

目前仅支持文本过滤

#安装

$ 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.