blocks method

Future<List<Account>> blocks({
  1. int limit = 40,
})
inherited

GET /api/v1/blocks

  • authenticated (requires user)
  • read:blocks

Implementation

Future<List<Account>> blocks({int limit = 40}) async {
  final response = await request(
    Method.get,
    "/api/v1/blocks",
    authenticated: true,
    payload: {
      "limit": limit.toString(),
    },
  );

  final body = List<Map<String, dynamic>>.from(json.decode(response.body));

  return body.map((m) => Account.fromJson(m)).toList();
}