magpie-js-sdk
Version:
SDK library for Magpie
22 lines (17 loc) • 373 B
JavaScript
const config = {
sandBoxURL: "https://staging-api.magpie.im",
productionUrl: "https://api.magpie.im"
};
const getUrl = function(isSandbox) {
if (isSandbox) {
return config.sandBoxURL;
}
return config.productionUrl;
};
const getAuthorizationKey = function(key) {
return Buffer.from(key).toString("base64");
};
module.exports = {
getUrl,
getAuthorizationKey
};