ac-bundle-module-api-mysql

api/mysql.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: escape, connect, requestCallback

escape

function(value) {
  return mysql.escape(value);
}

connect

function() {
  return new Promise(function(resolve, reject) {
    if (!app.has(mod.connection) || mod.connection.state.split("disconnect").length 1) {
      mod.connection = mysql.createConnection(appConfig.mysql);
      mod.connection.connect(function(error, data) {
        resolve(true);

ac-bundle-module-utils-compression

utils/compression.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: compress, decompress

compress

function(s) {
  var dict = {};
  var data = (s + "").split("");
  var out = [];
  var currChar;
  var phrase = data[0];
  var code = 256;
  for

ac-bundle-module-utils-metadata-airtable

utils/metadata/airtable.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: table

table

async function(base, table) {
  var {record, error} = await app.api.airtable.requestMetadata("record", function(json, page) {}, "Structure", "Grid view", [], "GET", "&filterByFormula=" + app.utils.url.encode("IF(AND(Base=\"" + base + "\", Table=\"" + table

ac-bundle-module-api-scraper

api/scraper.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: requestCallback

requestCallback

async function(callback, errorCallback, path) {
  var link = config.scraper.link + "/" + path.split("?").join("?authorization=" + config.scraper.authorization + "&");
  if (config.api.log.url) console.log("SCRAPER:", link);
  var result = await fetch(link);
  if (result.status

ac-bundle-module-api-oxr

api/oxr.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: list, number, convert

list

async function() {
  var result = await fetch(config.oxr.link + "/latest.json?app_id=" + config.oxr.appId, {
    method: "GET"
  });
  if (result.status === 200) {
    var json = await result.json();

ac-bundle-module-api-niolo

api/niolo.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: token, requestCallback

token

async function() {
  if (app.has(mod.jwt) && new Date().getTime() - mod.time 120000) return mod.jwt;
  var result = await fetch(config.niolo.endpoint + "/auth/local", {
    method: "POST",
    headers: {
      "Content-Type": "application/json"

ac-bundle-module-api-luminati

api/luminati.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: requestCallback

requestCallback

async function(callback, errorCallback, type, url, method, data, headers) {
  if (!app.has(type)) type = "static";
  if (config.api.log.url) console.log(url);
  var proxyUrl = config.luminati.url[type];
  var result = await app.utils.proxy.fetch(proxyUrl, url, method,

ac-bundle-module-api-fortnox

api/fortnox.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: headers, requestCallback

headers

function(headers) {
  if (typeof headers === "undefined") headers = {};
  headers["Access-Token"] = config.fortnox.accessToken;
  headers["Client-Secret"] = config.fortnox.clientSecret;
  headers["Content-Type"] = "application/json";
  headers["Accept"] = "application/json";
  return headers;
}

requestCallback

async

ac-bundle-module-api-dropbox

api/dropbox.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: upload

upload

async function(path, data, headers) {
  if (!app.has(headers)) headers = {};
  headers["Authorization"] = "Bearer " + config.dropbox.token;
  headers["Dropbox-API-Arg"] = JSON.stringify({path: config.dropbox.folder + path});
  var result = await fetch(config.dropbox.link +

ac-bundle-module-api-catalog

api/catalog.js

A module for ac-bundle-app, published by ac-bundle-module.

Available Methods: fileCallback

fileCallback

async function(callback, errorCallback, key, method, data, headers) {
  if (!app.has(method)) method = "GET";
  if (!app.has(headers)) headers = {};
  if (!app.has(headers["file-type"])) headers["file-type"] = "*";
  headers.authorization = config.catalog.authorization;
  var url