fetch function

Future<List<NBResponse>> fetch({
  1. String? endpoint = null,
  2. int amount = 1,
})

Quick function to fetch a response

If it's going to be used multiple times, it's better to initiate a Client class and use its fetch method

Implementation

Future<List<NBResponse>> fetch(
    {String? endpoint = null, int amount = 1}) async {
  return Client().fetch(endpoint: endpoint, amount: amount);
}