Skip to content

Commit 7e3a173

Browse files
committed
added importPlaylist (fix: #8)
1 parent ef554e3 commit 7e3a173

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

sinusbot.class.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,16 @@ public function getPlaylists() {
334334
public function createPlaylist($playlistName) {
335335
return $this->request('/bot/playlists', 'POST', json_encode(array("name" => $playlistName)));
336336
}
337-
338-
337+
338+
/**
339+
* importPlaylist
340+
* @access public
341+
* @param string $url youtube-dl URL
342+
* @return array status
343+
*/
344+
public function importPlaylist($url) {
345+
return $this->request('/bot/playlists', 'POST', json_encode(array("importFrom" => $url)));
346+
}
339347
/**
340348
* renamePlaylist
341349
*

0 commit comments

Comments
 (0)