This endpoint is used for updating, deleting, or fetching a specific review by its reviewID. GET requires an API key. All other operations require OAuth. The authenticated user can only update or delete her own reviews. An attempt to update or delete someone else's review will return 403.
Resource URI
/Reviews/319639?api_key=xxxxx
Resource Properties
Parameter
|
Format
|
Description
|
Allows Null
|
rating |
decimal |
the user's trail rating attached to this review |
no |
reviewDate |
date |
Date of the review |
no |
reviewID |
long |
the unique identifier for the review |
no |
reviewText |
string |
The text of the review |
no |
submitterAcctID |
long |
the acctID of the user who submitted the review |
no |
submitterName |
string |
the username of the user who submitted the review |
no |
title |
string |
the title of the review |
no |
trailID |
long |
the acctID of the trail being reviewed |
no |
trailName |
string |
the name of the trail being reviewed |
no |
Error Responses
HTTP GET
Get a specific review by review_id
JSON Request:
Request Body is Empty
JSON Response:
{
"rating": 5,
"reviewDate": "2011-01-23 20:34:16Z",
"reviewID": 319639,
"reviewText": "",
"submitterAcctID": 7440532,
"submitterName": "johnqsample",
"title": "Really Great trail",
"trailID": 6683560,
"trailName": "Trail Name Test 2"
}
XML Request:
XML Response:
HTTP PUT
Update an existing review. The only fields which can be updated are title and reviewText.
JSON Request:
{
"rating": 5,
"reviewDate": "2011-01-23 20:34:16Z",
"reviewID": 319639,
"reviewText": "This is a great trail. I recommend it.",
"submitterAcctID": 7440532,
"submitterName": "johnqsample",
"title": "Great trail",
"trailID": 6683560,
"trailName": "Trail Name Test 2"
}
JSON Response:
true
XML Request:
XML Response:
<boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean>
HTTP DELETE
Delete an existing review.
JSON Request:
request body emtpy
JSON Response:
true
XML Request:
request body emtpy
XML Response:
<boolean xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</boolean>
REST API: Reviews Set
The Set endpoint is used to get the most recent reviews or to post a new review. limit is required if getting.
Resource URI
/Reviews/?api_key=xxxxx&limit=5
Set Filters
Parameter | Format | Description | Allows Null |
limit |
number |
number of most recent reviews to return |
no |
HTTP GET
Get the {limit} most recent approved reviews.
JSON Request:
Request Body is Empty
JSON Response:
[{
"rating": 0,
"reviewDate": "2013-03-02 16:43:55Z",
"reviewID": 321239,
"reviewText": "This is a great trail. I recommend it.",
"submitterAcctID": 0,
"submitterName": "jcm",
"title": "Really Great trail",
"trailID": 6683560,
"trailName": null
}, {
"rating": 0,
"reviewDate": "2013-02-06 06:23:35Z",
"reviewID": 320918,
"reviewText": "I had planned this ride based upon descriptions of a scenic and pleasurable ride. Based upon that I took my 7 year old daughter to ride along on her bike with training wheels. Note she routinely does 3-5 mile runs. While the directions to the park were fine, everything else about it was way off the mark. We headed East from the neil Blaisdale Park. The entire ride was through factorys, junk yards and homeless encampments, the trail was in miserable shape, the bridges worse. The section that was suppose to go to Pearl harbor and the Marina ia gated off. The only way around is along a high traffic road and even if you make it around, it is at the end of the trail. Really disappointing.",
"submitterAcctID": 0,
"submitterName": "robemma",
"title": "Not at all as described",
"trailID": 6015588,
"trailName": null
}, {
"rating": 4,
"reviewDate": "2013-02-05 15:25:46Z",
"reviewID": 320889,
"reviewText": "We ride the trail many times through the winter months and love it every time. The trail facilities are excellent with good parking areas and rest rooms. We used to ride the entire trail which takes you up through Apopka and across the magnificent bridge over Rt. 441.\u000d
However, we got sick of fixing flat tires (three in one day) when we rode through one particular section of the trail where locals seem to think it is fun to break bottles on the trail. Even when it looked safe to pass through we picked up tiny pieces of glass and had flats. We now stop at the horse park and turn around to head back to Winter Garden or Killarny.\u000d
This is a great trail with only one problem area.\u000d
If you are going to ride through Apopka make sure you bring the equipment you need to fix flat tires!!",
"submitterAcctID": 0,
"submitterName": "robdew",
"title": "Caution in Apopka",
"trailID": 6015676,
"trailName": null
}]
XML Request:
Request Body is Empty
XML Response:
HTTP POST
Insert a new review of a trail. Pass 0 for the reviewID and submitterAcctID, and emptry string for submitterName. The new reviewID will be returned. The review will not be visible on TrailLink.com until it has been approved by RTC staff.
JSON Request:
{
"rating": 5,
"reviewDate": "2013-04-14 15:25:46Z",
"reviewID": 0,
"reviewText": "",
"submitterAcctID": 0,
"submitterName": "",
"title": "Really Great trail",
"trailID": 6683560,
"trailName": "Trail Name Test 2"
}
JSON Response:
321237
XML Request:
XML Response: