OK, i found out a lot over the API description and some forum discussions on bf3stats.com which will be too much to post here in detail. But i will try to shorten the bunch of informations so we can get further to the actual problem: understanding the data given in the playerreport-object for implementing custom assignments.
First of all, it seems that the sig-coder-API for displaying signature graphics from bf3stats is polling the same EA database as battlelog does. I have also found a lot of the keys from the battlereport within the API-response from bf3stats. So i think this would be a great point to start our search, because the guys from bf3stats have already formed the keys from the raw output into some human readable stuff which i think may help a lot.
I would even say that we/you (i will take the we further on ;)) could maybe play a bit with the whole API to get more familiar with all the data provided.
Check out their API description on:
http://bf3stats.com/api
They also provide a tester like a demo on the bottom of the page. The really interesting about that are the filters you can set.
(sry, i may sound confusing, but i am getting more and more to the solution as i am writing this post and find more and more stuff which may help)
OK, so here is what i did:
First i tried the following opts in the API tester:
DataGroup: player
//i know, this are overall stats, not battlereports
output: lines
//for better reading now, later the json output will be more useful, i assume ;)
Platform: PC
//cause i am playing on PC :P
opt: clear,keys,raw
//check out the description above the tester for details
player: caramelPig
//feel free to use your own :D
then i clicked on
display results
,
get response
is just opening another window
*tadaaaaa* what you can see then is pretty much the same what you can find in the playerreport object. Sure, there is a lot more in the API stats (cause they hold a lot more info), but i found almost every key within the API response using the browser search function (yes, i am lazy :P)
example playerreport:
c___sfw_g=417
c___shw_g=34
example API:
stat.c___sfw_g=886376
stat.c___shw_g=71840
OK, so far, so good. The next thing i did was to switch the opts from clear,keys,raw to clear,keys,assignments and that was a direct hit! Just do it for yourself and you will see what i mean: The cryptic keys are listed with a certain amount of criterias, even a text-form description and they reference to the raw output keys you have seen in the request before!
stats.assignments.xpma09.xpma09.count='stat.xpma09_00'
stats.assignments.xpma09.xpma09.date='stat.xpma09_01'
stats.assignments.xpma09.xpma09.active=true
stats.assignments.xpma09.xpma09.criteria[0].curr='stat.c_xpma09___ca_g'
stats.assignments.xpma09.xpma09.criteria[0].needed=10
stats.assignments.xpma09.xpma09.criteria[0].nname='Arm 10 MCOMs'
stats.assignments.xpma09.xpma09.criteria[1].curr='stat.c_xpma09___ccp_g'
stats.assignments.xpma09.xpma09.criteria[1].needed=10
stats.assignments.xpma09.xpma09.criteria[1].nname='Capture 10 flags'
stats.assignments.xpma09.xpma09.criteria[2].curr='stat.c_xpma09_xp11__so_g'
stats.assignments.xpma09.xpma09.criteria[2].needed=7200
stats.assignments.xpma09.xpma09.criteria[2].nname='Play 2 hours on Karkand'
Sure, there is still a lot more to find out (like the meanings of _g or _g_a, how to query a certain battle, and so on, and so on), but i think this is the first step to the planned feature :P
During my 'sherlock-holmes-session' this evening i stumbled upon some more possibilities that may help further (maybe even to leave this bf3stats API alone and go the way to EA directly) but also some restrictions or other problems in the API (like updates only every 20min, written in PHP-how to fix that??? or something like that) which i have to check first a bit deeper. Also i am tired as hell atm and will go to bed now.
You have to excuse if my english is not the best or if i have some typos somewhere... almost sleeping...
Nevertheless i hope i could have helped you with the novel above. Maybe you are just shaking your head about my noobishness, cause you use most of this stuff already in your plugin. But I think it should keep you busy till tomorrow, if only by reading all this poorly structured stuff :D
ah, and you may want to check this forum-posts and urls regarding the bf3stats API:
http://forum.p-stats.com/threads/981-BF3Stats-API-Class-A-simple-PHP-Framework-for-your-own-projects-WIP
http://forum.p-stats.com/threads/610-Sig-coding-Collection-of-useful-functions
https://github.com/Grezvany13/BF3Stats-API-Class
so... hf and good night
obey!