Skip to content

Commit

Permalink
Added getVideoCollections() and removed updateVideo()
Browse files Browse the repository at this point in the history
updateVideo() seems to no longer be in the bunny net layout
cp6 committed Jun 5, 2021
1 parent df8ef84 commit 5c9e9f1
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/BunnyAPI.php
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

/**
* Bunny CDN pull & storage zone API class
* @version 1.3
* @version 1.4
* @author corbpie
*/
class BunnyAPI
@@ -730,8 +730,11 @@ public function costCalculator(int $bytes): array
);
}

/*Bunny net video stream section */

/*
* Bunny net video stream section
*
*/
//Library -> collection -> video
public function setStreamLibraryId(int $library_id): void
{
$this->stream_library_id = $library_id;
@@ -747,6 +750,11 @@ public function setStreamVideoGuid(string $video_guid): void
$this->stream_video_guid = $video_guid;
}

public function getVideoCollections(): string
{
return $this->APIcall('GET', "library/{$this->stream_library_id}/collections", [], false, true);
}

public function getStreamCollections(int $library_id = 0, int $page = 1, int $items_pp = 100, string $order_by = 'date'): string
{
if ($library_id === 0) {
@@ -794,16 +802,9 @@ public function getVideo(int $library_id, string $video_guid): string
return $this->APIcall('GET', "library/$library_id/videos/$video_guid", [], false, true);
}

public function updateVideo(int $library_id, string $video_guid, string $video_library_guid, string $datetime_uploaded,
int $views, bool $is_public, int $length, int $status, float $framerate, int $width,
int $height, int $thumb_count, int $encode_progress, int $size, bool $has_mp4_fallback): void
public function deleteVideo(int $library_id, string $video_guid): ?string
{
//TODO
}

public function deleteVideo(int $library_id, string $video_guid): void
{

return $this->APIcall('DELETE', "library/$library_id/videos/$video_guid", [], false, true);
}

public function createVideo(int $library_id, string $video_title, string $collection_guid = ''): ?string

0 comments on commit 5c9e9f1

Please sign in to comment.