fetchLinkFiveResponse method

  1. @override
Future<LinkFiveResponseData> fetchLinkFiveResponse()
override

Call to LinkFive to get the subscriptions to show

Implementation

@override
Future<LinkFiveResponseData> fetchLinkFiveResponse() async {
  final uri = _makeUri("api/v1/subscriptions");

  final response = await httpClient.get(uri, headers: await _headers);
  LinkFiveLogger.d('Response status: ${response.statusCode}');
  LinkFiveLogger.d('Response body: ${response.body}');
  final mapBody = jsonDecode(response.body);
  final data = mapBody["data"];
  final linkFiveResponseData = LinkFiveResponseData.fromJson(data);
  return linkFiveResponseData;
}