node-red-contrib-eskomsepush 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: "[BUG]"
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Using node '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. See error
|
|
18
|
+
|
|
19
|
+
**Expected behavior**
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
**Screenshots**
|
|
23
|
+
If applicable, add screenshots to help explain your problem.
|
|
24
|
+
|
|
25
|
+
**Flow**
|
|
26
|
+
If applicable, add a flow to help explain your problem.
|
|
27
|
+
|
|
28
|
+
**Software (please complete the following information):**
|
|
29
|
+
- node-red-contrib-eskomsepush version:
|
|
30
|
+
|
|
31
|
+
**Additional context**
|
|
32
|
+
Add any other context about the problem here.
|
|
33
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for the EskomSePush node
|
|
4
|
+
title: "[Feature]"
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
21
|
+
|
package/README.md
CHANGED
|
@@ -20,7 +20,9 @@ The node has been made to work well together with the [@victronenergy/node-red-c
|
|
|
20
20
|
|
|
21
21
|
You can find the example flow for this via importing the [victron-minsoc-stage-based.json](examples/victron-minsoc-stage-based.json) file.
|
|
22
22
|
|
|
23
|
-
### Configuration
|
|
23
|
+
### Installation & Configuration
|
|
24
|
+
|
|
25
|
+
Install the node from within Node-RED from the menu: Manage pallete -> Install (tab) -> Search for "eskom" and click "install".
|
|
24
26
|
|
|
25
27
|
First you will need a _licence key_. You can get one from [here](https://eskomsepush.gumroad.com/l/api), by subscribing to the Free model. Note that this is for personal use only.
|
|
26
28
|
|
|
@@ -106,6 +108,10 @@ The status will show the situation regarding the API calls and when the next
|
|
|
106
108
|
shedding wil start or end. It also shows the count of API calls that have been
|
|
107
109
|
done and how many are left. This updates every 10 minutes.
|
|
108
110
|
|
|
111
|
+
The red color status can be either filled (dot) or not (ring). In case of a dot,
|
|
112
|
+
the load schedding is because of an _event_. When it is a ring, it is caused by
|
|
113
|
+
a matching _schedule_.
|
|
114
|
+
|
|
109
115
|
### Documentation
|
|
110
116
|
|
|
111
117
|
Documentation for the API can be found [here](https://documenter.getpostman.com/view/1296288/UzQuNk3E)
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
|
+
function checkForValidLicense() {
|
|
3
|
+
var licensekey = $('#node-input-licensekey').val();
|
|
4
|
+
|
|
5
|
+
var regexValidator = RED.validators.regex(/^[0-9A-F\-]{35}$/)
|
|
6
|
+
var isValid = regexValidator(licensekey)
|
|
7
|
+
|
|
8
|
+
if (isValid) {
|
|
9
|
+
document.getElementById("searchAreaText").disabled = false
|
|
10
|
+
$.ajax({
|
|
11
|
+
url: '/eskomsepush/api',
|
|
12
|
+
method: 'GET',
|
|
13
|
+
data: {
|
|
14
|
+
token: licensekey,
|
|
15
|
+
},
|
|
16
|
+
success: function(response) {
|
|
17
|
+
$('#api_info').text(response.allowance.count + '/' + response.allowance.limit)
|
|
18
|
+
if (response.allowance.count >= response.allowance.limit) {
|
|
19
|
+
document.getElementById("searchAreaText").disabled = true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
error: function(error) {
|
|
23
|
+
node.warn(error)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
} else {
|
|
27
|
+
document.getElementById("searchAreaText").disabled = true
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
2
31
|
RED.nodes.registerType('eskomsepush',{
|
|
3
32
|
category: 'network',
|
|
4
33
|
color: '#ffffff',
|
|
@@ -16,53 +45,48 @@
|
|
|
16
45
|
return this.name||"EskomSePush API";
|
|
17
46
|
},
|
|
18
47
|
oneditprepare: function oneditprepare() {
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
checkForValidLicense()
|
|
49
|
+
|
|
50
|
+
$("button#searchAreaId").on("click", function() {
|
|
51
|
+
var licensekey = $("#node-input-licensekey").val()
|
|
52
|
+
var regexValidator = RED.validators.regex(/^[0-9A-F\-]{35}$/)
|
|
53
|
+
var isValid = regexValidator(licensekey)
|
|
54
|
+
var search = $("input#searchAreaText").val()
|
|
55
|
+
var arealist = ''
|
|
56
|
+
|
|
57
|
+
if (isValid && search != '') {
|
|
58
|
+
$.ajax({
|
|
59
|
+
url: '/eskomsepush/search',
|
|
60
|
+
method: 'GET',
|
|
61
|
+
data: {
|
|
62
|
+
token: licensekey,
|
|
63
|
+
search
|
|
64
|
+
},
|
|
65
|
+
success: function(response) {
|
|
66
|
+
for (var i = 0; i < response.areas.length; i++) {
|
|
67
|
+
arealist += '<li id="' + response.areas[i].id + '">' + response.areas[i].name +
|
|
68
|
+
', '+ response.areas[i].region + '</li>'
|
|
69
|
+
}
|
|
70
|
+
$('#list-areas').html(arealist)
|
|
71
|
+
$('#list-areas li').on('click', function() {
|
|
72
|
+
$('#node-input-area').val($(this).attr("id"))
|
|
73
|
+
$('#node-input-name').val($(this).text().split(',')[0])
|
|
74
|
+
})
|
|
75
|
+
checkForValidLicense()
|
|
76
|
+
},
|
|
77
|
+
error: function(error) {
|
|
78
|
+
node.warn(error)
|
|
79
|
+
}
|
|
80
|
+
})
|
|
52
81
|
}
|
|
53
82
|
})
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
dropdown.style.display = "none";
|
|
83
|
+
|
|
84
|
+
$("#node-input-licensekey").on("input", function() {
|
|
85
|
+
checkForValidLicense()
|
|
58
86
|
});
|
|
59
|
-
input.addEventListener("focusout", function() {
|
|
60
|
-
dropdown.style.display = "none"
|
|
61
|
-
})
|
|
62
|
-
} else {
|
|
63
|
-
dropdown.style.display = "none";
|
|
64
87
|
}
|
|
65
|
-
}
|
|
88
|
+
});
|
|
89
|
+
|
|
66
90
|
</script>
|
|
67
91
|
|
|
68
92
|
<script type="text/html" data-template-name="eskomsepush">
|
|
@@ -75,13 +99,8 @@
|
|
|
75
99
|
<input type="password" id="node-input-licensekey" placeholder="License key" required>
|
|
76
100
|
</div>
|
|
77
101
|
<div class="form-row">
|
|
78
|
-
<label for="node-input-area"><i class="fa fa-tag"></i> Area</label>
|
|
79
|
-
<input type="text" id="node-input-area" placeholder="Area
|
|
80
|
-
<select id="areaDropdown" style="display: none;"></select>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="form-row">
|
|
83
|
-
<label style="min-width:190px" for="node-input-test"><i class="fa fa-volume-up"></i> Use test data</label>
|
|
84
|
-
<input type="checkbox" checked id="node-input-test" style="max-width:30px">
|
|
102
|
+
<label for="node-input-area"><i class="fa fa-tag"></i> Area id</label>
|
|
103
|
+
<input type="text" id="node-input-area" placeholder="Area id">
|
|
85
104
|
</div>
|
|
86
105
|
<div class="form-row">
|
|
87
106
|
<label for="node-input-statusselect"><i class="fa fa-location-arrow"></i> Status select</label>
|
|
@@ -90,6 +109,27 @@
|
|
|
90
109
|
<option value="capetown">Cape Town</option>
|
|
91
110
|
</select>
|
|
92
111
|
</div>
|
|
112
|
+
<div class="form-row">
|
|
113
|
+
<label style="min-width:190px" for="node-input-test"><i class="fa fa-volume-up"></i> Use test data</label>
|
|
114
|
+
<input type="checkbox" checked id="node-input-test" style="max-width:30px">
|
|
115
|
+
</div>
|
|
116
|
+
<div class="form-tips">
|
|
117
|
+
<p>In order to fill out the properties, you will need to add the correct license key, which can be
|
|
118
|
+
obtained <a href="https://eskomsepush.gumroad.com/l/api">here</a>. Apart from that, the
|
|
119
|
+
<em>Aread id</em> needs to be filled out. The search form below can help you to obtain that.<br />
|
|
120
|
+
Once you have a valid licence key filled out in the form, a query willl be done, checking
|
|
121
|
+
how many credits you have left. If you have credits left, the form
|
|
122
|
+
can be used to search for the needed area id. <strong>Each search will cost you 5 credits.</strong>
|
|
123
|
+
</p>
|
|
124
|
+
|
|
125
|
+
<ul id="list-areas"></ul>
|
|
126
|
+
|
|
127
|
+
<p>
|
|
128
|
+
Queries left: <span id="api_info">unknown/unknown</span><br />
|
|
129
|
+
<input type="text" id="searchAreaText" placeholder="Area" disabled />
|
|
130
|
+
<button id="searchAreaId">Search</button><br />
|
|
131
|
+
</p>
|
|
132
|
+
</div>
|
|
93
133
|
</script>
|
|
94
134
|
|
|
95
135
|
<script type="text/html" data-help-name="eskomsepush">
|
|
@@ -111,8 +151,7 @@ see how many queries you have left.</p>
|
|
|
111
151
|
<h3 id="configuration">Configuration</h3>
|
|
112
152
|
|
|
113
153
|
<p>First you will need a <em>licence key</em>. You can get one from <a href="https://eskomsepush.gumroad.com/l/api">here</a>, by subsribing to the Free model. Note that this is for personal use only.</p>
|
|
114
|
-
<p>Next you need to insert the correct area. Once
|
|
115
|
-
key.</p>
|
|
154
|
+
<p>Next you need to insert the correct area. Once a valid license is filled out, the API can be used for searching the correct area id. Do note that this will cost some of the daily queries. If you don't want that and you already know the id of the area, fill out the area id manually.</p>
|
|
116
155
|
<p>Then you need to fill out which status to follow. This can be either <em>National</em> (eskom) or <em>Capetown</em>.</p>
|
|
117
156
|
<p>If the <em>test</em> checkbox has been selected, test data for the area will be fetched instead of the actual schedule. This is useful when debugging.</p>
|
|
118
157
|
|
|
@@ -122,47 +161,53 @@ key.</p>
|
|
|
122
161
|
|
|
123
162
|
<pre>
|
|
124
163
|
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
164
|
+
"payload": false,
|
|
165
|
+
"LoadShedding": {
|
|
166
|
+
"schedule": {
|
|
167
|
+
"next": {
|
|
168
|
+
"start": 1684267200000,
|
|
169
|
+
"end": 1684276200000,
|
|
170
|
+
"type": "schedule",
|
|
171
|
+
"duration": 9000,
|
|
172
|
+
"islong": false
|
|
173
|
+
},
|
|
174
|
+
"active": false
|
|
175
|
+
},
|
|
176
|
+
"event": {
|
|
177
|
+
"next": {
|
|
178
|
+
"start": 1684267200000,
|
|
179
|
+
"end": 1684276200000
|
|
180
|
+
},
|
|
181
|
+
"active": false
|
|
182
|
+
},
|
|
183
|
+
"checked": "15:38",
|
|
184
|
+
"next": {
|
|
185
|
+
"start": 1684267200000,
|
|
186
|
+
"end": 1684276200000,
|
|
187
|
+
"type": "schedule",
|
|
188
|
+
"duration": 9000,
|
|
189
|
+
"islong": false
|
|
190
|
+
},
|
|
191
|
+
"active": false
|
|
141
192
|
},
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
193
|
+
"stage": "3",
|
|
194
|
+
"statusselect": "capetown",
|
|
195
|
+
"api": {
|
|
196
|
+
"count": 45,
|
|
197
|
+
"limit": 50,
|
|
198
|
+
"lastStatusUpdate": "Tue May 16 2023 15:38:15 GMT+0200 (Central European Summer Time)",
|
|
199
|
+
"lastScheduleUpdate": "Tue May 16 2023 15:38:15 GMT+0200 (Central European Summer Time)"
|
|
147
200
|
},
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
"stage":"5",
|
|
151
|
-
"statusselect":"capetown",
|
|
152
|
-
"api":{
|
|
153
|
-
"count":12,
|
|
154
|
-
"limit":50,
|
|
155
|
-
"lastStatusUpdate":"Mon May 08 2023 13:34:30 GMT+0200 (Central European Summer Time)",
|
|
156
|
-
"lastScheduleUpdate":"Mon May 08 2023 13:34:30 GMT+0200 (Central European Summer Time)"
|
|
157
|
-
},
|
|
158
|
-
"_msgid":"6e77b593b7f9eda4"
|
|
159
|
-
}
|
|
201
|
+
"_msgid": "dfa429a93a16472d"
|
|
202
|
+
}
|
|
160
203
|
</pre>
|
|
161
204
|
|
|
162
|
-
<p>The <tt>start</tt> and <tt>end</tt> objects contain the time as unix timestamp in the Javascript format (milliseconds after the epoch)
|
|
205
|
+
<p>The <tt>start</tt> and <tt>end</tt> objects contain the time as unix timestamp in the Javascript format (milliseconds after the epoch),
|
|
206
|
+
while the <tt>duration</tt> is in seconds. The <code>msg.LoadShedding.next.islong</code> value is boolean and will be <em>true</em> if the
|
|
207
|
+
shedding lasts 4 hours or longer.</p>
|
|
163
208
|
|
|
164
209
|
<p>The second output shows <code>msg.stage</code> and <code>msg.schedule</code>, containing the latest information as retrieved from the API.
|
|
165
|
-
This output is mainly useful when writing your own functions and logic.</p>
|
|
210
|
+
This output is mainly useful when debugging or writing your own functions and logic.</p>
|
|
166
211
|
|
|
167
212
|
<h3 id="status">Status</h3>
|
|
168
213
|
|
|
@@ -170,9 +215,16 @@ This output is mainly useful when writing your own functions and logic.</p>
|
|
|
170
215
|
It also shows the count of API calls that have been done and
|
|
171
216
|
how many are left. This updates every 10 minutes.</p>
|
|
172
217
|
|
|
218
|
+
<p>
|
|
219
|
+
The red color status can be either filled (dot) or not (ring). In case of a dot,
|
|
220
|
+
the load schedding is because of an <em>event</em>. When it is a ring, it is caused by
|
|
221
|
+
a matching <em>schedule</em>.
|
|
222
|
+
</p>
|
|
223
|
+
|
|
173
224
|
<h1 id="documentation">Documentation</h1>
|
|
174
|
-
<p>Documentation for the API can be found <a href="https://documenter.getpostman.com/view/1296288/UzQuNk3E">here</a></p>
|
|
175
225
|
|
|
226
|
+
<p>The GitHub site for the node can be found <a href="https://github.com/dirkjanfaber/node-red-contrib-eskomsepush">here</a>, while the documentation for the API can be found <a href="https://documenter.getpostman.com/view/1296288/UzQuNk3E">here</a>.
|
|
227
|
+
For issues and/or suggestions for improving the node, please use the <a href="https://github.com/dirkjanfaber/node-red-contrib-eskomsepush/issues">issue tracker</a>.</p>
|
|
176
228
|
</script>
|
|
177
229
|
|
|
178
230
|
<style>
|
|
@@ -183,4 +235,7 @@ select#areaDropdown {
|
|
|
183
235
|
position: absolute;
|
|
184
236
|
left: 120px;
|
|
185
237
|
}
|
|
238
|
+
#list-areas li {
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
}
|
|
186
241
|
</style>
|
package/src/nodes/eskomsepush.js
CHANGED
|
@@ -10,13 +10,12 @@ module.exports = function (RED) {
|
|
|
10
10
|
let lastStageUpdate = new Date()
|
|
11
11
|
let lastScheduleUpdate = new Date()
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
function updateStatus(node) {
|
|
13
|
+
function updateStatus (node) {
|
|
15
14
|
let fill = 'green'
|
|
16
15
|
let shape = 'ring'
|
|
17
16
|
let statusText = ''
|
|
18
17
|
if (Stage && Stage.status && Stage.status[node.config.statusselect].stage) {
|
|
19
|
-
statusText += 'Stage '+Stage.status[node.config.statusselect].stage
|
|
18
|
+
statusText += 'Stage ' + Stage.status[node.config.statusselect].stage
|
|
20
19
|
}
|
|
21
20
|
if (LoadShedding && LoadShedding.active && LoadShedding.next && LoadShedding.next.end) {
|
|
22
21
|
statusText += ' - ' + new Date(LoadShedding.next.end).toLocaleTimeString()
|
|
@@ -32,7 +31,7 @@ module.exports = function (RED) {
|
|
|
32
31
|
if (EskomSePushAPI) {
|
|
33
32
|
statusText += ` (API: ${EskomSePushAPI.allowance.count}/${EskomSePushAPI.allowance.limit})`
|
|
34
33
|
if (EskomSePushAPI.allowance.count >= EskomSePushAPI.allowance.limit) {
|
|
35
|
-
fill = 'red'
|
|
34
|
+
fill = 'red'
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
node.status({
|
|
@@ -130,15 +129,29 @@ module.exports = function (RED) {
|
|
|
130
129
|
LoadShedding.schedule = {
|
|
131
130
|
active: true
|
|
132
131
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
if (schedule.split('-')[0] < schedule.split('-')[1]) {
|
|
133
|
+
LoadShedding.schedule.next = {
|
|
134
|
+
start: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[0]),
|
|
135
|
+
end: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[1])
|
|
136
|
+
}
|
|
137
|
+
} else {
|
|
138
|
+
LoadShedding.schedule.next = {
|
|
139
|
+
start: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[0]),
|
|
140
|
+
end: Date.parse(Schedule.schedule.days[1].date + ' ' + schedule.split('-')[1])
|
|
141
|
+
}
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
144
|
if (nowtime < schedule.split('-')[0]) {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
if (schedule.split('-')[0] < schedule.split('-')[1]) {
|
|
146
|
+
LoadShedding.schedule.next = {
|
|
147
|
+
start: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[0]),
|
|
148
|
+
end: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[1])
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
LoadShedding.schedule.next = {
|
|
152
|
+
start: Date.parse(Schedule.schedule.days[0].date + ' ' + schedule.split('-')[0]),
|
|
153
|
+
end: Date.parse(Schedule.schedule.days[1].date + ' ' + schedule.split('-')[1])
|
|
154
|
+
}
|
|
142
155
|
}
|
|
143
156
|
}
|
|
144
157
|
}
|
|
@@ -172,6 +185,9 @@ module.exports = function (RED) {
|
|
|
172
185
|
LoadShedding.next.type = 'event'
|
|
173
186
|
}
|
|
174
187
|
|
|
188
|
+
LoadShedding.next.duration = (LoadShedding.next.end - LoadShedding.next.start) / 1000
|
|
189
|
+
LoadShedding.next.islong = LoadShedding.next.duration >= (4 * 3600)
|
|
190
|
+
|
|
175
191
|
LoadShedding.active = (LoadShedding.schedule.active || LoadShedding.event.active)
|
|
176
192
|
if (LoadShedding.schedule.active) {
|
|
177
193
|
LoadShedding.type = 'schedule'
|
|
@@ -243,4 +259,23 @@ module.exports = function (RED) {
|
|
|
243
259
|
return res.send({ error: error.message })
|
|
244
260
|
})
|
|
245
261
|
})
|
|
262
|
+
RED.httpNode.get('/eskomsepush/api', (req, res) => {
|
|
263
|
+
if (!req.query.token) {
|
|
264
|
+
res.setHeader('Content-Type', 'application/json')
|
|
265
|
+
return res.send('invalid')
|
|
266
|
+
}
|
|
267
|
+
const headers = {
|
|
268
|
+
token: req.query.token
|
|
269
|
+
}
|
|
270
|
+
const options = {}
|
|
271
|
+
|
|
272
|
+
res.setHeader('Content-Type', 'application/json')
|
|
273
|
+
axios.get('https://developer.sepush.co.za/business/2.0/api_allowance',
|
|
274
|
+
{ params: options, headers }).then(function (response) {
|
|
275
|
+
return res.send(response.data)
|
|
276
|
+
})
|
|
277
|
+
.catch(error => {
|
|
278
|
+
return res.send({ error: error.message })
|
|
279
|
+
})
|
|
280
|
+
})
|
|
246
281
|
}
|