Custom Endpoints Example
import * as ramapi from "ram-api.js"; // typescript
const ramapi = require("ram-api.js"); // javascript
const lang = "english"; // "spanish" for spanish
// demo uses the latest api version
// hello returns { text }
new ramapi.Utils().customAsync("/hello", "demo", { params: { lang: lang } }).then(data => { console.log(data); }).catch(err => { });
//basic ended at v13, and v13 is retired
//pro, normal, or extended are also available options instead of demo below are examples NOTICE: extended only exists in v14 and v15
//v17
new ramapi.Utils().customAsync("/hello", "normal", { version: "v17", params: { lang: lang }, headers: {"token": "api key here"} }).then(data => { console.log(data); }).catch(err => { });
//v16 still uses the token header
new ramapi.Utils().customAsync("/hello", "normal", { version: "v16", params: { lang: lang }, headers: {"token": "api key here"} }).then(data => { console.log(data); }).catch(err => { });
//v15 and under use the api-key header
new ramapi.Utils().customAsync("/hello", "normal", { version: "v15", params: { lang: lang }, headers: {"api-key": "api key here"} }).then(data => { console.log(data); }).catch(err => { });

