currentUserFollows method

Future<List<bool>> currentUserFollows(
  1. List<String> ids,
  2. String type
)

Checks if the current user follows given artists or users.

type should be either 'artist' or 'user'.

Implementation

Future<List<bool>> currentUserFollows(List<String> ids, String type) async {
  final params = {
    'type': type,
    'ids': ids.join(','),
  };

  final url = Uri.https(_baseApiHost, '/v1/me/following/contains', params);
  final List<dynamic> json = await _getJson(url);
  return json.map((e) => e as bool).toList();
}