getFollowings method

Future<OrderedPagedCollection> getFollowings(
  1. String followingsEndpoint
)

Implementation

Future<OrderedPagedCollection> getFollowings(
    String followingsEndpoint) async {
  Uri followingsEndpointUri = Uri.parse(followingsEndpoint);

  if (followingsEndpointUri.authority != Config.domainName) {
    followingsEndpointUri = followingsEndpointUri.asProxyUri();
  }

  http.Response response = await http.get(
    followingsEndpointUri,
    headers: <String, String>{"Accept": "application/json"},
  );

  OrderedPagedCollection collection = OrderedPagedCollection.fromJson(
      jsonDecode(utf8.decode(response.bodyBytes)));
  return collection;
}