Anyway, as it stands now, you must do this in pages and in 3 steps per page. Here's the pseudocode:
Get the first page of reputation entries. Fortunately, these seem to be sorted by date in descending order.
Set the pagesize
to it's maximum value for this path (100).
For example, call:
/2.1/me/reputation-history/full?page=1&pagesize=100&site=stackoverflow&filter=!9j_cPmQ8n
and get results like:
{
"total": 4284,
"page_size": 100,
"page": 1,
"type": "reputation_history",
"items": [
{
"user_id": 331508,
"creation_date": 1375825981,
"post_id": 3657953,
"reputation_change": 5,
"reputation_history_type": "post_upvoted"
},
{
"user_id": 331508,
"creation_date": 1373713575,
"post_id": 17615370,
"reputation_change": 15,
"reputation_history_type": "answer_accepted"
},
// etc., etc.
],
"quota_remaining": 9993,
"quota_max": 10000,
"has_more": true
}
These will be the user's most recent rep changes (up to 100). Most of the time, it will be all you need -- unless the users scrolls down for more.
Collect the post_id
s into a semicolon-separated list. EG: 3657953;17615370
.
Post ID's may be duplicated so, ideally, remove duplicates here -- to save bandwidth in the next steps.
Feed those id's into the /questions/{ids}
path, using pagesize=100
and filter=!J4Lov0xb.M
. For example:
/2.1/questions/3657953;17615370?pagesize=100&site=stackoverflow&filter=!J4Lov0xb.M
Yielding results like:
{
"total": 1,
"page_size": 100,
"page": 1,
"type": "question",
"items": [
{
"question_id": 3657953,
"score": 8,
"title": "How do I get the jQuery-UI version?",
"tags": [
"jquery",
"jquery-ui",
"greasemonkey"
]
}
],
"quota_remaining": 9953,
"quota_max": 10000,
"has_more": false
}
Important:
- If the
post_id
belongs to an answer, it will not appear in these results; that's okay.
- The
question_id
will match the post_id
passed in when said post_id
is for a question.
- The results may not be in the order of the id's that were passed in.
Feed those id's into the /answers/{ids}
path, using pagesize=100
and filter=!FqMlbofLCbbHPWmQsFIonPgq86
. For example:
/2.1/answers/3657953;17615370?pagesize=100&site=stackoverflow&filter=!FqMlbofLCbbHPWmQsFIonPgq86
Yielding results like:
{
"total": 1,
"page_size": 100,
"page": 1,
"type": "answer",
"items": [
{
"question_id": 17614067,
"answer_id": 17615370,
"score": 1,
"is_accepted": true,
"title": "addEventListener and setInterval fail silently in a Greasemonkey script",
"tags": [
"javascript",
"greasemonkey",
"setinterval",
"addeventlistener"
]
}
],
"quota_remaining": 9945,
"quota_max": 10000,
"has_more": false
}
Important:
- If the
post_id
belongs to a question, it will not appear in these results; that's okay.
- The
answer_id
will match the post_id
passed in when said post_id
is for an answer.
- The results may not be in the order of the id's that were passed in.
Combine the title
values, obtained in steps 3 and 4, with the reputation entries from step 1, by keying off the appropriate ID's.
Voilà, done in 5 easy steps (per page of results)!
Repeat steps 1-6 for additional pages of reputation entries, only on user demand.