-
Notifications
You must be signed in to change notification settings - Fork 12
/
config.js
49 lines (46 loc) · 1.7 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict';
var path = require('path');
function envOrDefault(key, def) {
return process.env[key] || def;
}
module.exports = {
// Your API oauth consumer key for accessing oauth secured endpoints
// see http://api.7digital.com/1.2/static/documentation/7digitalpublicapi.html#Introduction
//
// @type string
consumerkey: envOrDefault('_7D_API_CLIENT_CONSUMER_KEY', 'YOUR_KEY_HERE'),
// Your oauth consumer secret for signing oauth secured request urls.
//
// @type string
consumersecret: envOrDefault('_7D_API_CLIENT_CONSUMER_SECRET',
'YOUR_SECRET_HERE'),
// The desired format of API responses
// Sets format to JSON by default
//
// @type string
format: 'json',
// A logger object for outputting messages. This should be an obect, which
// has function properties for each of the npm loglevels. Winston provides
// a default implementation.
//
// @type {Winston.Logger} or any object which defines methods for each of
// the npm loglevels.
logger: require('./lib/logger'),
// If your key allows you two legged access to manage user accounts
// either for creating 3rd party partner accounts or by providing
// access to user details using a userId then you should set this
// to true. This changes all 3-legged oauth endpoints to 2-legged.
//
// This option is not reconfigurable using `reconfigure`
//
// @type {Boolean} whether user management is enabled for your key.
userManagement: false,
// A hash of parameters to provide with every GET request made to the API
//
// @type {Object} A hash containing querystring parameters
defaultParams: {},
// A hash of custom headers to provide with every request made to the API
//
// @type {Object} A hash containing the headers
headers: {}
};