Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 150596b

Browse files
authored
Merge pull request #75 from smartsheet-platform/smartsheetgov
Smartsheetgov
2 parents 6cd45c9 + 4a337ec commit 150596b

File tree

7 files changed

+75
-158
lines changed

7 files changed

+75
-158
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## Unreleased
9+
10+
## 1.5.0 - February 18, 2019
911
- Updated documentation regarding the usage of baseUrl to clarify how clients can access smartsheetgov
12+
- Added constant for smartsheetgov
1013

1114
## 1.4.2 - February 11, 2019
1215
- Update `extend` dependency version to resolve security vulnerability

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,19 @@ When creating the Smartsheet client, set the base URL by passing it into the con
147147
148148
```javascript
149149
var smartsheet = require('smartsheet').createClient({
150-
baseUrl: 'https://new-base-url.smartsheet.com/api/v2'
150+
baseUrl: smartsheet.smartSheetURIs.defaultBaseURI
151151
});
152152
```
153153
154-
To create a SmartsheetGov client, the `baseUrl` will need to be `https://api.smartsheetgov.com/2.0`.
154+
#### Working With Smartsheetgov.com Accounts
155+
If you need to access Smartsheetgov you will need to specify the Smartsheetgov API URI as the `baseUrl` during creation of the Smartsheet client object. SmartsheetGov uses a base URI of `https://api.smartsheetgov.com/2.0/`. The Smartsheetgov URI is defined as a constant (`smartSheetURIs.govBaseURI`).
156+
157+
Invoke the SmartsheetBuilder with the base URI pointing to Smartsheetgov:
158+
```javascript
159+
var smartsheet = require('smartsheet').createClient({
160+
baseUrl: smartsheet.smartSheetURIs.govBaseURI
161+
});
162+
```
155163

156164
## Testing
157165

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,8 @@ exports.createClient = function(clientOptions) {
105105
workspaces : require('./lib/workspaces/').create(options)
106106
};
107107
};
108+
109+
exports.smartSheetURIs = {
110+
defaultBaseURI: 'https://api.smartsheet.com/2.0/',
111+
govBaseURI: 'https://api.smartsheetgov.com/2.0'
112+
}

lib/utils/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ exports.sheet = {
8383
width: 150
8484
}
8585
]
86-
};
86+
};

0 commit comments

Comments
 (0)