getByName method

Fetches the hotspots which map to the given 3-word animal name.

The name must be all lower-case with dashes between the words, e.g. 'tall-plum-griffin'. Because of collisions in the Angry Purple Tiger algorithm, the given name might map to more than one hotspot.

Implementation

Future<HeliumResponse<List<HeliumHotspot>>> getByName(String name) async {
  return _client._doRequest(HeliumRequest(
    path: '/v1/hotspots/name/$name',
    extractResponse: (json) =>
        HeliumRequest.mapDataList(json, (h) => HeliumHotspot.fromJson(h)),
  ));
}