get method

Future<Show> get(
  1. String showId, {
  2. Market? market,
})

Get a single show

market: An ISO 3166-1 alpha-2 country code or the string 'from_token'. If a country code is specified, only artists, albums, and tracks with content that is playable in that market is returned.

Implementation

Future<Show> get(String showId, {Market? market}) async {
  String jsonString;
  if (market != null) {
    var queryMap = {'market': market.name};
    var query = _buildQuery(queryMap);
    jsonString = await _get('$_path/$showId?$query');
  } else {
    jsonString = await _get('$_path/$showId');
  }

  var map = json.decode(jsonString);

  return Show.fromJson(map);
}