Hello everyone,
I would like to have a dedicated thread for API suggestions & improvements.
It's not certain that all of the suggestions will be accepted & implemented, but if I'm not even aware of them, it won't be possible to even add them in the first place!
In order to make everything easier to discuss & potentially plan and implement, if you have a suggestion, follow the following format:
Suggestion type:
(Concisely categorize your suggestion/request)
- New feature request
- Minor improvement
- General improvement (accross multiple endpoints)
- Optimization/Performance improvement
- Something else
What needs to be done:
(Shortly describe what needs to be done)
- (e.g. for the new feature request) - add API to get forum threads & posts data
- (e.g. for the minor improvement) - restructure user>personalstats section to have statistics categories
- (e.g. for the general improvement) - change all 1 & 0 to true & false
Why do you need this:
(Back up your suggestion or request with some information on why do you need this change)
- (e.g. for the new feature request above) - What @Omanpx wrote in another thread: It would create more opportunities for community-run events, such as this one.
- (e.g. for the minor improvement above) - it would make much more sense if personal stats had sections like we currently have on statistics page - attacks, finishing hits, drugs, travel, etc...Maybe even rename fields so they're not called "cantaken" but instead "cannabis", etc.
- (e.g. for the general improvement above) - it would be easier for my app to handle booleans than manually converting all zeroes and ones to boolean values.
Consider any drawbacks of your suggestion:
! Remember that API should not provide unfair advantage over players that are unable or don't know how to use the API. The primary goal of the API is to enhance gameplay and not to provide advantage.
- (e.g. for the new feature request above) - This could be very heavy on the BE as there is lots of information on forums. It could be hard to properly implement this feature because results from private forums should be excluded/included depending on the user.
- (e.g. for the minor improvement above) - No concerns for this improvement.
- (e.g. for the general improvement above) - Requires thorough testing to make sure this change is applied to all endpoints.
Example:
(Finally, provide an example of the API change)
{
"posts": [
{
"thread_id": string,
"post_id": string,
"player_name": string,
"player_id": number,
"created_dt": string,
"modified_dt": string,
"content": string,
"likes": number,
"dislikes": number,
},
...
]
}
---
Few things to note:
- In general api v2 will have all "ID" fields renamed. E.g. "ammoID" becomes "ammo_id", and all requests will follow the same naming convetion.
- Some other fields will also be renamed. E.g. "attacker_faction" becomes "attacker_faction_id" and "attacker_factionname" becomes "attacker_faction_name", etc.
- There will be some reconstructuring done overall. E.g. "personalstats" will really have fields renamed (like in the example above) and grouped into categories (drugs, attacks, finishing hits, travel, etc.)
- I'm looking to remove all key->value arrays, so the key will be a part of an object instead. E.g. [ "1": { ... }, "2": { ... } ] becomes [ { id: 1, ... }, { id: 2, ... } ]
- Please continue posting any relavant bugs to the Bugs & Issues forum.
Thank you,
Mauro