| @@ 81-95 (lines=15) @@ | ||
| 78 | /** |
|
| 79 | * {@inheritdoc} |
|
| 80 | */ |
|
| 81 | public function getTags(AlbumTagsBuilder $builder): array |
|
| 82 | { |
|
| 83 | $response = $this->client->unsignedCall('album.getTags', $builder->getQuery()); |
|
| 84 | ||
| 85 | if (!isset($response['tags']['tag'])) { |
|
| 86 | return []; |
|
| 87 | } |
|
| 88 | ||
| 89 | return ApiHelper::mapList( |
|
| 90 | static function ($data) { |
|
| 91 | return Tag::fromApi($data); |
|
| 92 | }, |
|
| 93 | $response['tags']['tag'] |
|
| 94 | ); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * {@inheritdoc} |
|
| @@ 100-114 (lines=15) @@ | ||
| 97 | /** |
|
| 98 | * {@inheritdoc} |
|
| 99 | */ |
|
| 100 | public function getTopTags(AlbumTopTagsBuilder $builder): array |
|
| 101 | { |
|
| 102 | $response = $this->client->unsignedCall('album.getTopTags', $builder->getQuery()); |
|
| 103 | ||
| 104 | if (!isset($response['toptags']['tag'])) { |
|
| 105 | return []; |
|
| 106 | } |
|
| 107 | ||
| 108 | return ApiHelper::mapList( |
|
| 109 | static function ($data) { |
|
| 110 | return Tag::fromApi($data); |
|
| 111 | }, |
|
| 112 | $response['toptags']['tag'] |
|
| 113 | ); |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * {@inheritdoc} |
|