getIndices method
It makes a GET request to the /1/indexes
endpoint, and returns an AlgoliaIndexesSnapshot
object
Returns: A Future of type AlgoliaIndexesSnapshot.
Implementation
Future<AlgoliaIndexesSnapshot> getIndices() async {
var response = await _apiCall(
ApiRequestType.get,
'indexes',
);
Map<String, dynamic> body = json.decode(response.body);
if (!(response.statusCode >= 200 && response.statusCode < 300)) {
throw AlgoliaError._(body, response.statusCode);
}
return AlgoliaIndexesSnapshot._(this, body);
}