airmole/bilive-open-api

bilibili直播内容开放平台API

v1.0.0 2022-12-07 03:30 UTC

This package is auto-updated.

Last update: 2025-01-07 08:11:45 UTC


README

bilibili直播开放平台API接口。

bilive-open-api

install

composer require "airmole/bilive-open-api"

用法

<?php

use Airmole\BiliveOpenApi\BiliveService;

$biliveService = new BiliveService('access_key_id', 'access_key_secred');

$start = $biliveService->start('code', 'app_id');
echo "项目开启:\r\n";
print_r($start);

$gameId = $start['data']['game_info']['game_id'];
$heartBeat = $biliveService->heartBeat($gameId);
echo "项目心跳:\r\n";
print_r($heartBeat);

/*
$batchHeartBeat = $biliveService->batchHeartBeat([$gameId]);
echo "项目批量心跳:\r\n";
print_r($batchHeartBeat);
*/

echo "项目关闭:\r\n";
$close = $biliveService->end('app_id', $gameId);
print_r($close);

参数说明

... 更多详细完整说明请参阅源码以及官方文档