Resources

Resource NodeType

/api/node_types?locale&page&per_page

/api/categories/{category_id}/node_types?locale&page&per_page

Methods

GET

Retrieve the node type collection. This resource can also be nested whithin a category, to just return the node types associated with the given category. See examples

request query parameter
Parameter Type Description
locale string Localize node types with the given locale. Default is "de", valid are any of the available locales.
page integer For pagination, what page of the results you are on. Default is 1.
per_page integer For pagination, how many results to return per page. Default is 200. Max is 500.

Example request:

http://wheelmap.org/api/node_types?api_key=api_key&per_page=6

This resource can also be nested within categories.

http://wheelmap.org/api/categories/1/node_types?api_key=api_key&per_page=6

Representations

Example node types representation. (application/json)

{ "conditions":
    {
      "format":"json",
      "page":1,
      "per_page":6,
      "locale":"de"
    },
  "meta":
    {
      "page":1,
      "num_pages":17,
      "item_count":6,
      "item_count_total":102
    },
  "node_types":[
    {
      "id":1,
      "identifier":"veterinary",
      "icon":"hospital.png",
      "localized_name":"Tierarzt",
      "category":{
        "id": 6,
        "identifier": "misc"
      }
    },
    {
      "id":3,
      "identifier":"public_building",
      "icon":"bank.png",
      "localized_name":"\u00d6ffentliches Geb\u00e4ude",
      "category":{
        "id": 3,
        "identifier": "government"
      }
    },
    {
      "id":23,
      "identifier":"hardware",
      "icon":"wrench.png",
      "localized_name":"Eisenwarenladen",
      "category":{
        "id": 1,
        "identifier": "shopping"
      }
    },
    {
      "id":7,
      "identifier":"atm",
      "icon":"credit-cards.png",
      "localized_name":"Geldautomat",
      "category":{
        "id": 1,
        "identifier": "bank"
      }
    },
    {
      "id":42,
      "identifier":"convenience",
      "icon":"shopping-basket.png",
      "localized_name":"Sp\u00e4tkauf",
      "category":{
        "id": 1,
        "identifier": "shopping"
      }
    },
    {
      "id":667,
      "identifier":"butcher",
      "icon":"shopping-basket.png",
      "localized_name":"Fleischer",
      "category":{
        "id": 1,
        "identifier": "shopping"
      }
    }
  ]
}