![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
npm install clockwork
var clockwork = require('clockwork')({key:'your clockwork key here'});
// Send a message
clockwork.sendSms({ To: '447123456789', Content: 'Test!'}, function(error, resp) {
if (error) {
console.log('Something went wrong', error);
} else {
console.log('Message sent to',resp.responses[0].to);
console.log('MessageID was',resp.responses[0].id);
}
});
First, head over to clockwork and signup if you're not already signed up. Once signed up, log in to your clockwork account and add a new API Key (from the top menu choose Sending -> API Keys).
You can send a single message as shown above. If you have multiple messages to send, it's much more efficient to send them in bulk by passing an array of messages to sendSms
:
clockwork.sendSms([{ To: '447123456789', Content: 'Test!'},
{ To: '447123456781', Content: 'Another one'}], function(error, resp) {
if (error) {
console.log('Something went wrong', error);
} else {
console.log('Messages sent');
}
});
The second argument to sendSms is callback that you provide. The callback will be called with 2 json objects, error
and response
. If a general error occurs, then error will look like this:
{
success: false,
errNo: X,
errDesc: 'Error description here'
}
Otherwise, error will be null, and the response will contain an array of sms responses, one for each message sent. In the example above where 2 messages were sent, assuming nothing went wrong, the response will look like this:
{
responses: [
{to: '447123456789', success: true, id: 'MessageId', errNo: '', ErrDesc: ''},
{to: '447123456781', success: true, id: 'MessageId', errNo: '', ErrDesc: ''}
]
}
Currently, the nodejs wrapper only supports setting the to, from and content of sms messages. If you need to set other options, raise an issue in github and we'll try to get it done for you. For more information about sending messages and the responses, see the clockwork sms api documentation
clockwork.getBalance(function(error, credit) {
if (error) {
console.log('Something went wrong', error);
} else {
console.log('Your balance',credit);
}
});
Again, if a general error occurs then error will be populated accordingly. Otherwise, the response contains your credit, in a format similar to this:
{
accountType: 'PAYG',
currency: {code: 'USD', symbol: '$'},
balance: '100.0'
}
FAQs
Mediaburst Clockwork API wrapper
The npm package clockwork receives a total of 0 weekly downloads. As such, clockwork popularity was classified as not popular.
We found that clockwork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.