/ trailapi
Discussions
14
AllQuestionsAnswers
arrowNewest
a4The trailhead coordinates are included in the response, when available at the "place" level. Here is a sample response. In this example, you'll note the mountain bike activity info includes an attribute called "length" plus a thumbnail image, and a rating (on a scale of 1-5, 1 being bad, 5 being great.) Depending on the activity type, there are different attributes included. { places: [ { city: "Avon", state: "Colorado", country: "United States", name: "Beaver Creek Ski Resort", parent_id: null, unique_id: 721, directions: "From Denver, take I-70 West to exit 167, Avon. Follow the signs to the Beaver Creek Ski resort. There is no parking once you're up the mountain so be sure to make arrangements.", lat: 39.63121, lon: -106.52535, description: null, date_created: null, children: [ ], activities: [ { name: "Beaver Creek Ski Resort", unique_id: "1-711", place_id: 721, activity_type_id: 5, activity_type_name: "mountain biking", url: "http://www.singletracks.com/bike-trails/beaver-creek-ski-resort.html", attribs: {"length": ""5""}, description: "There are tons of trails here but only a few are serviced by the summer lift. If you are in great shape (or too cheap to buy a ticket), skip the lift and ride up the mountain (all 2000 vertical feet). The "Blue" trails are the singletrack options and they can be pretty challenging for most riders. The singletrack was mostly washed out and very rooty and steep in sections. If you choose the "Green" trails, be prepared to take the road all the way to the bottom. Overall, not one of the best lift serviced downhills available. Go to Keystone instead (although the scenery is tough to beat).", length: 5, activity_type: { created_at: "2012-08-15T16:12:35Z", id: 5, name: "mountain biking", updated_at: "2012-08-15T16:12:35Z" }, thumbnail: "http://www.singletracks.com/images/uploads/2011/07/IMG_0416-0-thumb.jpg", rank: null, rating: 3.8 }, { ... }, { ... }, { ... }, { ... } ] }, { ... } ] }
Fri 5:5221/7/17
a4Also, these queries for different states in the US also appear to be returning the correct trails within those states. https://trailapi-trailapi.p.mashape.com/?q[state_cont]=Georgia https://trailapi-trailapi.p.mashape.com/?q[state_cont]=California
Wed 6:4219/7/17
a1AlexBai, what are the parameters in your query? It's possible no items match your query.
Wed 6:3819/7/17
a4Hi cavealix, can you post a couple of the queries you're attempting? For example, these queries for different lat/lon pairs are correctly returning different sets of trails. https://trailapi-trailapi.p.mashape.com/?lat=34&lon=-83&radius=100 https://trailapi-trailapi.p.mashape.com/?lat=34&lon=-84&radius=100
Wed 6:3719/7/17
a2I looked into this and unfortunately we can't promise a fix for this in the near future due to resource constraints.
Mon 9:1023/1/17
a1Sorry, no. But I'm sure there are plenty of generic examples of working with JSON APIs in Swift on Stack Overflow.
Fri 4:154/11/16
Showing 1-6 of 14 results

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication