bsgworld / bsg-nodejs Goto Github PK
View Code? Open in Web Editor NEWThe open source Node.js client for BSG's REST API. SMS, Viber, HLR services
Home Page: https://bsg.world/developers/
License: BSD 2-Clause "Simplified" License
The open source Node.js client for BSG's REST API. SMS, Viber, HLR services
Home Page: https://bsg.world/developers/
License: BSD 2-Clause "Simplified" License
Npm package points to: https://github.com/bsg/bsg-nodejs as homepage of the repository.
Can you please fix it to https://github.com/bsgworld/bsg-nodejs
bsg.createSMS(
{
destination: "phone",
originator:"alpha name",
body:"message text",
msisdn:"380972000000",
reference:"ext_id_16",
validity:"1",
tariff:"0"
}
)
will the receivers number be in an array , example
msisdn:["380972000000","2737278222']
Wrong check property 'callback_url' in file police.js, method 'createSMS'
File police.js, method createSMS, line 284: '!patterns.url.match( fields.callback_url ) ){' , need to replace with '!patterns.url.test( fields.callback_url ) ){', because 'patterns.url' is RegExp and not contain method 'match', need to replace it with method 'test'. Or some other fix...
Error description:
TypeError: patterns.url.match is not a function
at Object.createSMS (/path/to/project/node_modules/bsg-nodejs/lib/police.js:284:19)
at /path/to/project/node_modules/bsg-nodejs/lib/bsg.js:154:32
at Array.forEach ()
at Object.createSMS (/path/to/project/node_modules/bsg-nodejs/lib/bsg.js:152:11)
...
Need to fix error handling in the "remoteCall" method(file: bsg-nodejs/lib/bsg.js). Mismatch error variable name in "request" callback function(file:52). And mismatch error variable name in subsequent try/catch statement(file:58).
Current error callstack:
/path/to/dir/node_modules/bsg-nodejs/lib/bsg.js:52
reject( BSG server rejected request on HTTP level: ${e}
);
^
ReferenceError: e is not defined
at Request._callback (/path/to/dir/node_modules/bsg-nodejs/lib/bsg.js:52:63)
at self.callback (/path/to/dir/node_modules/bsg-nodejs/node_modules/request/request.js:186:22)
at Request.emit (events.js:315:20)
at Request.onRequestError (/path/to/dir/node_modules/bsg-nodejs/node_modules/request/request.js:845:8)
at ClientRequest.emit (events.js:315:20)
at TLSSocket.socketErrorListener (_http_client.js:467:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:100:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.