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 = {}) ⇒ Hashie::Mash

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:

  • (Hashie::Mash)

    Specific stream



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

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) ⇒ Hashie::Mash

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:

  • (Hashie::Mash)

    Deleted stream



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

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) ⇒ Hashie::Mash

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:

  • (Hashie::Mash)

    Specific stream



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

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) ⇒ Hashie::Mash

Get all streams in a stream dashboard

Parameters:

  • project_id (Integer)

    Id of project

  • opts (Hash)

    options hash of parameters

Returns:

  • (Hashie::Mash)

    All stream dashboards for project



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

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 = {}) ⇒ Hashie::Mash

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:

  • (Hashie::Mash)

    Updated stream



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

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