定制 ooyala/v2-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ooyala/v2-api

最新稳定版本:v2.0

Composer 安装命令:

composer require ooyala/v2-api

包简介

Ooyala's V2 API PHP SDK

README 文档

README

The PHP SDK is a client class for our V2 API.

2017-05-18 - TAG created "v2.0"

Requirements

This SDK uses cURL. So, in order to get it running, you need to have the libcurl package installed.

If PHP is manually compiled, don't forget to add the --with-curl[=DIR] configuration option. Or in Linux environments to make sure a php5-curl or similar package is installed. In a Windows environment, libeay32.dll and ssleay32.dll must be present in the PATH environment variable.

Usage

The approach is very simple. It allows you to do GET, POST, PUT, PATCH and DELETE requests to our API by simply specifying the path to the API you want to hit and depending of the call, an Array with parameters and an Array containing the body of the request.

By specifying an associative array object to represent the JSON data you want to send, you can make calls very fast and easily. First you need to create an OoyalaApi object by passing your V2 API keys like this:

<?php
    $api = new OoyalaApi("<api key>", "<secret key>");

Now lets get all the assets under the "Funny dogs" label:

<?php
    $parameters = array("where" => "labels INCLUDES 'Funny dogs'");

    $results = $api->get("assets", $parameters);
    $assets = $results->items;

Now that we have our results on the assets ArrayList, lets print them out to the console.

<?php
    echo "Printing assets in the 'Funny dogs' label...";
    foreach($assets as $asset) {
        echo $asset->embed_code . " - " . $asset->name . "\n";
    }

It's that easy to work with this SDK!

License

See LICENSE file.

统计信息

  • 总下载量: 61.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 79
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2015-01-10