Module: BWAPI::Client::Projects::StreamDashboards

Includes:
Streams
Included in:
BWAPI::Client::Projects
Defined in:
lib/bwapi/client/projects/stream_dashboards.rb,
lib/bwapi/client/projects/stream_dashboards/streams.rb

Overview

StreamDashboards module for projects/stream_dashboards endpoints

Defined Under Namespace

Modules: Streams

Instance Method Summary collapse

Methods included from Streams

#create_stream, #delete_stream, #get_stream, #get_streams, #update_stream

Instance Method Details

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

Create a new stream dashboard

Parameters:

  • project_id (Integer) —

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • id (Integer) —

    Id of the stream

  • name (String) —

    Name of the stream

  • created (String) —

    The stream creation date

  • filter (String) —

    the stream filter

Returns:

  • (Hashie::Mash) —

    New stream dashboard



58
59
60
# File 'lib/bwapi/client/projects/stream_dashboards.rb', line 58

def create_stream_dashboard project_id, opts={}
  post "projects/#{project_id}/streamDashboards", opts
end

#delete_stream_dashboard(project_id, stream_dashboard_id) ⇒ Object

Delete a stream dashboard

Parameters:

  • project_id (Integer) —

    Id of project

  • stream_dashboard_id (Integer) —

    Id of stream dashboard



80
81
82
# File 'lib/bwapi/client/projects/stream_dashboards.rb', line 80

def delete_stream_dashboard project_id, stream_dashboard_id
  delete "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}"
end

#get_stream_dashboard(project_id, stream_dashboard_id) ⇒ Hashie::Mash

Get a stream dashboard

Parameters:

  • project_id (Integer) —

    Id of project

  • stream_dashboard_id (Integer) —

    Id of stream dashboard

Returns:

  • (Hashie::Mash) —

    Stream dashboard



45
46
47
# File 'lib/bwapi/client/projects/stream_dashboards.rb', line 45

def get_stream_dashboard project_id, stream_dashboard_id
  get "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}"
end

#get_stream_dashboard_complete(project_id, stream_dashboard_id) ⇒ Hashie::Mash

Get a stream dashboard complete with streams

Parameters:

  • project_id (Integer) —

    Id of project

  • stream_dashboard_id (Integer) —

    Id of stream dashboard

Returns:

  • (Hashie::Mash) —

    Stream dashboard complete with streams



36
37
38
# File 'lib/bwapi/client/projects/stream_dashboards.rb', line 36

def get_stream_dashboard_complete project_id, stream_dashboard_id
  get "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}/complete"
end

#get_stream_dashboards_summary(project_id) ⇒ Hashie::Mash

Get a stream dashboards summary

Parameters:

  • project_id (Integer) —

    Id of project

  • opts (Hash) —

    options hash of parameters

Returns:

  • (Hashie::Mash) —

    All stream dashboards summary for project



27
28
29
# File 'lib/bwapi/client/projects/stream_dashboards.rb', line 27

def get_stream_dashboards_summary project_id
  get "projects/#{project_id}/streamDashboards/summary"
end

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

Get all stream dashboards in project

Parameters:

  • project_id (Integer) —

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • page (Integer) —

    Page of projects to retrieve

  • pageSize (Integer) —

    Results per page of results

Returns:

  • (Hashie::Mash) —

    All stream dashboards for project



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

def stream_dashboards project_id, opts={}
  get "projects/#{project_id}/streamDashboards", opts
end

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

Update a stream dashboard

Parameters:

  • project_id (Integer) —

    Id of project

  • stream_dashboard_id (Integer) —

    Id of stream dashboard

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

    options hash of parameters

Options Hash (opts):

  • id (Integer) —

    Id of the stream

  • name (String) —

    Name of the stream

  • created (String) —

    The stream creation date

  • filter (String) —

    the stream filter

Returns:

  • (Hashie::Mash) —

    Updated stream dashboard



72
73
74
# File 'lib/bwapi/client/projects/stream_dashboards.rb', line 72

def update_stream_dashboard project_id, stream_dashboard_id, opts={}
  put "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}", opts
end