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

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

Instance Method Summary collapse

Instance Method Details

#data(id, aggregate, dimension_one, dimension_two, opts = {}) ⇒ Hashie::Mash

Get all chart data for the requested dimensions

Options Hash (opts):

  • projectId (Integer)

    Id of the project

  • filter (Hash)

    The filters to apply



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

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

#data_date_ranges_days(id, opts) ⇒ Hashie::Mash

Get all chart data for date ranges broken down by days

Options Hash (opts):

  • projectId (Integer)

    Id of the project

  • filter (Hash)

    The filters to apply

  • dateRanges (Array)

    Date range ids



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

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

#data_mentions(id, opts = {}) ⇒ Hashie::Mash

Get mentions that fall within the submitted filters

Options Hash (opts):

  • projectId (Integer)

    Id of the project

  • filter (Hash)

    The filters to apply

  • page (Integer)

    Page of projects to retrieve

  • pageSize (Integer)

    Results per page of results

  • :orderBy (String)

    Parameter to sort by

  • :orderDirection (String)

    Direction of sort

  • :orderByCategory (Integer)

    Category to sort by when orderBy category



44
45
46
# File 'lib/bwapi/client/projects/data.rb', line 44

def data_mentions id, opts={}
  get "projects/#{id}/data/mentions", opts
end

#update_data_mentions(id, opts = {}) ⇒ Hashie::Mash

Update mentions for project

Options Hash (opts):

  • projectId (Integer)

    Id of the project

  • List (Hash)

    The patches to be applied



55
56
57
# File 'lib/bwapi/client/projects/data.rb', line 55

def update_data_mentions id, opts={}
  patch "projects/#{id}/data/mentions", opts
end