@@ -92,9 +92,13 @@ require 'openssl'
92
92
93
93
class NotificationAPI
94
94
def initialize (client_id , client_secret )
95
+ # if in the CA region, use 'https://api.ca.notificationapi.com'
96
+ # if in the EU region, use 'https://api.eu.notificationapi.com'
95
97
@base_url = ' https://api.notificationapi.com'
96
98
@client_id = client_id
97
99
@auth_token = Base64 .strict_encode64(" #{ client_id } :#{ client_secret } " )
100
+ # if in the CA region, use 'api.ca.notificationapi.com'
101
+ # if in the EU region, use 'api.eu.notificationapi.com'
98
102
@http_client = Net ::HTTP .new (' api.notificationapi.com' , 443 )
99
103
@http_client .use_ssl = true
100
104
end
@@ -200,7 +204,9 @@ values={[
200
204
import notificationapi from ' notificationapi-node-server-sdk' ;
201
205
// const notificationapi = require('notificationapi-node-server-sdk').default
202
206
203
- // init
207
+ // initialize notificationapi (default US region)
208
+ // if in the CA region, add 'https://api.ca.notificationapi.com' after CLIENT_SECRET
209
+ // if in the EU region, add 'https://api.eu.notificationapi.com' after CLIENT_SECRET
204
210
notificationapi .init (' CLIENT_ID' , ' CLIENT_SECRET' );
205
211
206
212
// send
@@ -230,7 +236,9 @@ notificationapi.send({
230
236
import asyncio
231
237
from notificationapi_python_server_sdk import (notificationapi)
232
238
233
- # init
239
+ # initialize notificationapi (default US region)
240
+ # if in the CA region, add 'https://api.ca.notificationapi.com' after CLIENT_SECRET
241
+ # if in the EU region, add 'https://api.eu.notificationapi.com' after CLIENT_SECRET
234
242
notificationapi.init(" CLIENT_ID" , " CLIENT_SECRET" )
235
243
236
244
# send
@@ -336,7 +344,9 @@ func main() {
336
344
using NotificationApi .Server ;
337
345
using NotificationApi .Server .Models ;
338
346
339
- // initialize
347
+ // initialize notificationapi (default US region)
348
+ // if in the CA region, add 'https://api.ca.notificationapi.com' after boolean argument
349
+ // if in the EU region, add 'https://api.eu.notificationapi.com' after boolean argument
340
350
var notificationApi = new NotificationApiServer (" CLIENT_ID" , " CLIENT_SECRET" , false );
341
351
342
352
// send
@@ -366,7 +376,9 @@ await notificationApi.Send(new SendNotificationData("order_tracking", user)
366
376
# require:
367
377
require ' ./NotificationAPI'
368
378
369
- # init
379
+ # initialize notificationapi (default US region)
380
+ # if in the CA region, add 'https://api.ca.notificationapi.com' after CLIENT_SECRET
381
+ # if in the EU region, add 'https://api.eu.notificationapi.com' after CLIENT_SECRET
370
382
notificationapi = NotificationAPI .new (" CLIENT_ID" , " CLIENT_SECRET" )
371
383
372
384
# send
0 commit comments