| @@ 69-83 (lines=15) @@ | ||
| 66 | return AlbumInfo::fromApi($response['album']); | |
| 67 | } | |
| 68 | ||
| 69 | public function getTags(AlbumTagsBuilder $builder): array | |
| 70 |     { | |
| 71 |         $response = $this->client->unsignedCall('album.getTags', $builder->getQuery()); | |
| 72 | ||
| 73 |         if (!isset($response['tags']['tag'])) { | |
| 74 | return []; | |
| 75 | } | |
| 76 | ||
| 77 | return ApiHelper::mapList( | |
| 78 |             static function ($data) { | |
| 79 | return Tag::fromApi($data); | |
| 80 | }, | |
| 81 | $response['tags']['tag'] | |
| 82 | ); | |
| 83 | } | |
| 84 | ||
| 85 | public function getTopTags(AlbumTopTagsBuilder $builder): array | |
| 86 |     { | |
| @@ 85-99 (lines=15) @@ | ||
| 82 | ); | |
| 83 | } | |
| 84 | ||
| 85 | public function getTopTags(AlbumTopTagsBuilder $builder): array | |
| 86 |     { | |
| 87 |         $response = $this->client->unsignedCall('album.getTopTags', $builder->getQuery()); | |
| 88 | ||
| 89 |         if (!isset($response['toptags']['tag'])) { | |
| 90 | return []; | |
| 91 | } | |
| 92 | ||
| 93 | return ApiHelper::mapList( | |
| 94 |             static function ($data) { | |
| 95 | return Tag::fromApi($data); | |
| 96 | }, | |
| 97 | $response['toptags']['tag'] | |
| 98 | ); | |
| 99 | } | |
| 100 | ||
| 101 | public function removeTag(SessionInterface $session, string $artist, string $album, string $tag): void | |
| 102 |     { | |