ClanAODDev / AOD_RCT

0 stars 0 forks source link

Battlelog API #54

Open flashadvocate opened 9 years ago

flashadvocate commented 9 years ago

A fairly important goal I have is for us to part ways with bf4db, and rely primarily on battlelog. Because battlelog does what we want to do, they are an unnecessary middle man that adds another connection to the list, and one more server to go down.

So after a little bit of digging, I have come across some very useful data streams, which will involve a little bit of cross-work. For one, we will need to replace the bf4db id with the battlelog player id. bf4stats already roots this out. We could do a bit more work and rely solely on battlelog for the id, but because this is only a one time thing that should happen only once in the life cycle of a member, I'm not too worried.

player id : http://api.bf4stats.com/api/playerInfo?plat=pc&name=aguybrush&output=js&opt=urls

Once we have the personaid (player id) (302422941), we can then use it to fetch the data we want...

bf4 battlereports : http://battlelog.battlefield.com/bf4/warsawbattlereportspopulate/302422941/2048/1/ bfh battlereports: http://battlelog.battlefield.com/bfh/warsawbattlereportspopulate/302422941/8192/1/

flashadvocate commented 9 years ago

ref: https://github.com/flashadvocate/AOD_RCT/commit/3cdd4c5d938268f66d5d1f73a8f7a07d3301cde9