following method

Future<List<Account>> following(
  1. String id, {
  2. int limit = 40,
})
inherited

Accounts which the given account is following, if network is not hidden by the account owner.

GET /api/v1/accounts/:id/following

  • authenticated
  • read read:accounts

Implementation

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

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

  /// TODO: implement link headers for pagination

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