Retrieves data from CompanionAPI and returns it in the form it used to be in Battlelog. Currently only player counts are supported.
- Fill in the correct credentials in
docker-compose.yml-file. - Run
docker-compose up.
http://localhost:5234/swagger/index.html
Works if in development environment or ENABLE_SWAGGER environment variable has been set to "true"
http://localhost:5234/api/v1/server/getNumPlayersOnServer/{platform}}/{serverGuid}/{responseType:optional}/
For example:
http://localhost:5234/api/v1/server/getNumPlayersOnServer/pc/4d0151b3-81ff-4268-b4e8-5e60d5bc8765/
http://localhost:5234/api/v1/server/getNumPlayersOnServer/pc/4d0151b3-81ff-4268-b4e8-5e60d5bc8765/0/
http://localhost:5234/api/v1/server/getNumPlayersOnServer/pc/4d0151b3-81ff-4268-b4e8-5e60d5bc8765/1/
Or if you know the gameId
http://localhost:5234/api/v1/server/serverSlots/{gameId}/{responseType:optional}/
For example:
http://localhost:5234/api/v1/server/serverSlots/36028797037504179/
http://localhost:5234/api/v1/server/serverSlots/36028797037504179/0/
http://localhost:5234/api/v1/server/serverSlots/36028797037504179/1/
http://localhost:5234/api/v1/persona/personaByName/{soldierName}/{serverGuid:optional}
For example:
http://localhost:5234/api/v1/persona/personaByName/xfileFIN
or
http://localhost:5234/api/v1/persona/personaByName/xfileFIN/4d0151b3-81ff-4268-b4e8-5e60d5bc8765
http://localhost:5234/api/v1/persona/persona/{eaGuid}/{soldierName}/{serverGuid:optional}
For example:
http://localhost:5234/api/v1/persona/persona/EA_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/xfileFIN
or
http://localhost:5234/api/v1/persona/persona/EA_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/xfileFIN/4d0151b3-81ff-4268-b4e8-5e60d5bc8765
http://localhost:5234/api/v1/user/getUsersByPersonaNames/?personaNames=xfileFIN&personaNames=T3st1ngM4n
or
http://localhost:5234/api/v1/user/getUsersByPersonaNames/?personaNames=xfileFIN&personaNames=T3st1ngM4n&kind=light
or
http://localhost:5234/api/v1/user/getUsersByPersonaNames/?personaNames=xfileFIN&personaNames=T3st1ngM4n&kind=full
http://localhost:5234/api/v1/user/getUsersByPersonaIds/?personaIds=806262072&personaIds=1058743680
or
http://localhost:5234/api/v1/user/getUsersByPersonaIds/?personaIds=806262072&personaIds=1058743680&kind=light
or
http://localhost:5234/api/v1/user/getUsersByPersonaIds/?personaIds=806262072&personaIds=1058743680&kind=full
http://localhost:5234/api/v1/user/getUsersByIds/?userIds=2832663161901751610&userIds=3307924268968953779
or
http://localhost:5234/api/v1/user/getUsersByIds/?userIds=2832663161901751610&userIds=3307924268968953779&kind=light
or
http://localhost:5234/api/v1/user/getUsersByIds/?userIds=2832663161901751610&userIds=3307924268968953779&kind=full
docker stack deploy -c docker-compose.yml battleapi
docker stack rm battleapi
docker pull xfilefin/battleapi:latest
--force required if you have the same tag as the currently running one. E.g. latest
docker service update --image xfilefin/battleapi:latest battleapi_backend --force
docker build -t xfilefin/battleapi . --file BattleAPI/Dockerfile