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

ac-bundle-module-utils-airtable-image

utils/airtable/image.js

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

Available Methods: fill

fill

function(record, key, value) {
  if (app.has(value) && value !== false) {
    var list = [];
    if (typeof value === "string") {
      list.push({url: value});
    } else {
      for (var

ac-bundle-module-utils-key

utils/key.js

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

Available Methods: length, count, token, make

length

20
count

4
token

function() {
  var str = "";
  for (var i=0; i<=mod.count-1; i++) {
    if (str !== "") str += "-";
    str += mod.make(mod.length);
  }

ac-bundle-module-utils-email

utils/email.js

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

Available Methods: valid

valid

function(email) {
  var re = /^(([^()[\]\\.,;:\s@"]+(\.[^()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
  return re.test(String(email).toLowerCase());
}

Happy Coding!…