diff --git a/src/AppleMusicAPI.php b/src/AppleMusicAPI.php index 796eccc..e7fa402 100644 --- a/src/AppleMusicAPI.php +++ b/src/AppleMusicAPI.php @@ -508,6 +508,7 @@ public function createLibraryPlaylist(LibraryPlaylistCreationRequest $playlist) $requestBody['attributes'] = [ 'name' => $playlist->getName(), 'description' => $playlist->getDescription(), + 'isPublic' => $playlist->isPublic(), ]; foreach ($playlist->getTracks() as $track) { diff --git a/src/Request/LibraryPlaylistCreationRequest.php b/src/Request/LibraryPlaylistCreationRequest.php index ac27bc4..905bcc6 100644 --- a/src/Request/LibraryPlaylistCreationRequest.php +++ b/src/Request/LibraryPlaylistCreationRequest.php @@ -19,6 +19,11 @@ class LibraryPlaylistCreationRequest */ protected $description = ''; + /** + * @var bool + */ + protected $isPublic = false; + /** * @var LibraryResource[] */ @@ -64,6 +69,22 @@ public function getDescription(): string return $this->description; } + /** + * @param bool $isPublic + */ + public function setIsPublic(bool $isPublic): void + { + $this->isPublic = $isPublic; + } + + /** + * @return bool + */ + public function isPublic(): bool + { + return $this->isPublic; + } + /** * @param LibraryResource $track */