Class: Smartsheet::Sights

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

Overview

Sights Endpoints

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Sights

Returns a new instance of Sights.



13
14
15
16
17
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 13

def initialize(client)
  @client = client

  @share = SightsShare.new(client)
end

Instance Attribute Details

#shareSightsShare (readonly)

Returns:



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 9

class Sights
  attr_reader :client, :share
  private :client

  def initialize(client)
    @client = client

    @share = SightsShare.new(client)
  end

  def copy(sight_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post, ['sights', :sight_id, 'copy'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        header_overrides: header_overrides,
        params: params,
        body: body,
        sight_id: sight_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

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

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

  def move(sight_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:post, ['sights', :sight_id, 'move'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        sight_id: sight_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

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

  def set_publish_status(sight_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:put, ['sights', :sight_id, 'publish'], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        sight_id: sight_id
    )
    client.make_request(endpoint_spec, request_spec)
  end

  def update(sight_id:, body:, params: {}, header_overrides: {})
    endpoint_spec = Smartsheet::API::EndpointSpec.new(:put, ['sights', :sight_id], body_type: :json)
    request_spec = Smartsheet::API::RequestSpec.new(
        params: params,
        header_overrides: header_overrides,
        body: body,
        sight_id: sight_id
    )
    client.make_request(endpoint_spec, request_spec)
  end
end

Instance Method Details

#copy(sight_id:, body:, params: {}, header_overrides: {}) ⇒ Object



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

def copy(sight_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:post, ['sights', :sight_id, 'copy'], body_type: :json)
  request_spec = Smartsheet::API::RequestSpec.new(
      header_overrides: header_overrides,
      params: params,
      body: body,
      sight_id: sight_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#delete(sight_id:, params: {}, header_overrides: {}) ⇒ Object



30
31
32
33
34
35
36
37
38
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 30

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

#get(sight_id:, params: {}, header_overrides: {}) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 40

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

#get_publish_status(sight_id:, params: {}, header_overrides: {}) ⇒ Object



70
71
72
73
74
75
76
77
78
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 70

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

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



50
51
52
53
54
55
56
57
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 50

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

#move(sight_id:, body:, params: {}, header_overrides: {}) ⇒ Object



59
60
61
62
63
64
65
66
67
68
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 59

def move(sight_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:post, ['sights', :sight_id, 'move'], body_type: :json)
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body,
      sight_id: sight_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#set_publish_status(sight_id:, body:, params: {}, header_overrides: {}) ⇒ Object



80
81
82
83
84
85
86
87
88
89
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 80

def set_publish_status(sight_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:put, ['sights', :sight_id, 'publish'], body_type: :json)
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body,
      sight_id: sight_id
  )
  client.make_request(endpoint_spec, request_spec)
end

#update(sight_id:, body:, params: {}, header_overrides: {}) ⇒ Object



91
92
93
94
95
96
97
98
99
100
# File 'lib/smartsheet/endpoints/sights/sights.rb', line 91

def update(sight_id:, body:, params: {}, header_overrides: {})
  endpoint_spec = Smartsheet::API::EndpointSpec.new(:put, ['sights', :sight_id], body_type: :json)
  request_spec = Smartsheet::API::RequestSpec.new(
      params: params,
      header_overrides: header_overrides,
      body: body,
      sight_id: sight_id
  )
  client.make_request(endpoint_spec, request_spec)
end