bitly-node-api
Version:
bitly api wrapper
44 lines (34 loc) • 800 B
text/typescript
var userToken = process.env.BITLY_USER_TOKEN;
import * as BitlyAPI from 'bitly-node-api';
const bitly = new BitlyAPI();
bitly.setUserToken(userToken);
var bitlinksRequest = async function () {
/**
*
* passing parameters
* -----------------------
* bitlink {string}
*
* passing body parameters
* -----------------------
* color { string }
* exclude_bitly_logo { boolean }
* image_format {string}
* logo_image_guid {string}
*
*/
var bitlink = "bitly.is/2rAZFZ1";
var payload = {
color: "string",
exclude_bitly_logo: "boolean",
image_format: "string",
logo_image_guid: "string",
};
try {
var response = await bitly.bitlinks.createQR(bitlink, payload);
} catch (error) {
return;
}
};
bitlinksRequest();
;