getPosts<T> method

Future<OrderedCollectionPage<T>> getPosts<T>(
  1. String nextUrl
)

Implementation

Future<OrderedCollectionPage<T>> getPosts<T>(String nextUrl) async {
  http.Response pageResponse = await AuthBaseApi.get(
    url: Uri.parse(nextUrl),
  );

  OrderedCollectionPage<T> collection = OrderedCollectionPage<T>.fromJson(jsonDecode(utf8.decode(pageResponse.bodyBytes)));

  return collection;
}