Seems2Legit / Rainbow-Six-Siege-Player-Stats-API

PHP API which allows you to search players and get their R6 stats
Other
99 stars 32 forks source link

[Not Issue] Question about operator indexes #79

Closed SwiftCODA closed 3 years ago

SwiftCODA commented 3 years ago

I'm working on accessing the stats directly from Ubisoft from my iOS app and have successfully been able to GET the operator stats json. I notice it's not broken down to each operator but has an index type of thing after the stat name, like :4:E. I was trying to analyze your code and see if I could figure out how it sorts those into a list of operators and I was unable to.

Can you please explain how the operator stats indexes are converted into operator names?

Thanks.

Seems2Legit commented 3 years ago

Hi there, before Ubisoft reworked their stats website you were able to load a JSON from there containing all the indexes and so on. Nowadays I'm not quite sure how to figure out which index belongs to which operator. I waited until the new season/operator had been released and searched for new indexes in the response.

SwiftCODA commented 3 years ago

Hello, I'm not sure I understand fully because in your getOperators.php script, it returns a json of the operators sorted in an array with each operator name as the key. How are you converting the ubisoft json with indices to the json returned in getOperators.php?

Seems2Legit commented 3 years ago

The getOperators.php uses the config endpoint of StatsDB https://api.statsdb.net/r6/config

SwiftCODA commented 3 years ago

Ohhh okay. I'll play around with that. Thanks