日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

查詢媒體

本文提供了媒體處理PHP SDK查詢媒體模塊相關功能的API調用示例。

前提條件

使用前請先安裝及完成PHP SDK相關配置,詳細信息,請參見前言。更多SDK及API調用示例,請參見OpenAPI

查詢媒體-使用OSS文件地址

調用QueryMediaListByURL通過OSS文件地址查詢媒體,接口參數和返回字段詳細信息請參見查詢媒體-使用OSS文件地址,調用示例如下:

<?php
namespace AlibabaCloud\SDK\Sample;

use AlibabaCloud\SDK\Mts\V20140618\Mts;
use AlibabaCloud\Darabonba\Env\Env;
use AlibabaCloud\Tea\Tea;
use AlibabaCloud\Tea\Utils\Utils;
use AlibabaCloud\Tea\Console\Console;

use Darabonba\OpenApi\Models\Config;
use AlibabaCloud\SDK\Mts\V20140618\Models\QueryMediaListByURLRequest;


class Sample {

    /**
     * @param string $accessKeyId
     * @param string $accessKeySecret
     * @param string $regionId
     * @return Mts
     * 正式環境下 建議 protocol = "HTTPS";
     */
    public static function createClient($accessKeyId, $accessKeySecret, $regionId){
        $config = new Config([]);
        $config->accessKeyId = $accessKeyId;
        $config->accessKeySecret = $accessKeySecret;
        $config->regionId = $regionId;
        $config->protocol = "HTTP";
        return new Mts($config);
    }

    /**
     * @return void
     */
    public static function main(){
        $client = self::createClient(Env::getEnv("ALIBABA_CLOUD_ACCESS_KEY_ID"), Env::getEnv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"), 'cn-shanghai');
        $request = new QueryMediaListByURLRequest([
            "fileURLs" => "http://<bucket name>.oss-cn-shanghai.aliyuncs.com/mps_input/video.mp4"
        ]);
        $response = $client->queryMediaListByURL($request);
        Console::log(Utils::toJSONString(Tea::merge($response->body)));
    }

}
$path = __DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR . 'autoload.php';
if (file_exists($path)) {
    require_once $path;
}
Sample::main();

查詢媒體-使用媒體ID

調用QueryMediaList通過媒體ID查詢媒體,接口參數和返回字段詳細信息請參見查詢媒體-使用媒體ID,調用示例如下:

<?php
namespace AlibabaCloud\SDK\Sample;

use AlibabaCloud\SDK\Mts\V20140618\Mts;
use AlibabaCloud\Darabonba\Env\Env;
use AlibabaCloud\Tea\Tea;
use AlibabaCloud\Tea\Utils\Utils;
use AlibabaCloud\Tea\Console\Console;

use Darabonba\OpenApi\Models\Config;
use AlibabaCloud\SDK\Mts\V20140618\Models\QueryMediaListRequest;


class Sample {

    /**
     * @param string $accessKeyId
     * @param string $accessKeySecret
     * @param string $regionId
     * @return Mts
     * 正式環境下 建議 protocol = "HTTPS";
     */
    public static function createClient($accessKeyId, $accessKeySecret, $regionId){
        $config = new Config([]);
        $config->accessKeyId = $accessKeyId;
        $config->accessKeySecret = $accessKeySecret;
        $config->regionId = $regionId;
        $config->protocol = "HTTP";
        return new Mts($config);
    }

    /**
     * @return void
     */
    public static function main(){
        $client = self::createClient(Env::getEnv("ALIBABA_CLOUD_ACCESS_KEY_ID"), Env::getEnv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"), 'cn-shanghai');
        $request = new QueryMediaListRequest([
            "mediaIds" => "90accfcb5c5fbc99******"
        ]);
        $response = $client->queryMediaList($request);
        Console::log(Utils::toJSONString(Tea::merge($response->body)));
    }

}
$path = __DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR . 'autoload.php';
if (file_exists($path)) {
    require_once $path;
}
Sample::main();