Module: Teamlab::ProjectsReports

Included in:
Project
Defined in:
lib/teamlab/modules/projects/projects_reports.rb

Overview

Module for projects reports methods

Instance Method Summary collapse

Instance Method Details

#create_report_template(name, options = {}) ⇒ Object



6
7
8
# File 'lib/teamlab/modules/projects/projects_reports.rb', line 6

def create_report_template(name, options = {})
  @request.post(['report'], { name: name }.merge(options))
end

#delete_report_template(report_id) ⇒ Object



21
22
23
# File 'lib/teamlab/modules/projects/projects_reports.rb', line 21

def delete_report_template(report_id)
  @request.delete(['report', report_id.to_s])
end

#report_template(report_id) ⇒ Hash

Returns a project report template with the ID specified in the request

Parameters:

  • report_id (Symbol, String)

    Report template ID

Returns:

  • (Hash)

    Project report template



17
18
19
# File 'lib/teamlab/modules/projects/projects_reports.rb', line 17

def report_template(report_id)
  @request.get(['report', report_id.to_s])
end

#update_report_template(report_id, name, options = {}) ⇒ Object



10
11
12
# File 'lib/teamlab/modules/projects/projects_reports.rb', line 10

def update_report_template(report_id, name, options = {})
  @request.put(['report', report_id.to_s], { name: name }.merge(options))
end