Jump to content

[ДЛЯ WEB-РАЗРАБОТЧИКОВ] REST API документация


legress

Recommended Posts

logohd.png
 

REST API Документация

Последнее обновление: 28 декабря 2014

 

 
Получить http://api.ets2mp.com/player/
ПАРАМЕТРЫ:

  • Steam ID или ETS2MP ID

ПРИМЕР:

ОТВЕТ:

{	"error": false,	"response": {		"id":1,		"name":"RootKiller",		"joinDate":"2014-07-24 19:57:28",		"steamID64":76561198057763917,		"groupName":"Developer",		"groupID":2,		"permissions": {			"isGameAdmin":true,			"showDetailedOnWebMaps":false		}	}}

 
Получить http://api.ets2mp.com/servers/
ПАРАМЕТРЫ:

  • Отсутствуют

ПРИМЕР:

Пример:

{	"error": false	"response": [		{			"id":1,			"ip":"1.eu.game.ets2mp.com",			"port":42850,			"name":"Europe #1",			"shortname":"EU #1",			"online":true,			"players":2499,			"maxplayers":2500		},		{			"id":3,			"ip":"1.us.game.ets2mp.com",			"port":42850,			"name":"United states #1",			"shortname":"US #1",			"online":true,			"players":841,			"maxplayers":1500		},		{			"id":4,			"ip":"2.eu.game.ets2mp.com",			"port":42850,			"name":"Europe #2 - Freeroam",			"shortname":"EU #2 FR",			"online":true,			"players":100,			"maxplayers":1500		},		{			"id":5,			"ip":"1.eu.game.ets2mp.com",			"port":42851,			"name":"Europe #3",			"shortname":"EU#3",			"online":true,			"players":0,			"maxplayers":2500		}	]}

Если у Вас есть какие либо предложения по REST API, то пишите в теме: http://forum.ets2mp.com/index.php?/topic/2928-for-web-developers-rest-api-documentation/#entry22299.

Счастливого пути!.
Команда Разработчиков ETS2MP


Перевод \ Translate: 
http://ets2mp.ru/

Источник \ Source: http://forum.ets2mp.com/index.php?/topic/2928-for-web-developers-rest-api-documentation/#entry22299

 

 

P.S. 

  1. код выясняет профиль игрока в игре, под каким ID он зареган, имея только его StamID64 или его ID аккаунта на офф-форуме.
  2. код статуса серверов с кол-вом игроков, макс кол-вом игроков, параметрами сервера и т.д.
  • Upvote 2
Link to comment
Share on other sites

  • 2 years later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.