diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-05-31 12:48:39 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-05-31 12:48:39 -0700 |
commit | 6f96cba57fab22a3a5e5885c0d410d748daa4fcd (patch) | |
tree | 3d0ab626a5c407ed8769a6d35d6fad5a977c065f /examples/scopes/scopes.js | |
parent | a8badcf2e798c4087d453b132f908cf1309f90ff (diff) | |
download | sendgrid-nodejs-6f96cba57fab22a3a5e5885c0d410d748daa4fcd.zip sendgrid-nodejs-6f96cba57fab22a3a5e5885c0d410d748daa4fcd.tar.gz sendgrid-nodejs-6f96cba57fab22a3a5e5885c0d410d748daa4fcd.tar.bz2 |
Add exmamples of all v3 web api calls
Diffstat (limited to 'examples/scopes/scopes.js')
-rw-r--r-- | examples/scopes/scopes.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/scopes/scopes.js b/examples/scopes/scopes.js new file mode 100644 index 0000000..c772b09 --- /dev/null +++ b/examples/scopes/scopes.js @@ -0,0 +1,16 @@ +var sg = require('../lib/sendgrid.js').SendGrid(process.env.SENDGRID_API_KEY) + +################################################## +# Retrieve a list of scopes for which this user has access. # +# GET /scopes # + +var emptyRequest = require('sendgrid-rest').request +var request = JSON.parse(JSON.stringify(emptyRequest)) +request.method = 'GET' +request.path = '/v3/scopes' +sg.API(request, function (response) { + console.log(response.statusCode) + console.log(response.responseBody) + console.log(response.responseHeaders) +}) + |