JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 55
  • Score
    100M100P100Q55011F
  • License MIT

An ER:LC API wrapper for JS/TS

Package Exports

  • erlc-api
  • erlc-api/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (erlc-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ER:LC API Wrapper

A lightweight API Wrapper with 100% coverage of the ER:LC API. Fixed Error and Improvements

Getting Started

First you need to install the package.

npm i erlc-api

Setting Up

Setting up is super simple:

// index.js

const erlc = require("erlc");
const client = new erlc.Client({
  globalToken: "", // You get the global key directly from the ERLC developers. To increase your API request limits
});
client.config(); // Registers your client

Now you can start using API Methods - here are a few examples:

// api.js

const erlc = require("erlc");

const getServerFunc = async () => {
  const serverId = ""; // The server ApiKey you wish to target. You can get this api key in your (Server Settings)
  const server = await erlc.getServer(serverId).catch(console.log); // Gets the server, logs any errors

  console.log(server); // Logs the server object
};

getServerFunc();

PRC API Docs

Credits

Library Re-Development - Egologics

API Development - Police Roleplay Community

Apply for more API request limits - Discord