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

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

Overview

Streams module for projects/stream_dashboards/streams endpoints

Instance Method Summary collapse

Instance Method Details

#create_stream(project_id, stream_dashboard_id, opts = {}) ⇒ Hash

Create a stream in 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)

    Creation date of stream

  • filter (String)

    Filter of the stream

  • settings (String)

    Settings of the stream

  • lastModified (String)

    Last modification date of stream

Returns:

  • (Hash)

    Specific stream



40
41
42
# File 'lib/bwapi/client/projects/stream_dashboards/streams.rb', line 40

def create_stream(project_id, stream_dashboard_id, opts = {})
  post "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}/streams", opts
end

#delete_stream(project_id, stream_dashboard_id, stream_id) ⇒ Hash

Delete a stream in a stream dashboard

Parameters:

  • project_id (Integer)

    Id of project

  • stream_dashboard_id (Integer)

    Id of stream dashboard

  • stream_id (Integer)

    Id of the stream

Returns:

  • (Hash)

    Deleted stream



67
68
69
# File 'lib/bwapi/client/projects/stream_dashboards/streams.rb', line 67

def delete_stream(project_id, stream_dashboard_id, stream_id)
  delete "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}/streams/#{stream_id}"
end

#get_stream(project_id, stream_dashboard_id, stream_id) ⇒ Hash

Get a stream in a stream dashboard

Parameters:

  • project_id (Integer)

    Id of project

  • stream_dashboard_id (Integer)

    Id of stream dashboard

  • stream_id (Integer)

    Id of the stream

Returns:

  • (Hash)

    Specific stream



24
25
26
# File 'lib/bwapi/client/projects/stream_dashboards/streams.rb', line 24

def get_stream(project_id, stream_dashboard_id, stream_id)
  get "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}/streams/#{stream_id}"
end

#get_streams(project_id, stream_dashboard_id) ⇒ Hash

Get all streams in a stream dashboard

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash)

    options hash of parameters

Returns:

  • (Hash)

    All stream dashboards for project



14
15
16
# File 'lib/bwapi/client/projects/stream_dashboards/streams.rb', line 14

def get_streams(project_id, stream_dashboard_id)
  get "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}/streams"
end

#update_stream(project_id, stream_dashboard_id, stream_id, opts = {}) ⇒ Hash

Update a stream in a stream dashboard

Parameters:

  • project_id (Integer)

    Id of project

  • stream_dashboard_id (Integer)

    Id of stream dashboard

  • stream_id (Integer)

    Id of the stream

  • 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)

    Creation date of stream

  • filter (String)

    Filter of the stream

  • settings (String)

    Settings of the stream

  • lastModified (String)

    Last modification date of stream

Returns:

  • (Hash)

    Updated stream



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

def update_stream(project_id, stream_dashboard_id, stream_id, opts = {})
  put "projects/#{project_id}/streamDashboards/#{stream_dashboard_id}/streams/#{stream_id}", opts
end