Narcoleptic Pasta Manufacturer

    rdgkb-json

    0.9.1 • Public • Published

    RDG Knowledgebase APIs (rdgkb-json)

    This is a node module that will interface to RDG's Knowledgebase static data API's, see the link below for more details

    It is designed to deliver the XML data returned by the API in JSON format.

    A compressed PDF for the various feed specs is available here

    NB: This is pre-release software

    # Using the module The first step is to install the module into your node project

    • npm install -s rdgkb-json

    Then to test just do the following

    /**
     * Simple example code for accessing the RDG incidents API
     * NB: You will need a valid username and password
     */
    const RDGKnowledgebaseAPI = require('./index');
    const username = "abc@123.a"; // put a valid username here
    const password = "invalidpassword" // put a valid password here
    
    
    // Create the API
    const api = new RDGKnowledgebaseAPI(username, password);
    
    // validate the credentials used
    api.logon().then(result => {
      if(!result) {
        console.log(api.error);
      } else {
        api.callAPI(api.methods.INCIDENTS).then(data => {
          console.log(data);
        });
      }
    });
    
    

    Install

    npm i rdgkb-json

    DownloadsWeekly Downloads

    0

    Version

    0.9.1

    License

    MIT

    Unpacked Size

    6.79 kB

    Total Files

    6

    Last publish

    Collaborators

    • spiralarm