placesId method

Future<Set<String>> placesId({
  1. required LKAgency agency,
  2. int skip = 0,
  3. int limit = 1,
})

Implementation

Future<Set<String>> placesId(
    {required LKAgency agency, int skip = 0, int limit = 1}) async {
  final response = await http.get(
      Uri.parse(LK.placesApi(agency, skip: skip, limit: limit)),
      headers: {'Authorization': 'Bearer ${token.access}'});
  final json = jsonDecode(response.body);
  if (response.statusCode != 200) throw json['error'];
  final places = json['result'];
  return Set<String>.from(places);
}