KB Articles Ratings
Ratings
> curl -H "Accept: application/vnd.tender-v1+json" \
-X GET "https://USER:PASS@api.tenderapp.com/help/ratings"
{
"offset": 0,
"total": 10,
"per_page": 30,
"faq_ratings": [
{
"updated_at": "2014-08-01T17:06:35Z",
"created_at": "2014-08-01T17:06:35Z",
"user_id": null,
"user_token": "XXX",
"faq_id": 123,
"version": 2,
"rating": -1,
"body": "Oh noes"
},
{rating},
{rating},
...
]
}
- created_at: creation date.
- updated_at: last updated date. Should equal creation date.
- user_id: the ID of the user who rated the KB, if it was a registered user
- user_token: the token of the user who rated the KB, if it was an anonymous user
- faq_id: the KB article ID
- version: the version rated
- rating: 1 or -1
- body: comment, if any
Ratings for a KB article
> curl -H "Accept: application/vnd.tender-v1+json" \
-X GET "https://USER:PASS@api.tenderapp.com/help/ratings/ID"
- ID: the KB article ID
Creating a rating
Creates a rating for the current user:
curl -H "Content-Type: application/vnd.tender-v1+json" \
-X POST "https://USER:PASS@api.tenderapp.com/help/ratings" \
-d '{
"faq_id": 1,
"rating": "up",
"reason": "I like it!"
}'
- faq_id: the KB article ID
- rating:
1
/-1
orup
/down
- reason: optional comment