F@H Stats API Enhancements?
Posted: Sat Apr 28, 2018 3:52 am
I contacted FAH's Facebook page to ask them about this and they said to post it on these forums. None of the forums really fit my posting purpose, so I hope this is the right place to post this.
I'm a web developer and I was hoping that some improvements to the stats API could be made. Namely, I'm requesting a mode that would get team-specific donor results when both a donor and a team are specified on the donor stats api script (/api/donors).
Right now, if I specify the name "bls1999", the data returned is this:
The only data added to this when a team is specified is to the description field, which changes to Name is 'bls1999' -- Team '143016'. This, as a developer, is a waste of potential information. If I want that information, the only place I can find it is the fast teampage URL for Team 143016.
What I'm proposing is a change to the structure of the returned data, to something like this when both a donor and a team number are sent:
If someone would be needed to make the needed improvements to the script, I would be happy to work on it a bit.
Please let me know if I can answer any questions. Thanks for reading! Cheers.
I'm a web developer and I was hoping that some improvements to the stats API could be made. Namely, I'm requesting a mode that would get team-specific donor results when both a donor and a team are specified on the donor stats api script (/api/donors).
Right now, if I specify the name "bls1999", the data returned is this:
Code: Select all
{
"description":"Name is 'bls1999'",
"monthly":false,
"results":[
{
"wus":414,
"credit_cert":"api/awards/donor/credit/1574699/10269849",
"name":"bls1999",
"rank":17018,
"credit":10269849,
"team":143016,
"wus_cert":"api/awards/donor/wus/1574699/414",
"id":1574699
}
],
"month":4,
"year":2018,
"query":"donor",
"path":"donors"
}
What I'm proposing is a change to the structure of the returned data, to something like this when both a donor and a team number are sent:
Code: Select all
{
"description":"Name is 'bls1999'",
"monthly":false,
"results":[
{
"wus":414,
"credit_cert":"api/awards/donor/credit/1574699/10269849",
"name":"bls1999",
"rank":17018,
"credit":10269849,
"team":143016,
"wus_cert":"api/awards/donor/wus/1574699/414",
"id":1574699
}
],
"team_results":[
"wus":414,
"name":"bls1999",
"rank":29,
"credit":10269849
],
"month":4,
"year":2018,
"query":"both",
"path":"both"
}
Please let me know if I can answer any questions. Thanks for reading! Cheers.