erlc-v2 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -6
- package/package.json +1 -1
- package/src/Client.js +1 -1
- package/src/map/renderPlayerMap.js +2 -2
package/README.md
CHANGED
|
@@ -2,11 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
JavaScript client for the ER:LC API v2.
|
|
4
4
|
|
|
5
|
-
Built for Node 18+.
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
Built for Node 18+.
|
|
6
|
+
|
|
7
|
+
## Important Upgrade Notice
|
|
8
|
+
|
|
9
|
+
Update to the newest version as soon as possible:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install erlc-v2@latest
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Older releases may still call the deprecated `api.policeroleplay.community` host. The ER:LC API is moving to `https://api.erlc.gg`, and requests to the old host may start failing on May 11, 2026.
|
|
16
|
+
|
|
17
|
+
## New Features
|
|
18
|
+
|
|
19
|
+
- `client.commands.execute()` now uses `/v2/server/command`
|
|
10
20
|
- emergency calls are supported
|
|
11
21
|
- vehicle lookup helpers are built in
|
|
12
22
|
- you can start a small local API with `api: { port: 3001 }`
|
|
@@ -597,6 +607,6 @@ Repeated `403` responses can also trigger disconnect (`reason: "unauthorized"`).
|
|
|
597
607
|
|
|
598
608
|
## Notes
|
|
599
609
|
|
|
600
|
-
- API base URL: `https://api.
|
|
610
|
+
- API base URL: `https://api.erlc.gg`
|
|
601
611
|
- `server-key` is required for requests
|
|
602
612
|
- `Authorization` is optional (`globalKey`)
|
package/package.json
CHANGED
package/src/Client.js
CHANGED
|
@@ -11,7 +11,7 @@ const { renderPlayerMap } = require("./map/renderPlayerMap");
|
|
|
11
11
|
const { searchVehicles, findVehicleByPlate } = require("./util/vehicleSearch");
|
|
12
12
|
const { ERLCError } = require("./errors");
|
|
13
13
|
|
|
14
|
-
const BASE_URL = "https://api.
|
|
14
|
+
const BASE_URL = "https://api.erlc.gg";
|
|
15
15
|
const BLOCKED_COMMANDS = new Set([
|
|
16
16
|
":view",
|
|
17
17
|
":to",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const { ERLCError } = require("../errors");
|
|
2
2
|
|
|
3
3
|
const DEFAULT_MAP_URL =
|
|
4
|
-
"https://api.
|
|
4
|
+
"https://api.erlc.gg/maps/fall_blank.png";
|
|
5
5
|
const FIXED_MAP_SIZE = 3121;
|
|
6
|
-
const OFFICIAL_MAP_BASE_URL = "https://api.
|
|
6
|
+
const OFFICIAL_MAP_BASE_URL = "https://api.erlc.gg/maps";
|
|
7
7
|
const ROBLOX_HEADSHOT_URL = "https://thumbnails.roblox.com/v1/users/avatar";
|
|
8
8
|
const MAP_SEASON_ALIASES = {
|
|
9
9
|
fall: "fall",
|