smartsheet 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +28 -4
- data/lib/smartsheet/constants.rb +2 -1
- data/smartsheet.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dfdb074b34d136b1e899f676f8cf8807e32bdd662d69bdc5386a8ffe7cfb0f58
|
4
|
+
data.tar.gz: cda02013bf2ea4e3ffa64d4aed6d5b113e0c272cf905e37a28d963584b7b975c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07c7a7f66f6b3fe1b5e3bcc18c79eb99fb61462c1cf2b66284398cd24629dd96e97442d9507fa4b1142d22b807983be0d5c9e730e236b6d93b9f4c8decefe49d
|
7
|
+
data.tar.gz: ff81233acec8c754515b60adfa38d9e435ab4669973488e9c20a855f13bfbd1d594a7e2c9f7a3f87d605028186b55ed6a75c83c8b021e1bdb425dcd0d336844d
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.3.0] - 2019-02-11
|
10
|
+
- Added constant for smartsheetgov
|
11
|
+
- Updated documentation regarding the usage of base_url to clarify how clients can access smartsheetgov
|
12
|
+
|
9
13
|
## [1.2.0] - 2018-06-29
|
10
14
|
### Added
|
11
15
|
- Added support for 'import sheet from XLSX, CSV file' endpoints
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ The SDK supports Ruby versions 2.2 or later.
|
|
11
11
|
Add this line to your application's Gemfile:
|
12
12
|
|
13
13
|
```ruby
|
14
|
-
gem 'smartsheet', '>= 1.
|
14
|
+
gem 'smartsheet', '>= 1.3.0'
|
15
15
|
```
|
16
16
|
|
17
17
|
And then execute:
|
@@ -66,6 +66,28 @@ end
|
|
66
66
|
|
67
67
|
See the [read-write-sheet](https://github.com/smartsheet-samples/ruby-read-write-sheet) example to see a more robust use case in action.
|
68
68
|
|
69
|
+
## Conventions
|
70
|
+
|
71
|
+
Each endpoint may take a number of keyword arguments, including the special keyword argument `body` for requests that accept a request body. Smartsheet's API Ruby documentation provides the parameters expected for each endpoint.
|
72
|
+
|
73
|
+
Each endpoint also provides two optional keyword arguments:
|
74
|
+
|
75
|
+
* `params` - This option is common for specifying enhancements or additional features for an API call. It specifies the query string for the call's URL.
|
76
|
+
|
77
|
+
This must be a hash of URL query string fields to their values. For example, to make a call with the query string `?include=comments&includeAll=true`, an API call would look like the following:
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
...get( ..., params: {include: 'comments', includeAll: true})
|
81
|
+
```
|
82
|
+
|
83
|
+
* `header_overrides` - This option is less frequently used, as it overrides the HTTP headers sent by API calls on an individual basis. _Use with caution_, as some headers are required to allow the SDK to function properly.
|
84
|
+
|
85
|
+
This must be a hash of headers to override values. For example, to make a call with a modified `Assume-User` header set to `jane.doe@smartsheet.com`, an API call would look like the following:
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
...get( ..., header_overrides: {'Assume-User' => 'jane.doe@smartsheet.com'})
|
89
|
+
```
|
90
|
+
|
69
91
|
## Basic Configuration
|
70
92
|
|
71
93
|
When creating the client object, pass an object with any of the following properties to tune its behavior.
|
@@ -74,7 +96,9 @@ When creating the client object, pass an object with any of the following proper
|
|
74
96
|
|
75
97
|
* `max_retry_time` - The maximum time in seconds to retry intermittent errors. (Defaults to 15 seconds.)
|
76
98
|
|
77
|
-
* `base_url` - By default, the SDK connects to the production API URL. Provide a custom base URL to connect to other environments.
|
99
|
+
* `base_url` - By default, the SDK connects to the production API URL. Provide a custom base URL to connect to other environments. For example, to access SmartsheetGov, the `base_url` will be `https://api.smartsheetgov.com/2.0`.
|
100
|
+
* To access Smartsheetgov, you will need to specify the Smartsheetgov API URI, `https://api.smartsheetgov.com/2.0/`, as the `base_url` during creation of the Smartsheet client object. The Smartsheetgov URI is defined as a constant (`GOV_API_URL`).
|
101
|
+
|
78
102
|
|
79
103
|
## Advanced Configuration Options
|
80
104
|
### Logging Configuration
|
@@ -158,7 +182,7 @@ To invoke the passthrough, your code can call one of the following three methods
|
|
158
182
|
`response = smartsheet.request_with_file_from_path(method:, url_path:, path:, filename:, content_type:, params:, header_overrides:)`
|
159
183
|
|
160
184
|
* `method`: The method to invoke, one of `:get`, `:post`, `:put`, or `:delete`
|
161
|
-
* `url_path`: The specific API endpoint you wish to invoke. The client object base URL gets prepended to the caller’s endpoint URL argument.
|
185
|
+
* `url_path`: The specific API endpoint you wish to invoke. The client object base URL gets prepended to the caller’s endpoint URL argument.
|
162
186
|
* `body`: An optional hash of data to be passed as a JSON request body
|
163
187
|
* `file`: An opened `File` object to read as the request body, generally for file attachment endpoints
|
164
188
|
* `path`: The path of a file to be read as the request body, generally for file attachment endpoints
|
@@ -209,6 +233,6 @@ If you have any questions or issues with this SDK please post on [Stack Overflow
|
|
209
233
|
|
210
234
|
## Release Notes
|
211
235
|
|
212
|
-
Each specific release is available for download via [GitHub](https://github.com/smartsheet-platform/smartsheet-ruby-sdk/tags).
|
236
|
+
Each specific release is available for download via [GitHub](https://github.com/smartsheet-platform/smartsheet-ruby-sdk/tags). Detailed release notes are available in [CHANGELOG.md].
|
213
237
|
|
214
238
|
*Note*: Minor changes that result in a patch version increment in RubyGems (such as updates to the README) will not be tagged as a Release in GitHub.
|
data/lib/smartsheet/constants.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module Smartsheet
|
2
2
|
module Constants
|
3
|
-
VERSION = '1.
|
3
|
+
VERSION = '1.3.0'.freeze
|
4
4
|
|
5
5
|
USER_AGENT = 'smartsheet-ruby-sdk'.freeze
|
6
6
|
API_URL = 'https://api.smartsheet.com/2.0'.freeze
|
7
|
+
GOV_API_URL = 'https://api.smartsheetgov.com/2.0'.freeze
|
7
8
|
|
8
9
|
JSON_TYPE = 'application/json'.freeze
|
9
10
|
EXCEL_TYPE = 'application/vnd.ms-excel'.freeze
|
data/smartsheet.gemspec
CHANGED
@@ -45,9 +45,9 @@ Gem::Specification.new do |spec|
|
|
45
45
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
46
46
|
spec.add_development_dependency 'mocha', '~> 1.3'
|
47
47
|
spec.add_development_dependency 'timecop', '~> 0.9.1'
|
48
|
-
spec.add_development_dependency 'rubocop', '~> 0.49
|
48
|
+
spec.add_development_dependency 'rubocop', '~> 0.49'
|
49
49
|
spec.add_development_dependency 'reek', '~> 4.7'
|
50
|
-
spec.add_development_dependency 'rubycritic', '~> 3.
|
50
|
+
spec.add_development_dependency 'rubycritic', '~> 3.4'
|
51
51
|
spec.add_development_dependency 'yard', '~> 0.9'
|
52
52
|
spec.add_development_dependency 'redcarpet', '~> 3.4'
|
53
53
|
spec.add_development_dependency 'github-markup', '~> 1.6'
|
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: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Smartsheet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -170,14 +170,14 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.49
|
173
|
+
version: '0.49'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.49
|
180
|
+
version: '0.49'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: reek
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,14 +198,14 @@ dependencies:
|
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '3.
|
201
|
+
version: '3.4'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '3.
|
208
|
+
version: '3.4'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: yard
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
344
|
version: '0'
|
345
345
|
requirements: []
|
346
346
|
rubyforge_project:
|
347
|
-
rubygems_version: 2.
|
347
|
+
rubygems_version: 2.7.6
|
348
348
|
signing_key:
|
349
349
|
specification_version: 4
|
350
350
|
summary: An SDK to simplify connecting to the Smartsheet API from Ruby applications.
|