Cloudinary\Api::get_streaming_profile PHP Method

get_streaming_profile() public method

Get the information of a single streaming profile
public get_streaming_profile ( $name, array $options = [] ) : Response
$name the name of the profile
$options array other options
return Cloudinary\Api\Response An array with a "data" key for results
    function get_streaming_profile($name, $options = array())
    {
        $uri = array("streaming_profiles/" . $name);
        return $this->call_api("get", $uri, array(), $options);
    }

Usage Example

Example #1
0
 function test_get_streaming_profile()
 {
     $result = $this->api->get_streaming_profile(self::$predefined_profiles[0]);
     $this->assertArrayHasKey("representations", $result["data"]);
     $reps = $result["data"]["representations"];
     $this->assertTrue(is_array($reps));
     // "transformation is returned as an array
     $this->assertTrue(is_array($reps[0]["transformation"]));
     $tr = $reps[0]["transformation"][0];
     $this->assertArrayHasKey("bit_rate", $tr);
     $this->assertArrayHasKey("height", $tr);
     $this->assertArrayHasKey("width", $tr);
     $this->assertArrayHasKey("crop", $tr);
 }