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

Commit

Permalink
Merge pull request #75 from smartsheet-platform/smartsheetgov
Browse files Browse the repository at this point in the history
Smartsheetgov
  • Loading branch information
kfansler authored Feb 19, 2019
2 parents 6cd45c9 + 4a337ec commit 150596b
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 158 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

## 1.5.0 - February 18, 2019
- Updated documentation regarding the usage of baseUrl to clarify how clients can access smartsheetgov
- Added constant for smartsheetgov

## 1.4.2 - February 11, 2019
- Update `extend` dependency version to resolve security vulnerability
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,19 @@ When creating the Smartsheet client, set the base URL by passing it into the con
```javascript
var smartsheet = require('smartsheet').createClient({
baseUrl: 'https://new-base-url.smartsheet.com/api/v2'
baseUrl: smartsheet.smartSheetURIs.defaultBaseURI
});
```
To create a SmartsheetGov client, the `baseUrl` will need to be `https://api.smartsheetgov.com/2.0`.
#### Working With Smartsheetgov.com Accounts
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`).

Invoke the SmartsheetBuilder with the base URI pointing to Smartsheetgov:
```javascript
var smartsheet = require('smartsheet').createClient({
baseUrl: smartsheet.smartSheetURIs.govBaseURI
});
```

## Testing

Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@ exports.createClient = function(clientOptions) {
workspaces : require('./lib/workspaces/').create(options)
};
};

exports.smartSheetURIs = {
defaultBaseURI: 'https://api.smartsheet.com/2.0/',
govBaseURI: 'https://api.smartsheetgov.com/2.0'
}
2 changes: 1 addition & 1 deletion lib/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ exports.sheet = {
width: 150
}
]
};
};
Loading

0 comments on commit 150596b

Please sign in to comment.