An explanation on how to use the api for TeraDPS to send meter information to the webserver at teradps.io
First, you need to create an account on the TeraDPS. You can do this by either creating an account on the website (teradps.io) or by sending a POST request to teradps.io/api/users endpoint with 'email' and 'password' fields.
Login to the site by sending a POST to teradps.io/api/login with 'email' and 'password'. Upon successful login, your response will include 'authToken' and 'userId' keys. The values of these keys will be used when submitting encounters.
API Link: teradps.io/api/que
Send a POST request to the API with a JSON object including the following information on your encounter as properties on the object. In the POST request, make sure to add your authToken and userId as headers:
Ex. authToken is 8PBcPuHHhRK_57tk3Ryc9IP_XtOIRXh_4-j9A9QUBxu userId is crdChGPz6PndHvMYh
Add these headers in your request:
X-Auth-Token: 8PBcPuHHhRK_57tk3Ryc9IP_XtOIRXh_4-j9A9QUBxu
X-User-Id: crdChGPz6PndHvMYh
The general structure of the JSON request object should be as follows:
Encounter Base {
areaId: Number (as String),
bossId: Number (as String),
fightDuration: Number (as String),
meterName: String,
meterVersion: String,
partyDps: Number (as String),
debuffUptime: [
{skillId: Number (as String)},
8888888: Number (as String) [Enrage Uptime tracking],
8888889: Number (as String) [Slaying Uptime tracking]
],
members: [
{
playerName: String,
playerDPS: Number (as String),
playerClass: String,
playerServer: String,
playerTotalDamage: Number (as String),
playerTotalDamagePercent: Number (as String),
playerAverageCritRate: Number (as String),
playerDeaths: Number (as String),
playerDeathDuration: Number (as String),
aggro: Number (as String),
skillLog: [
{
skillId: Number (as String),
skillHits: Number (as String),
skillTotalDamage: Number (as String),
skillCritRate: Number (as String),
skillDamagePercent: Number (as String),
skillHighestCrit: Number (as String),
skillLowestCrit: Number (as String),
skillAverageCrit: Number (as String),
skillAverageWhite: Number (as String)
}
],
buffUptime: [
{buffId: Number (as String)}
]
}
]
}
Below is the list of the object properties:
- Number
- The area id in reference to database.
- Number
- The boss id in reference to database.
- Number
- Duration of the encounter.
- Uptime on boss's Enraged status throughout fight. This is the property named 8888888 in debuffUptime array.
- String
- The name of the meter the encounter was submitted from. i.e. CasualMeter / ShinraMeter
- String
- The version of the meter.
- Number
- Party-wide DPS.
- Array of Objects
- Each object represents a debuff (by SkillId) and it's respective uptime in %.
- Array of Objects
- An array containing Objects that represent the members of the party.
- Example:
[
{
playerName: One,
playerDPS: 400,
playerClass: Slayer,
...
},
{
playerName: Two,
playerDPS: 10,
playerClass: Priest,
...
}
]
These properties will be on each party member Object.
- String
- Name of player.
- Number
- DPS recorded at the end of the encounter.
- String
- Class of Player.
- String
- The name of the server of the player on the record.
- Falls back to server ID if name is not recognized. (KR/TW/JP servers currently)
- Number
- Total damage by player, as determined by skill log.
- Number %
- % of total damage done by player.
- Number %
- Average crit rate across all skills.
- Number
- Number of times player died in the encounter.
- Number
- How long the player was dead for over the course of the encounter.
- Number
- How long player held aggro over encounter.
- Array of Objects
- An array containing Objects that represent the skills used in the log.
- Array of Objects
- Each object represents a buff, debuff, or consumable (by Id) and it's respective uptime in %.
These properties will be on each skillLog Object.
- if skillId: Number
- ID of Skill.
- Number
- Number of successful hits.
- Number
- Total damage dealt by skill.
- Number %
- Overall % Crit Rate of skill.
- Number %
- % of total damage.
- Number
- Highest crit.
- Number
- Lowest crit.
- Number
- Average crit.
- Number
- Average white.