collections method

Future<Collections> collections({
  1. String? username,
  2. String? apiKey,
})

Implementation

Future<Collections> collections({
  String? username,
  String? apiKey,
}) async {
  assert(username != null || apiKey != null);
  return Collections.fromJson(
    await _request(
      Uri.parse(
        '$_baseUrl/collections${username != null ? '/$username' : ''}${apiKey != null ? '?apikey=$apiKey' : ''}',
      ),
    ),
  );
}