承接 bluebillywig/bb-sapi-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

bluebillywig/bb-sapi-php-sdk

最新稳定版本:v1.0.4

Composer 安装命令:

composer require bluebillywig/bb-sapi-php-sdk

包简介

README 文档

README

This PHP SDK provides abstractions to interact with the Blue Billywig Server API.

Installation

Installation can be done through composer:

composer require bluebillywig/bb-sapi-php-sdk

Usage

In order to use this SDK, three things are prerequisite:

  1. A publication is created and active in the Blue Billywig Online Video Platform (OVP).
  2. An account is created within the publication in the OVP.
  3. An API Key was created using the account in the OVP.

Once the aforementioned prerequisites are in place the SDK can be used in any PHP script:

<?php

use BlueBillywig\Sdk;
use GuzzleHttp\Promise\Coroutine;

$publication = "my-publication"; // The publication name (https://<publication name>.bbvms.com) in which the account and API key were created.
$tokenId = 1; // The ID of the generated API key.
$sharedSecret = "my-shared-secret"; // The randomly generated shared secret.

$sdk = Sdk::withRPCTokenAuthentication($publication, $tokenId, $sharedSecret);

$mediaClipPath = "/path/to/a/mediaclip.mp4";

// Asynchronous
$promise = Coroutine::of(function () use ($sdk) {
    $response = (yield $sdk->mediaclip->initializeUploadAsync($mediaClipPath));
    $response->assertIsOk();

    yield $sdk->mediaclip->helper->executeUploadAsync($mediaClipPath, $response->getDecodedBody());
});
$promise->wait();

// Synchronous
$response = $sdk->mediaclip->initializeUpload($mediaClipPath);
$response->assertIsOk();

$sdk->mediaclip->helper->executeUpload($mediaClipPath, $response->getDecodedBody());

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 8
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-05