Module: BWAPI::Client::Projects::Rules::Copy

Included in:
BWAPI::Client::Projects::Rules
Defined in:
lib/bwapi/client/projects/rules/copy.rb

Overview

Backfill module for projects/rules/copy endpoint

Instance Method Summary collapse

Instance Method Details

#create_rule_copy(project_id, rule_id, opts = {}) ⇒ Hash

Copy a rule to another project

Parameters:

  • project_id (Integer)

    id The id of project

  • rule_id (Integer)

    id The id of rule

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

    options Hash of parameters

Options Hash (opts):

  • copyToProjectId (Integer)

    the target project id

Returns:

  • (Hash)

    New rule created in project



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

def create_rule_copy(project_id, rule_id, opts = {})
  post "projects/#{project_id}/rules/#{rule_id}/copy", opts
end