/users/tags should contain scores
- by Sean Patrick Floyd
I am implementing some simple JavaScript/bookmarklet based apps that show some reputation info, including the score in the User's top tags (roughly based on this previous bookmarklet of mine).
Now I can get a user's top tags (using the API), and I can also get the per-tag score if the user is logged in, by dynamically parsing the tag's top users page. But it costs me one AJAX request per tag and I have to download 10+k to extract a single numeric value.
It would save a lot of traffic if the tags in <api>/users/<userid>/tags had a score field. The data seems to be there, after all the top users pages use it, so it would just be a question of exposing the data.
Suggested structure:
"tags": [
{
"name": {
"description": "name of the tag",
"values": "string",
"optional": false,
"suggested_buffer_size": 25
},
"score": {
"description": "tag score, sum of up votes for answers on non-wiki questions",
"values": "32-bit signed integer",
"optional": false
},
"count": {
"description": "tag count, exact meaning depends on context",
"values": "32-bit signed integer",
"optional": false
},
"restricted_to": {
"description": "user types that can make use of this tag, lack of this field indicates it is useable by all",
"values": "one of anonymous, unregistered, registered, or moderator",
"optional": true
},
"fulfills_required": {
"description": "indicates whether this tag is one of those that is required to be on a post",
"values": "boolean",
"optional": false
},
"user_id": {
"description": "user associated with this tag, depends on context",
"values": "32-bit signed integer",
"optional": true
}
}
]