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

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

  • backdate (Boolean) —

    Starts a backfill if true

Returns:

  • (Hashie::Mash) —

    New rule created in project



16
17
18
# File 'lib/bwapi/client/projects/rules/copy.rb', line 16

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