getUserFollowedGroupsResponse method

Future<Response> getUserFollowedGroupsResponse(
  1. String sessionToken, {
  2. int? offset,
  3. int? limit,
})
inherited

Endpoint used: GET /user/follows/group

Returns a http response with details of the all the Groups that the user follows, the sessionToken is the session token obtained using the login() function

Implementation

Future<http.Response> getUserFollowedGroupsResponse(String sessionToken,
    {int? offset, int? limit}) async {
  final _offset = '&offset=${offset ?? 0}';
  final _limit = '&limit=${limit ?? 10}';
  final unencodedPath = '/user/follows/group?$_offset$_limit';
  final uri = 'https://$AUTHORITY$unencodedPath';
  var response = await http.get(Uri.parse(uri), headers: {
    HttpHeaders.contentTypeHeader: 'application/json',
    HttpHeaders.authorizationHeader: 'Bearer $sessionToken'
  });
  return response;
}