Arcadier SDK for Node.js

The Node.js SDK is an API wrapper that allows developers of Node.js applications to quickly integrate with Arcadier’s APIs. It presents a simple and intuitive interface, making it easier for developers to work with our APIs.

Requirements

  • A Client ID and Client Secret, which can be obtained following the instructions here.
  • Subscribed to Arcadier Scale or Enterprise packages.
  • Node.js

Installation

  • Node.js installed on your computer/server. For instructions on how to download and set up Node, visit the official Node website.
  • Run the npm command to install the Arcadier Node SDK to your node_modules folder.
  • Contact us to receive the command line to run.

Documentation

The complete SDK for Node.js documentation can be viewed at: arcadier.github.io/node-sdk.

You can also view Arcadier's API documentation, which provides all the relevant information on our REST APIs. You can find them here.


    Quick Start & Usage

    //initialise SDK
    const express = require("express");
    const ArcadierClient = require("arcadier-node");
    const config = require("./config.js");
    const app = express();
    
    //configure Node server to return categories to app.js
    const client = ArcadierClient(config.client);
    app.get("/categories", async (req, res) => {
        const categories = await client.Categories.getCategories();
        return res.send(categories);
    });
    
    //see results in client side app.js
    const config = {
        method: "get",
        url: "http://localhost:3001/categories",
        headers: {},
    };
    const categories = (await axios(config)).data;
    console.log(categories);