1.0.1 • Published 5 years ago

signnow-promise v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

signnow-promise

Converts signnow node sdk callback pattern to return promises.

signnow vs signnow-promise

signnow

signnow.user.create({
    first_name: 'John',
    last_name: 'Wayne',
    email:'john@domain.com',
    password:'yourpwd'
}, function(err, res) {
    if (!err) {
        console.log(`RESULTS: ${res}`);
    } else {
        console.log(`ERROR: ${err}`);
    }
});

signnow-promise

async/await

try {
    const res = await signnow.user.create({
        first_name: 'John',
        last_name: 'Wayne',
        email:'john@domain.com',
        password:'yourpwd'
    });
    console.log(`RESULTS: ${res}`);
} catch (err) {
    console.log(`ERROR: ${err}`);
}

then/catch

signnow.user.create({
    first_name: 'John',
    last_name: 'Wayne',
    email:'john@domain.com',
    password:'yourpwd'
}).then(res => {
    console.log(`RESULTS: ${res}`);
}).catch(err => {
    console.log(`ERROR: ${err}`);
});

Install

npm install signnow-promise

Usage

const signnow = require('signnow-promise')({
    credentials: 'ENCODED_CLIENT_CREDENTIALS',
    production: false
});

To see full usage documentation, see the README.md for signnow.

1.0.1

5 years ago

1.0.1-rc1.0

5 years ago

1.0.0

5 years ago

1.0.0-rc2

5 years ago

1.0.0-rc1

5 years ago