smartsheet 2.77.2 → 2.86.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 224149f1d49bddeb6b9118c1ed86baf10c8871c344f2a544fd59eaffb7cf5800
4
- data.tar.gz: c2e832ea3f9f941aa4edcdaa47463e5221b0c16c3c097775a335d8faf295b95f
3
+ metadata.gz: ffd68622e2b54b475c12cc9fb2a9bd509ed7171692724457fa12387e9ecdb304
4
+ data.tar.gz: 1946dda59346f24a5ccb337213693ceb2a60e7f21817cce53be839306f412619
5
5
  SHA512:
6
- metadata.gz: d57f77a425a2a1c27a0646af69be932036c235c16b680ec8974f611398b814997ef243724995a90ac8f977cb6a02c63a858b196d8bb1d1f6ecd5677ed32a6897
7
- data.tar.gz: ddfbb2ce0296dc65bb42ddeb99763a5ad68c4daead32e97503d84433898f5b27696f65c8bc03a9c1f29e1cf48750bd23c610e06aa6463c5194b34c17d6ef6baa
6
+ metadata.gz: 1a04ac35eb3e65b2161e5f756720606dc9d2b3db1f82b9a289aed5172e9bb40feed5c2f7618fbccebbec2927beb10712d9012be292de0ff07b1d5e592d767a50
7
+ data.tar.gz: 392bc7c5a60f258c78d4dc50ed4f34cf349a73e034adfb26650a63c10c1ca06fecf4856437978ceda02aef3928158988d7a58993b071bdd1016effcd2e7e80dc
@@ -1,3 +1,4 @@
1
+ dist: trusty
1
2
  sudo: false
2
3
  language: ruby
3
4
  rvm:
@@ -6,19 +6,29 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.86.0] - 2019-11-18
10
+ ### Added
11
+ - Support for sheet summary endpoints
12
+ - Missing implementation for add profile image
13
+
9
14
  ## [2.77.2] - 2019-06-06
15
+ ### Added
10
16
  - Automated publication process to RubyGems using Travis CI
11
17
 
12
18
  ## [2.77.0] - 2019-05-08
13
- - Added events endpoint to retrieve events that are occurring in your Smartsheet plan.
19
+ ### Added
20
+ - Events endpoint to retrieve events that are occurring in your Smartsheet plan.
14
21
 
15
22
  ## [1.3.0] - 2019-02-11
16
- - Added constant for smartsheetgov
17
- - Updated documentation regarding the usage of base_url to clarify how clients can access smartsheetgov
23
+ ### Added
24
+ - Constant for smartsheetgov
25
+
26
+ ### Changed
27
+ - Documentation regarding the usage of base_url to clarify how clients can access smartsheetgov
18
28
 
19
29
  ## [1.2.0] - 2018-06-29
20
30
  ### Added
21
- - Added support for 'import sheet from XLSX, CSV file' endpoints
31
+ - Support for 'import sheet from XLSX, CSV file' endpoints
22
32
 
23
33
  ## [1.1.0] - 2018-03-16
24
34
  ### Added
data/README.md CHANGED
@@ -158,6 +158,8 @@ After checking out the repo, run `bin/setup` to install dependencies. You can al
158
158
 
159
159
  To install this gem onto your local machine, run `bundle exec rake install`.
160
160
 
161
+ If you are developing with Ruby 2.2.x, you may encounter basic SSL connection errors when making calls with the API. We recommend either updating to Ruby 2.3+, or following the directions in this Faraday issue: https://github.com/lostisland/faraday/issues/392
162
+
161
163
  ### Running the Tests
162
164
  #### All
163
165
  1. Run `rake test`. Note, the mock API tests will fail unless the mock server is running. See [Mock API Tests](#mock-api-tests)
@@ -1,6 +1,6 @@
1
1
  module Smartsheet
2
2
  module Constants
3
- VERSION = '2.77.2'.freeze
3
+ VERSION = '2.86.0'.freeze
4
4
 
5
5
  USER_AGENT = 'smartsheet-ruby-sdk'.freeze
6
6
  API_URL = 'https://api.smartsheet.com/2.0'.freeze
@@ -11,6 +11,7 @@ require 'smartsheet/endpoints/sheets/cross_sheet_references'
11
11
  require 'smartsheet/endpoints/sheets/discussions'
12
12
  require 'smartsheet/endpoints/sheets/rows'
13
13
  require 'smartsheet/endpoints/sheets/sheets_attachments'
14
+ require 'smartsheet/endpoints/sheets/sheets_summaries'
14
15
  require 'smartsheet/endpoints/sheets/sheets_share'
15
16
 
16
17
  module Smartsheet
@@ -31,6 +32,8 @@ module Smartsheet
31
32
  # @return [CrossSheetReferences]
32
33
  # @!attribute [r] discussions
33
34
  # @return [Discussions]
35
+ # @!attribute [r] summaries
36
+ # @return [Summaries]
34
37
  # @!attribute [r] rows
35
38
  # @return [Rows]
36
39
  # @!attribute [r] share
@@ -39,7 +42,7 @@ module Smartsheet
39
42
  include Smartsheet::Constants
40
43
 
41
44
  attr_reader :client, :attachments, :automation_rules, :cells, :columns, :comments,
42
- :cross_sheet_references, :discussions, :rows, :share
45
+ :cross_sheet_references, :discussions, :summaries, :rows, :share
43
46
  private :client
44
47
 
45
48
  def initialize(client)
@@ -52,6 +55,7 @@ module Smartsheet
52
55
  @comments = Comments.new(client)
53
56
  @cross_sheet_references = CrossSheetReferences.new(client)
54
57
  @discussions = Discussions.new(client)
58
+ @summaries = SheetsSummaries.new(client)
55
59
  @rows = Rows.new(client)
56
60
  @share = SheetsShare.new(client)
57
61
  end
@@ -0,0 +1,123 @@
1
+ require 'smartsheet/api/file_spec'
2
+
3
+ module Smartsheet
4
+ # Sheet Summaries Endpoints
5
+ # @see https://smartsheet-platform.github.io/api-docs/?ruby#______ API Sheet Summaries Docs
6
+ class SheetsSummaries
7
+ attr_reader :client
8
+ private :client
9
+
10
+ def initialize(client)
11
+ @client = client
12
+ end
13
+
14
+ def get(sheet_id:, params: {}, header_overrides: {})
15
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['sheets', :sheet_id, 'summary'])
16
+ request_spec = Smartsheet::API::RequestSpec.new(
17
+ params: params,
18
+ header_overrides: header_overrides,
19
+ sheet_id: sheet_id
20
+ )
21
+ client.make_request(endpoint_spec, request_spec)
22
+ end
23
+
24
+ def get_fields(sheet_id:, params: {}, header_overrides: {})
25
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['sheets', :sheet_id, 'summary', 'fields'])
26
+ request_spec = Smartsheet::API::RequestSpec.new(
27
+ params: params,
28
+ header_overrides: header_overrides,
29
+ sheet_id: sheet_id
30
+ )
31
+ client.make_request(endpoint_spec, request_spec)
32
+ end
33
+
34
+ def add_fields(sheet_id:, body:, params: {}, header_overrides: {})
35
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(
36
+ :post,
37
+ ['sheets', :sheet_id, 'summary', 'fields'],
38
+ body_type: :json
39
+ )
40
+ request_spec = Smartsheet::API::RequestSpec.new(
41
+ params: params,
42
+ header_overrides: header_overrides,
43
+ body: body,
44
+ sheet_id: sheet_id
45
+ )
46
+ client.make_request(endpoint_spec, request_spec)
47
+ end
48
+
49
+ def delete_fields(sheet_id:, params: {}, header_overrides: {})
50
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(:delete, ['sheets', :sheet_id, 'summary', 'fields'])
51
+ request_spec = Smartsheet::API::RequestSpec.new(
52
+ params: params,
53
+ header_overrides: header_overrides,
54
+ sheet_id: sheet_id
55
+ )
56
+ client.make_request(endpoint_spec, request_spec)
57
+ end
58
+
59
+ def update_fields(sheet_id:, body:, params: {}, header_overrides: {})
60
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(
61
+ :put,
62
+ ['sheets', :sheet_id, 'summary', 'fields'],
63
+ body_type: :json
64
+ )
65
+ request_spec = Smartsheet::API::RequestSpec.new(
66
+ params: params,
67
+ header_overrides: header_overrides,
68
+ body: body,
69
+ sheet_id: sheet_id
70
+ )
71
+ client.make_request(endpoint_spec, request_spec)
72
+ end
73
+
74
+ def add_image(
75
+ sheet_id:,
76
+ field_id:,
77
+ file:,
78
+ filename:,
79
+ file_length:,
80
+ content_type: '',
81
+ params: {},
82
+ header_overrides: {}
83
+ )
84
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(
85
+ :post,
86
+ ['sheets', :sheet_id, 'summary', 'fields', :field_id, 'images'],
87
+ body_type: :file
88
+ )
89
+ request_spec = Smartsheet::API::RequestSpec.new(
90
+ header_overrides: header_overrides,
91
+ params: params,
92
+ file_spec: Smartsheet::API::ObjectFileSpec.new(file, filename, file_length, content_type),
93
+ sheet_id: sheet_id,
94
+ field_id: field_id
95
+ )
96
+ client.make_request(endpoint_spec, request_spec)
97
+ end
98
+
99
+ def add_image_from_path(
100
+ sheet_id:,
101
+ field_id:,
102
+ path:,
103
+ filename: nil,
104
+ content_type: '',
105
+ params: {},
106
+ header_overrides: {}
107
+ )
108
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(
109
+ :post,
110
+ ['sheets', :sheet_id, 'summary', 'fields', :field_id, 'images'],
111
+ body_type: :file
112
+ )
113
+ request_spec = Smartsheet::API::RequestSpec.new(
114
+ header_overrides: header_overrides,
115
+ params: params,
116
+ file_spec: Smartsheet::API::PathFileSpec.new(path, filename, content_type),
117
+ sheet_id: sheet_id,
118
+ field_id: field_id
119
+ )
120
+ client.make_request(endpoint_spec, request_spec)
121
+ end
122
+ end
123
+ end
@@ -74,5 +74,51 @@ module Smartsheet
74
74
  )
75
75
  client.make_request(endpoint_spec, request_spec)
76
76
  end
77
+
78
+ def add_profile_image(
79
+ user_id:,
80
+ file:,
81
+ filename:,
82
+ file_length:,
83
+ content_type: '',
84
+ params: {},
85
+ header_overrides: {}
86
+ )
87
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(
88
+ :post,
89
+ ['users', :user_id, 'profileimage'],
90
+ body_type: :file
91
+ )
92
+ request_spec = Smartsheet::API::RequestSpec.new(
93
+ header_overrides: header_overrides,
94
+ params: params,
95
+ file_spec: Smartsheet::API::ObjectFileSpec.new(file, filename, file_length, content_type),
96
+ user_id: user_id
97
+ )
98
+ client.make_request(endpoint_spec, request_spec)
99
+ end
100
+
101
+ def add_profile_image_from_path(
102
+ user_id:,
103
+ path:,
104
+ filename: nil,
105
+ content_type: '',
106
+ params: {},
107
+ header_overrides: {}
108
+ )
109
+ endpoint_spec = Smartsheet::API::EndpointSpec.new(
110
+ :post,
111
+ ['users', :user_id, 'profileimage'],
112
+ body_type: :file
113
+ )
114
+ request_spec = Smartsheet::API::RequestSpec.new(
115
+ header_overrides: header_overrides,
116
+ params: params,
117
+ file_spec: Smartsheet::API::PathFileSpec.new(path, filename, content_type),
118
+ user_id: user_id
119
+ )
120
+ client.make_request(endpoint_spec, request_spec)
121
+ end
122
+
77
123
  end
78
124
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.77.2
4
+ version: 2.86.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smartsheet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-14 00:00:00.000000000 Z
11
+ date: 2019-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -311,6 +311,7 @@ files:
311
311
  - lib/smartsheet/endpoints/sheets/sheets.rb
312
312
  - lib/smartsheet/endpoints/sheets/sheets_attachments.rb
313
313
  - lib/smartsheet/endpoints/sheets/sheets_share.rb
314
+ - lib/smartsheet/endpoints/sheets/sheets_summaries.rb
314
315
  - lib/smartsheet/endpoints/sights/sights.rb
315
316
  - lib/smartsheet/endpoints/sights/sights_share.rb
316
317
  - lib/smartsheet/endpoints/templates/templates.rb
@@ -345,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
346
  - !ruby/object:Gem::Version
346
347
  version: '0'
347
348
  requirements: []
348
- rubygems_version: 3.0.4
349
+ rubygems_version: 3.0.6
349
350
  signing_key:
350
351
  specification_version: 4
351
352
  summary: An SDK to simplify connecting to the Smartsheet API from Ruby applications.