blastream-php-sdk

consume php rest api with php sdk

Downloads
15.4K
Stars
3
Committers
4

Bot releases are hidden (Show)

blastream-php-sdk - 1.0.34-alpha Latest Release

Published by Yanlaz about 1 month ago

Add new methods

  • Get a file by id
    $channel->getFile($id);

Add option for upload file

  • Set a display name for uploadFromUrl
    $channel->uploadFromUrl($url, ["name"=>'myFile']);
blastream-php-sdk - 1.0.33-alpha

Published by Yanlaz 2 months ago

Add method for delete replay item

$channel->deleteReplay($idReplay);

blastream-php-sdk - 1.0.32-alpha

Published by nums 6 months ago

Add new methods :

  • Create evergreen from a webinar recording
$channelName = 'test';
$evergreenName = 'test-evergreen';
$recordingId = 12;
$minute = 12; $hour = '*'; $dayOfMonth = '*'; $month = '*'; $dayOfWeek = '*';  //https://www.ibm.com/docs/en/db2oc?topic=task-unix-cron-format
$channelEvergreenResponse = $blastream->createEvergreen($channelName, $evergreenName, $recordingId, $minute, $hour, $dayOfMonth, $month, $dayOfWeek);
$channelEvergreen = $blastream->createOrGetChannel($evergreenName);
$url = $channelEvergreen->getUrl();
  • Update evergreen scheduling
$evergreenId = $channelEvergreenResponse['id'];
$channelEvergreen = $blastream->createOrGetChannel($evergreenName);
$response = $channelEvergreen->updateEvergreen($evergreenId, $minute, $hour, $dayOfMonth, $month, $dayOfWeek);
  • Get all items
$items = $channel->getEvergreenItems($evergreenId);
  • Create an item
$type = 'Message';
$item_id = 1595;
$timecode = 12; //seconds after start
$data = json_decode('{}'); //check data of message / polls etc
$channelEvergreen = $blastream->createOrGetChannel($evergreenName);
$channelEvergreen->addEvergreenItem($evergreenId, [
    'data' => $data,
    'timecode' => $timecode,
    'type' => $type,
    'item_id' => $item_id
]);
  • Update an item
$channelEvergreen = $blastream->createOrGetChannel($evergreenName);
$response = $channelEvergreen->updateEvergreenItem($evergreenId, [
    'timecode' => $timecode,
    'data' => $data,
]);
  • Delete an item
$channelEvergreen = $blastream->createOrGetChannel($evergreenName);
$response = $channelEvergreen->deleteEvergreenItem($evergreenId);
  • Delete an evergreen
$channelEvergreen = $blastream->createOrGetChannel($evergreenName);
$response = $channelEvergreen->deleteEvergreen($evergreenId);
blastream-php-sdk - 1.0.31

Published by nums 10 months ago

Add new methods :

  • Get list of documents
$blastream->getFiles();
  • Update name of document
$documentId = 4357;
$blastream->updateFile($documentId, 'the-new-name');
  • Remove document
$documentId = 4357;
$blastream->removeFile($documentId);
blastream-php-sdk - 1.0.30

Published by nums 10 months ago

fix route for uploadFromUrl

blastream-php-sdk - 1.0.29

Published by nums 11 months ago

Add new methods :

  • Get current live channels of your space
$blastream->getCurrentLiveChannels();
  • Get all channels of your space
$blastream->getChannels();
  • Create a RTMP channel
$channel = $blastream->createOrGetChannel('my-rtmp-channel');
$channel->setMode('rtmp');
  • Upload a file from an url and automatically add to the blastream document library of the channel
$channel = $blastream->createOrGetChannel('my-channel');
$channel->uploadFromUrl('https://.........'); //can be jpg, png, pdf, mp4, avi (any extension of video)

Add banners feature :

  • Create a channel and enable banner module
$channel = $blastream->createOrGetChannel('my-channel-with-banners');
$channel->setBannerModule(1);
  • Create your first banner
$upload = $channel->uploadFromUrl('https://www.........png');
$bannerData = [
   'name' => 'banner name',
   'title' => 'My awesome banner',
   'text' => 'Lorem ipsum is so cool !',
   'btn' => 'KNOW MORE',
   'media_url_live' => $upload['file'], //if banner live
   'media_url_chat' => $upload['file'], //if banner chat (can be both)
   'link' => 'https://www.mywebsite.com',
   'qty_available' => 50,
   'show_qty' => true,
   'show_timer' => true,
   'price' => 99,
   'show_price' => true,
   'timer' => 200,
   'gong' => true
];
$channel->createBanner($bannerData);
  • Get all banners
$channel->getBanners()
  • Get banner
$channel->getBanner($bannerId)
  • Update banner
$channel->updateBanner($bannerId, $bannerData)
  • Remove banner
$channel->removeBanner($bannerId)
  • Get banners logs
$channel->getBannerLogs()
blastream-php-sdk - 1.0.28

Published by Yanlaz 11 months ago

Fix missing timeout param on initChannel

blastream-php-sdk - 1.0.27

Published by nums 11 months ago

Be able to create, list, update and remove Poll:

//create
$channel = $blastream->createOrGetChannel('my-channel');
$poll = [
  "choices"=>[ 
    ["id"=> 1, "value"=> "A", "color"=> "#FFA900" ],
    ["id"=> 2, "value"=> "B", "color"=> "#3EC59B" ]
  ],
  "format"=> "multiple", //can be ['multiple','quiz''note,'yes-no']
  "publish"=> 0,
  "question"=> "Question",
  "showResults"=> 1
];
$newPollData = $channel->createPool($poll);

//list
$channel->getPolls();

//update poll
$channel->updatePoll($newPollData['id'], [
  "choices"=>[ 
    ["id"=> 1, "value"=> "A", "color"=> "#FFA900" ],
    ["id"=> 2, "value"=> "B", "color"=> "#3EC59B" ]
    ["id"=> 3, "value"=> "C", "color"=> "#3EC59B" ]
  ],
  "format"=> "multiple",
  "publish"=> 0,
  "question"=> "Question updated",
  "showResults"=> 1
]);

//remove poll
$channel->removePoll($newPollData['id']);

blastream-php-sdk - 1.0.26

Published by nums about 1 year ago

add publishReplay method :

$replayId = 2596; //you can retreive it with hook url or getReplays method
$channel = $blastream->createOrGetChannel('blastream-room');
$channel->publishReplay($replayId);
blastream-php-sdk - 1.0.25

Published by nums about 1 year ago

Add session stats

To retrieve stats :


$channel = $blastream->createOrGetChannel('demo');

$statsSessions = $channel->getStatSessions();
print_r($statsSessions);
    
$statsSession = $channel->getStatSession($statsSessions['list'][0]['id']);
print_r($statsSession);
blastream-php-sdk - 1.0.24

Published by nums over 1 year ago

add simulcast feature

blastream-php-sdk - 1.0.23

Published by nums over 1 year ago

  • Test justBeenCreated to disable notice in logs
blastream-php-sdk - 1.0.22

Published by nums over 1 year ago

  • add clone
  • add vodToLive management
  • can have a flag when channel is created or just retrieved
blastream-php-sdk - 1.0.21

Published by nums over 1 year ago

blastream-php-sdk - 1.0.20

Published by nums over 1 year ago

blastream-php-sdk - 1.0.19

Published by nums almost 2 years ago

Add mode management

blastream-php-sdk - 1.0.18

Published by nums over 2 years ago

  • fix parameters when create a channel :
$channel = $blastream->createOrGetChannel('channel-name', [
     'plan' => 'pro2', 
     'billing' => 'hourly'
]);
  • be able to update advanced settings :
$channel->updateAdvancedSettings([
    'live_proto' => 'ihls'  //live_proto can be webrtc, ihls and hls
]);
  • be able to start and stop livestreaming:
$channel->startLivestreaming();
$channel->stopLivestreaming();
  • be able to start and stop record :
$channel->startRecord();
$channel->stopRecord();
blastream-php-sdk - 1.0.17

Published by nums over 2 years ago

add getId() for channel

echo $channel->getId();

blastream-php-sdk - 1.0.16

Published by Yanlaz over 2 years ago

Fix for remove Channel

blastream-php-sdk - 1.0.15

Published by nums over 2 years ago

fixed CURLOPT_POSTFIELDS in the Curl call, there was a problem with the GET method that sent CURLOPT_POSTFIELDS