API Documentation / page

This is some very rough info on the Trailforks API. More detailed and pretty documentation will come.

Nodes (trail,riding_area,report,photo,video,event,group_ride)

Operation: retrieve

retrieve data for a single node
arguments: nid

Example:
return data for a single node of the nid of "1"
http://www.trailforks.com/api/1/node/1

Operation: index

return a list of node objects based on parameters passed
arguments: page, fields, parameters, pagesize, cck_fields

page: {int} The zero-based index of the page to get, defaults to 0.
pagesize: {int} Number of records to get per page.
fields: {string} The fields to get.
parameters: {array} Parameters array.
cck_fields: {array} The cck field to get.

Examples:
return only the nid & title fields for node type of "trail"
http://www.trailforks.com/api/1/node?fields=nid,title&parameters[type]=t...

return nodes that have the cck field of field_location that equals "4" and are of the node type "riding_area".
http://www.trailforks.com/api/1/node?cck_fields[field_location]=4&parame...

Operation: create

currently only trail reports can be created via the API
...

taxonomy_vocabulary

getTree

This method returns a full list of taxonomy terms for a given vocabulary.
arguments: vid, parent, maxdepth

vid: {int} Id of the vocabulary to return terms for.
parent: {int} The term ID under which to generate the tree. If 0, generate the tree for the entire vocabulary.
maxdepth: {int} The number of levels of the tree to return. Leave NULL to return all levels.

taxonomy_term