place method

Future<List<Trends>> place({
  1. required int id,
  2. String? exclude,
  3. TransformResponse<List<Trends>> transform = defaultTrendsListTransform,
})

Returns the top 50 trending topics for a specific WOEID, if trending information is available for it.

id: The Yahoo! Where On Earth ID of the location to return trending information for. Global information is available by using 1 as the WOEID.

exclude: Setting this equal to hashtags will remove all hashtags from the trends list.

transform: Can be used to parse the request. By default, the response is parsed in an isolate.

See https://developer.twitter.com/en/docs/twitter-api/v1/trends/trends-for-location/api-reference/get-trends-place.

Implementation

Future<List<Trends>> place({
  required int id,
  String? exclude,
  TransformResponse<List<Trends>> transform = defaultTrendsListTransform,
}) {
  final params = <String, String>{}
    ..addParameter('id', id)
    ..addParameter('exclude', exclude);

  return client
      .get(
        Uri.https('api.twitter.com', '1.1/trends/place.json', params),
      )
      .then(transform);
}