Module: BWAPI::Client::Projects::DittoQueries

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

Overview

DittoQueries module for projects/dittoqueries endpoints

Instance Method Summary collapse

Instance Method Details

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

Create a ditto query in a project

Parameters:

  • project_id (Integer)

    Id of project

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

    options hash of parameters

Options Hash (opts):

  • id (Integer)

    Id of the query

  • name (String)

    Name of the query

Returns:

  • (Hash)

    New ditto query



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

def create_ditto_query(project_id, opts = {})
  post "projects/#{project_id}/dittoqueries", opts
end

#update_ditto_query(project_id, query_id, opts = {}) ⇒ Hash

Update an existing ditto query in a project

Parameters:

  • project_id (Integer)

    Id of project

  • query_id (Integer)

    Id of query

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

    options hash of parameters

Options Hash (opts):

  • id (Integer)

    Id of the query

  • name (String)

    Name of the query

Returns:

  • (Hash)

    Updated ditto query



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

def update_ditto_query(project_id, query_id, opts = {})
  put "projects/#{project_id}/dittoqueries/#{query_id}", opts
end