Class: Smartsheet::Templates

Inherits:
Object
  • Object
show all
Defined in:
lib/smartsheet/endpoints/templates/templates.rb

Overview

Templates Endpoints

See Also:

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Templates

Returns a new instance of Templates.



8
9
10
# File 'lib/smartsheet/endpoints/templates/templates.rb', line 8

def initialize(client)
  @client = client
end

Instance Method Details

#list(params: {}, header_overrides: {}) ⇒ Object



21
22
23
24
25
26
27
28
# File 'lib/smartsheet/endpoints/templates/templates.rb', line 21

def list(params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['templates'])
  request_spec = Smartsheet::API::RequestSpec.new(
      header_overrides: header_overrides,
      params: params
  )
  client.make_request(endpoint_spec, request_spec)
end

#list_public(params: {}, header_overrides: {}) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/smartsheet/endpoints/templates/templates.rb', line 12

def list_public(params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['templates', 'public'])
  request_spec = Smartsheet::API::RequestSpec.new(
      header_overrides: header_overrides,
      params: params
  )
  client.make_request(endpoint_spec, request_spec)
end