transporttycoon
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -40,3 +40,4 @@ import { PlayerPositions } from './models/PlayerPositions'; | ||
getAdvancedUserlist(server?: number): Promise<any>; | ||
getWebadmin(server?: number): Promise<any>; | ||
getEconomyInfo(): Promise<Economy[]>; | ||
} |
@@ -258,2 +258,13 @@ "use strict"; | ||
} | ||
async getWebadmin(server = 0) { | ||
if (server - 1 > tycoonServers.length) | ||
return Promise.reject('Please enter a valid server id from 0 - 9.'); | ||
try { | ||
const res = await this.tycoon.get(`http://${tycoonServers[server]}/webadmin/`); | ||
return Promise.resolve(res.data); | ||
} | ||
catch (err) { | ||
return Promise.reject(err); | ||
} | ||
} | ||
async getEconomyInfo() { | ||
@@ -260,0 +271,0 @@ try { |
{ | ||
"name": "transporttycoon", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Wrapper for the Transport Tycoon FiveM server API", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24065
737