Module: BWAPI::Client::Projects::Signals::Groups

Included in:
BWAPI::Client::Projects::Signals
Defined in:
lib/bwapi/client/projects/signals/groups.rb

Overview

Groups module for projects/signals/groups endpoint

Instance Method Summary collapse

Instance Method Details

#create_signal_group(project_id, opts = {}) ⇒ Hash

Create a new signal group

Parameters:

  • projectId (Integer)

    Project ID of the Signal Group to be updated

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

    options hash of parameters

Options Hash (opts):

  • projectId (Integer)

    Project ID of Signal Group

  • queryIds (Array)

    List of query IDs in the Signal Group

  • name (String)

    Name of the Signal Group

  • subscribers (Array)

    List of the email recipients of the Signal Group

  • lastModified (Date)

    Last modified date of the Signal Group

  • id (Integer)

    ID of Signal Group

  • creator (String)

    Creator of the Signal Group

Returns:

  • (Hash)

    Retuns the new signal group



39
40
41
# File 'lib/bwapi/client/projects/signals/groups.rb', line 39

def create_signal_group(project_id, opts = {})
  post "/projects/#{project_id}/signals/groups", opts
end

#delete_signal_group(project_id, group_id) ⇒ Hash

Delete a signal group

Parameters:

  • projectId (Integer)

    Id of project

  • groupId (Integer)

    Id of group

Returns:

  • (Hash)

    Returns the deleted signal group



65
66
67
# File 'lib/bwapi/client/projects/signals/groups.rb', line 65

def delete_signal_group(project_id, group_id)
  delete "/projects/#{project_id}/signals/groups/#{group_id}"
end

#get_signal_group(project_id, group_id) ⇒ Hash

Get a specific signal group

Parameters:

  • projectId (Integer)

    Id of project

  • groupId (Integer)

    Id of group

Returns:

  • (Hash)

    Returns a specific signals group



23
24
25
# File 'lib/bwapi/client/projects/signals/groups.rb', line 23

def get_signal_group(project_id, group_id)
  get "/projects/#{project_id}/signals/groups/#{group_id}"
end

#get_signal_group_signals(project_id, group_id) ⇒ Hash

Get all signals for a specific group

Parameters:

  • projectId (Integer)

    Id of project

  • groupId (Integer)

    Id of group

Returns:

  • (Hash)

    Returns a specific signal group signals



74
75
76
# File 'lib/bwapi/client/projects/signals/groups.rb', line 74

def get_signal_group_signals(project_id, group_id)
  get "/projects/#{project_id}/signals/groups/#{group_id}/signals"
end

#signal_groups(project_id, opts = {}) ⇒ Hash

Get all signal groups

Parameters:

  • projectId (Integer)

    Id of the existing project

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

    a customizable set of options

Options Hash (opts):

  • page (Integer)

    Page of results to retrieve

  • pageSize (Integer)

    Results per page of results

Returns:

  • (Hash)

    Returns All signal groups for project



14
15
16
# File 'lib/bwapi/client/projects/signals/groups.rb', line 14

def signal_groups(project_id, opts = {})
  get "/projects/#{project_id}/signals/groups", opts
end

#update_signal_group(project_id, group_id, opts = {}) ⇒ Hash

Update a signal group

Parameters:

  • projectId (Integer)

    Project ID of the Signal Group to be updated

  • groupId (Integer)

    Id of group

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

    options hash of parameters

Options Hash (opts):

  • projectId (Integer)

    Project ID of Signal Group

  • queryIds (Array)

    List of query IDs in the Signal Group

  • name (String)

    Name of the Signal Group

  • subscribers (Array)

    List of the email recipients of the Signal Group

  • lastModified (Date)

    Last modified date of the Signal Group

  • id (Integer)

    ID of Signal Group

  • creator (String)

    Creator of the Signal Group

Returns:

  • (Hash)

    Returns the updated signal group



56
57
58
# File 'lib/bwapi/client/projects/signals/groups.rb', line 56

def update_signal_group(project_id, group_id, opts = {})
  put "/projects/#{project_id}/signals/groups/#{group_id}", opts
end