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

Included in:
BWAPI::Client::Projects::Data
Defined in:
lib/bwapi/client/projects/data/volume.rb

Overview

Volume module for projects/data/volume endpoints

Instance Method Summary collapse

Instance Method Details

#data_date_ranges_days(project_id, opts = {}) ⇒ Hashie::Mash

Get all chart data for date ranges broken down by days

Parameters:

  • project_id (Integer) —

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • filter (Hash) —

    The filters to apply

  • dateRanges (Array) —

    Date range ids

Returns:

  • (Hashie::Mash) —

    All Chart data mentions



15
16
17
# File 'lib/bwapi/client/projects/data/volume.rb', line 15

def data_date_ranges_days project_id, opts={}
  get "projects/#{project_id}/data/volume/dataRanges/days", opts
end

#data_volume_queries_top_sites(project_id, opts = {}) ⇒ Object

Get a sub (top 10, by volume) items of the sites dimension

Parameters:

  • project_id (Integer) —

    Id of project

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

    a customizable set of options

Options Hash (opts):

  • filter (Hash) —

    The filters to apply



23
24
25
# File 'lib/bwapi/client/projects/data/volume.rb', line 23

def data_volume_queries_top_sites project_id, opts={}
  get "projects/#{project_id}/data/volume/queries/topsites", opts
end

#data_volume_top_authors_queries(project_id, opts = {}) ⇒ Object

Get top authors for given query IDs

Parameters:

  • project_id (Integer) —

    Id of project

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

    a customizable set of options

Options Hash (opts):

  • filter (Hash) —

    The filters to apply

  • limit (Integer) —

    The limit to return

  • orderBy (String) —

    Parameter to sort by

  • orderDirection (String) —

    Direction of sort



60
61
62
# File 'lib/bwapi/client/projects/data/volume.rb', line 60

def data_volume_top_authors_queries project_id, opts={}
  get "projects/#{project_id}/data/volume/topauthors/queries", opts
end

#data_volume_top_authors_queries_alt(project_id, opts = {}) ⇒ Object

Get top authors for given query IDs alternative

Parameters:

  • project_id (Integer) —

    Id of project

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

    a customizable set of options

Options Hash (opts):

  • filter (Hash) —

    The filters to apply

  • limit (Integer) —

    The limit to return

  • orderBy (String) —

    Parameter to sort by

  • orderDirection (String) —

    Direction of sort



71
72
73
# File 'lib/bwapi/client/projects/data/volume.rb', line 71

def data_volume_top_authors_queries_alt project_id, opts={}
  get "projects/#{project_id}/data/volume/topauthors/queries/alt", opts
end

#data_volume_top_sites_queries(project_id, opts = {}) ⇒ Object

Get top sites for given query IDs

Parameters:

  • project_id (Integer) —

    Id of project

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

    a customizable set of options

Options Hash (opts):

  • filter (Hash) —

    The filters to apply

  • limit (Integer) —

    The limit to return

  • orderBy (String) —

    Parameter to sort by

  • orderDirection (String) —

    Direction of sort



82
83
84
# File 'lib/bwapi/client/projects/data/volume.rb', line 82

def data_volume_top_sites_queries project_id, opts={}
  get "projects/#{project_id}/data/volume/topsites/queries", opts
end

#data_volume_top_tweeters_queries(project_id, opts = {}) ⇒ Object

Get top tweeters for given query IDs

Parameters:

  • project_id (Integer) —

    Id of project

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

    a customizable set of options

Options Hash (opts):

  • filter (Hash) —

    The filters to apply

  • limit (Integer) —

    The limit to return

  • orderBy (String) —

    Parameter to sort by

  • orderDirection (String) —

    Direction of sort



93
94
95
# File 'lib/bwapi/client/projects/data/volume.rb', line 93

def data_volume_top_tweeters_queries project_id, opts={}
  get "projects/#{project_id}/data/volume/toptweeters/queries", opts
end

#data_volume_topics_compare(project_id, criteria, opts = {}) ⇒ Object

Get a list of topics compared by criteria using two different values for that criteria

Parameters:

  • project_id (Integer) —

    Id of project

  • criteria (String) —

    The comparison criteria

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

    a customizable set of options

Options Hash (opts):

  • criteriaValue1 (String) —

    Value one for criteria

  • criteriaValue2 (String) —

    Value one for criteria

  • filter (Hash) —

    The filters to apply

  • minDifference (Float) —

    The minimum criteria difference for a topic to be returned

  • minVolume (Integer) —

    The minimum volume (number of mentions) for a topic to be returned

  • limit (Integer) —

    The limit to return

  • sampleSize (Integer) —

    The sample size



38
39
40
# File 'lib/bwapi/client/projects/data/volume.rb', line 38

def data_volume_topics_compare project_id, criteria, opts={}
  get "projects/#{project_id}/data/volume/topics/compare/#{criteria}", opts
end

#data_volume_topics_queries(project_id, opts = {}) ⇒ Object

Get top topics for given query IDs

Parameters:

  • project_id (Integer) —

    Id of project

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

    a customizable set of options

Options Hash (opts):

  • filter (Hash) —

    The filters to apply

  • limit (Integer) —

    The limit to return

  • orderBy (String) —

    Parameter to sort by

  • orderDirection (String) —

    Direction of sort



49
50
51
# File 'lib/bwapi/client/projects/data/volume.rb', line 49

def data_volume_topics_queries project_id, opts={}
  get "projects/#{project_id}/data/volume/topics/queries", opts
end