blocks method
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();
}