This package is the Trucky API client, complete gateway to TruckersMP, ETS2Map and Traffic data served from TruckersMP developers community (official and unofficial).
For API response documentation please refer to live documentation (http://api.truckyapp.com/docs/)
npm install trucky-services-client
var TruckyAPIClient = require('trucky-services-client');
var api = new TruckyAPIClient();
api.servers().then((response) => {
console.log(response);
});
api.pois().then(function(response) {
console.log(response);
});
api.resolveVanityUrl("dowmeister").then( (response) => {
console.log(response);
});
- node-fetch: A light-weight module that brings window.fetch to node.js and io.js
- TruckyAPIClient
- resolveVanityUrl
- getPlayerSummaries
- searchPlayer
- pois
- isOnline
- isOnlineImproved
- getFriends
- news
- ets2News
- atsNews
- update_info
- events
- servers
- game_version
- game_time
- rules
- player
- bans
- traffic
- traffic_servers
- wot_gallery_random
- wot_gallery_editorspick
- wot_gallery_bestrated
- wot_gallery_mostviewed
- streams_twitch_ets2
- streams_twitch_ats
- truckersfm_listeners
- truckersfm_shows
- truckersfm_lastPlayed
- onlineList
- searchPlayerByTruckersMPUsername
- getPlayerInfoComplete
- ets2_cities
- ats_cities
- map_servers
- TruckyAPIResponse
Trucky API client class
Resolve Steam Vanity Url returning Steam player data if found
Parameters
username
string Steam user vanity url
Returns Promise<TruckyAPIResponse>
Returns Steam Player data if found
Parameters
steamid
string Steam User ID
Returns Promise<TruckyAPIResponse>
Search player by Steam ID, Steam Username or TruckersMP ID based on searchType parameter
Parameters
searchTerm
string Search Term, can be TruckersMP User ID, Steam User ID or Steam Vanity urlsearchType
string Can be "steamid", "truckersmpid", "steamusername"
Returns Promise<TruckyAPIResponse>
Get ETS2Map Points of interest
Returns Promise<TruckyAPIResponse>
Check TruckersMP player online status
Parameters
playerID
number TruckersMP User ID
Returns Promise<TruckyAPIResponse>
Check TruckersMP player online status - With improved informations, mapped map server and calculated location
Parameters
playerID
number TruckersMP User ID
Returns Promise<TruckyAPIResponse>
Get Steam Friends
Parameters
steamID
string Steam User ID
Returns Promise<TruckyAPIResponse>
Get TruckersMP news feed from Steam RSS
Returns Promise<TruckyAPIResponse>
Get ETS2 News feed from Steam RSS
Returns Promise<TruckyAPIResponse>
Get ATS News feed from Steam RSS
Returns Promise<TruckyAPIResponse>
Get TruckersMP current update info and current plugin version
Returns Promise<TruckyAPIResponse>
Get events and meetup from ETS2.com and truckers.events
Returns Promise<TruckyAPIResponse>
Get TruckersMP servers
Returns Promise<TruckyAPIResponse>
Get TruckersMP game version info
Returns Promise<TruckyAPIResponse>
Get TruckersMP game time
Returns Promise<TruckyAPIResponse>
Get TruckersMP rules
Returns Promise<TruckyAPIResponse>
Get TruckersMP player data
Parameters
id
number TruckersMP User ID
Returns Promise<TruckyAPIResponse>
Get TruckersMP player bans data
Parameters
id
number TruckersMP User ID
Returns Promise<TruckyAPIResponse>
Get TruckersMP traffic data from traffic.krashnz.com
Parameters
Returns Promise<TruckyAPIResponse>
Get TruckersMP get traffic servers data from traffic.krashnz.com
Returns Promise<TruckyAPIResponse>
Get World Of Trucks Random Gallery
Returns Promise<TruckyAPIResponse>
Get World Of Trucks Editor's pick
Returns Promise<TruckyAPIResponse>
Get World Of Trucks Best rated
Returns Promise<TruckyAPIResponse>
Get World Of Trucks most viewed
Returns Promise<TruckyAPIResponse>
Get current Twitch streams for ETS2
Returns Promise<TruckyAPIResponse>
Get current Twitch streams for ATS
Returns Promise<TruckyAPIResponse>
Get TruckersFM current listeners
Returns Promise<TruckyAPIResponse>
Get TruckersFM current show
Returns Promise<TruckyAPIResponse>
Get TruckersFM last played song
Returns Promise<TruckyAPIResponse>
Get players online state by TruckersMP ids array Search TruckersMP player by username
Parameters
ids
Returns Promise<TruckyAPIResponse>
Search TruckersMP Player by username
Parameters
query
Returns Promise<TruckyAPIResponse>
Get TruckersMP player complete information with online state and Steam profile data
Parameters
query
Returns Promise<TruckyAPIResponse>
Get list of ETS2 cities, with coordinates and country
Returns Promise<TruckyAPIResponse>
Get list of ATS cities, with coordinates and country
Returns Promise<TruckyAPIResponse>
Get Map servers list, mapped on API servers
Returns Promise<TruckyAPIResponse>
Trucky API client response prototype
Type: object
Properties
response
object