Skip to content
Yukikoo edited this page Jun 10, 2017 · 10 revisions

How to create & setup a private dps server

API

You server must provide 2 services

Server Time

Exemple: https://moongourd.com/shared/servertime

This service can return anything. The meter will just read the server time in the response header. So the content for the response doesn't matter

DPS upload

Example: https://moongourd.com/dpsmeter_data.php

The dps meter will send all the dps data to this URL.

  • Media type: "application/json"
  • Encoding: UTF-8
  • Method: POST

Area & Boss accepted

Example: https://moongourd.com/api/shinra/whitelist

[{"AreaId":953, "BossIds":[]},{"AreaId":950, "BossIds":[1000,2000,3000,4000]}]

If BossIds:[] then allow everyboss of the dungeons

DPS meter configuration

You can add one private server with the UI

UI

OR

You can edit window.xml config file, & add your server.

Example:

  <dps_servers>
    <server>
      <username />
      <token />
      <enabled>false</enabled>
      <upload_url>https://moongourd.com/dpsmeter_data.php</upload_url>
      <allowed_area_url>https://moongourd.com/api/shinra/whitelist</allowed_area_url>
      <server_time_url>https://moongourd.com/api/shinra/servertime</server_time_url>
    </server>
    <server>
      <username />
      <token />
      <enabled>false</enabled>
      <upload_url>http://teralogs.com/api/logs</upload_url>
      <allowed_area_url>http://teralogs.com/api/logs/a/allow</allowed_area_url>
      <server_time_url>https://teralogs.com/</server_time_url>
    </server>
  </dps_servers>

Sample of uploaded data

TODO

Annexe

The post request sended is raw.

If you use php as server backend, you can use something like that to get the data: $entityBody = file_get_contents('php://input');

https://stackoverflow.com/questions/8945879/how-to-get-body-of-a-post-in-php/8945912#8945912