ardoq-js-client

A thin NodeJS wrapper for the Ardoq REST API.

Usage no npm install needed!

<script type="module">
  import ardoqJsClient from 'https://cdn.skypack.dev/ardoq-js-client';
</script>

README

Integrate with Ardoq via JavaScript

This is a simple REST-API wrapper for integrating with https://ardoq.com.

Installation

Install npm install ardoq-js-client.

Uses backbone collections and models.

Usage

const token = 'YOUR TOKEN';
const ardoqURL = 'https://app.ardoq.com';
const _ = require('underscore');
const ardoqClient = require("ardoq-js-client");

var client = new ardoqClient(ardoqURL, null, null, token, "<YOUR ORG DB>");
const models = new (require("ardoq-js-client/collections/models"))();
const fields = new (require("ardoq-js-client/collections/fields"))();
const workspaces = new (require("ardoq-js-client/collections/workspaces"))();

models.fetch();
fields.fetch();
workspaces.fetch({success: function(){ });
client.performRequest("/api/<anyEndpoint>", "GET", {myParam:val}, function(){
    console.log("success");
}, function() {
    console.log("err");
});