Skip to content

Commit

Permalink
Added example and fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomenchini committed Nov 21, 2023
1 parent e94ae8d commit bb2bcfd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ void main(List<String> args) async {

print("${searchedArtists.items}\n");

// You can retrieve similar artists for a given artist.
final similarAritsts = await tidal.artist.getSimilarArtistsForGivenArtist(
id: jayz.id,
countryCode: "US",
);

print("$similarAritsts\n");

// Make sure to dispose the client when you're done.
tidal.dispose();
}
4 changes: 2 additions & 2 deletions lib/src/artist/artist_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ abstract class ArtistAPI {
///
/// Returns:
/// A [Future<List<String>>] representing the unique identifiers of similar artists.
Future<List<String>> getSimilarAlbumsForGivenAlbum({
Future<List<String>> getSimilarArtistsForGivenArtist({
required String id,
required String countryCode,
int offset = 0,
Expand Down Expand Up @@ -134,7 +134,7 @@ class ArtistAPIImpl implements ArtistAPI {
).then((result) => result.artists);

@override
Future<List<String>> getSimilarAlbumsForGivenAlbum({
Future<List<String>> getSimilarArtistsForGivenArtist({
required String id,
required String countryCode,
int offset = 0,
Expand Down

0 comments on commit bb2bcfd

Please sign in to comment.