Module: BWAPI::Client::Projects::Data

Includes:
Mentions, Volume
Included in:
BWAPI::Client::Projects
Defined in:
lib/bwapi/client/projects/data.rb,
lib/bwapi/client/projects/data/volume.rb,
lib/bwapi/client/projects/data/mentions.rb,
lib/bwapi/client/projects/data/mentions/notes.rb

Overview

Data module for projects/data endpoints

Defined Under Namespace

Modules: Mentions, Volume

Instance Method Summary collapse

Methods included from Volume

#data_volume_date_ranges_days, #data_volume_queries_top_sites, #data_volume_top_authors_queries, #data_volume_top_authors_queries_alt, #data_volume_top_sites_queries, #data_volume_top_tweeters_queries, #data_volume_topics_compare, #data_volume_topics_queries

Methods included from Mentions

#data_mentions, #data_mentions_fulltext, #data_mentions_tweets, #update_data_mentions

Methods included from Mentions::Notes

#create_mention_note, #mention_note, #patch_mention_note, #update_mention_note

Instance Method Details

#data(project_id, aggregate, dimension_one, dimension_two, opts = {}) ⇒ Hash

Get all chart data for the requested dimensions

Parameters:

  • project_id (Integer)

    Id of project

  • aggregate (String)

    Aggregate value

  • dimension_one (String)

    Dimension 1 value

  • dimension_two (String)

    Dimension 2 value

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • filter (Hash)

    The filters to apply

Returns:

  • (Hash)

    All Chart data mentions



18
19
20
# File 'lib/bwapi/client/projects/data.rb', line 18

def data(project_id, aggregate, dimension_one, dimension_two, opts = {})
  get "projects/#{project_id}/data/#{aggregate}/#{dimension_one}/#{dimension_two}", opts
end

#data_headlines(project_id, opts = {}) ⇒ Hash

Get headline figures for specified channels

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash) (defaults to: {})

    options hash of parameters

Options Hash (opts):

  • filter (Hash)

    The filters to apply

Returns:

  • (Hash)

    Headline figures for spedified channels



28
29
30
# File 'lib/bwapi/client/projects/data.rb', line 28

def data_headlines(project_id, opts = {})
  get "projects/#{project_id}/data/headlines", opts
end