erlc-api 1.3.7 → 1.3.8
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 +19 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# ER:LC API Wrapper
|
|
2
2
|
|
|
3
3
|
A lightweight API Wrapper with 100% coverage of the ER:LC API. Fixed Error and Improvements
|
|
4
|
+
7
|
|
4
5
|
|
|
5
6
|
## Getting Started
|
|
6
7
|
|
|
@@ -52,7 +53,6 @@ getServerFunc();
|
|
|
52
53
|
|
|
53
54
|
```js
|
|
54
55
|
// GetPlayers.js
|
|
55
|
-
|
|
56
56
|
const erlc = require("erlc-api"); //JS
|
|
57
57
|
import erlc from "erlc-api"; // Module or typeScript
|
|
58
58
|
|
|
@@ -60,7 +60,6 @@ const getPlayersFunc = async () => {
|
|
|
60
60
|
const serverId = ""; // The server ApiKey you wish to target. You can get this api key in your (Server Settings)
|
|
61
61
|
const server = await erlc.getPlayers(serverId).catch(console.log); // Gets the server, logs any errors
|
|
62
62
|
console.log(server); // Logs the server object
|
|
63
|
-
|
|
64
63
|
// Expected Response:
|
|
65
64
|
// [
|
|
66
65
|
// {
|
|
@@ -70,10 +69,27 @@ const getPlayersFunc = async () => {
|
|
|
70
69
|
// }
|
|
71
70
|
// ]
|
|
72
71
|
};
|
|
73
|
-
|
|
74
72
|
getPlayersFunc();
|
|
75
73
|
```
|
|
76
74
|
|
|
75
|
+
```js
|
|
76
|
+
//getmodCalls.js
|
|
77
|
+
const erlc = require("erlc-api"); //JS
|
|
78
|
+
import erlc from "erlc-api"; // Module or typeScript
|
|
79
|
+
|
|
80
|
+
const getPlayersFunc = async () => {
|
|
81
|
+
const serverId = ""; // The server ApiKey you wish to target. You can get this api key in your (Server Settings)
|
|
82
|
+
const server = await erlc.getModcallLogs(serverId).catch(console.log); // Gets the server, logs any errors
|
|
83
|
+
console.log(server); // Logs the server object
|
|
84
|
+
// Expected Response:
|
|
85
|
+
// {
|
|
86
|
+
// Caller: ErlcPlayer;
|
|
87
|
+
// Moderator?: ErlcPlayer; // If call is unanswered property is undefined
|
|
88
|
+
// Timestamp: number;
|
|
89
|
+
// }
|
|
90
|
+
};
|
|
91
|
+
```
|
|
92
|
+
|
|
77
93
|
### [Discord Bot](https://discord.com/oauth2/authorize?client_id=1014990793280323624)
|
|
78
94
|
|
|
79
95
|
The Discord Bot Back Online 29/05/2024
|