-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi-dist.js
37 lines (31 loc) · 894 Bytes
/
api-dist.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
const Devour = require('devour-client');
let apiAddressBattleBroadcast = '';
let apiAddressTotalRanking = '';
// To configure the external API from which the chatbot fetch keyworded responses
// Change `apiaddress` to your external api address.
const jsonApi = new Devour(
{
apiUrl: 'apiaddress'
}
)
// Define Model
// If your KeywordedResponse list view is in a different path
// Change `collectionPath` to the corresponding path for the resource.
jsonApi.define('keyworded_response', {
keyword: '',
response: '',
}, {
collectionPath: 'keyworded_responses'
});
jsonApi.define('ignore_number', {
number: '',
note: '',
}, {
collectionPath: 'ignore_numbers',
});
jsonApi.define('new_member_notice', {
response: '',
}, {
collectionPath: 'new_member_notices',
});
module.exports = { jsonApi, apiAddressBattleBroadcast, apiAddressTotalRanking};