<commit_before>class Twitter::Client
  @@TRENDS_URIS = {
    :locations => '/trends/available.json',
    :global => '/trends.json',
    :current => '/trends/current.json',
    :daily => '/trends/daily.json',
    :weekly => '/trends/weekly.json',
    :local => '/trends/',
  }

  # Provides access to the Twitter list trends API.
  # 
  # By default you will receive top ten topics that are trending on Twitter.
  def trends(type = :global)
    uri = @@TRENDS_URIS[type]
    response = rest_oauth_connect(:get, uri)
    bless_models(Twitter::Trendline.unmarshal(response.body))
  end
end<commit_msg>Support querying of locations for trends API<commit_after>class Twitter::Client
  @@TRENDS_URIS = {
    :locations => '/trends/available.json',
    :global => '/trends.json',
    :current => '/trends/current.json',
    :daily => '/trends/daily.json',
    :weekly => '/trends/weekly.json',
    :local => '/trends/',
  }

  # Provides access to the Twitter list trends API.
  # 
  # By default you will receive top ten topics that are trending on Twitter.
  def trends(type = :global)
    uri = @@TRENDS_URIS[type]
    response = rest_oauth_connect(:get, uri)
    if type === :locations
      bless_models(Twitter::Location.unmarshal(response.body))
    else
      bless_models(Twitter::Trendline.unmarshal(response.body))
    end
  end
end
{'fraction_non_alphanumeric': 0.14221556886227546, 'fraction_numerical': 0.0, 'mean_word_length': 3.4271523178807946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '942078', 'n_tokens_mistral': 471, 'n_tokens_neox': 436, 'n_words': 105}