I want to use the API to get the sum of all scores of my answers to questions having a specific tag.
I started using top-user-answers-in-tags method, but it only returns the top 30, whereas I want them all.
I want to use the API to get the sum of all scores of my answers to questions having a specific tag.
I started using top-user-answers-in-tags method, but it only returns the top 30, whereas I want them all.
To do this you have to use the /users/{ids}/answers
path to download all of a user's answers, and then filter out the tags and/or tot-up the scores from there.
Pseudo code:
scoreByTag = [] // Empty associative array
while (more pages of results) {
1) Fetch next page of answers
2) Store results and/or update scoreByTag array
}
Display/use select tag score(s) as desired.
Note that there is already a page that does this. It displays a user's tag scores for all his tags, with handy searching and sorting:
Here's the results for your Stack Overflow account.
See, also How to filter getAnswersForUser by tag?, for a similar solution on the old API.