Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promises #36

Open
julien-c opened this issue Mar 5, 2019 · 1 comment
Open

Promises #36

julien-c opened this issue Mar 5, 2019 · 1 comment

Comments

@julien-c
Copy link

julien-c commented Mar 5, 2019

Is promises support on the roadmap for this lib?

@mikecentric
Copy link

I would love this too.

In the meantime I use:

import util from 'util';
import initMB from 'messagebird';

const messagebird = initMB(messagebirdKey);

const send = util.promisify(messagebird.messages.create);

await send({
    originator : '<YOUR-MOBILE-NUMBER>',
    recipients : [ '<YOUR-MOBILE-NUMBER>' ],
    body : 'Hi! This is your first message'
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants