Skip to content
Sebastian Müller edited this page Jul 10, 2015 · 3 revisions
{
  "title":"ParkAPI specification of a city",
  "type":"object",
  "properties":{
    "last_updated":{
      "description":"Time and date of the last update of the data source.",
      "type":"string"
    },
    "last_downloaded":{
      "description":"Time and date of the last download of the data.",
      "type":"string"
    },
    "data_source":{
      "description":"Link to the source of the data.",
      "type":"string"
    },
    "lots":{
      "description":"Array of parking lots in the city",
      "type":"array",
      "items":{
        "description":"Data for single parking lot.",
        "type":"object",
        "properties":{
          "coords":{
            "description":"Coordinates of the parking lot",
            "type":"object",
            "properties":{
              "lat":{
                "description":"Latitude of the parking lot.",
                "type":"double"
              },
              "lng":{
                "description":"Longitude of the parking lot.",
                "type":"double"
              }
            },
            "required":["lat","lng"]
          },
          "total":{
            "description":"Total amount of parking space.",
            "type":"integer"
          },
          "free":{
            "description":"Amount of free parking space.",
            "type":"integer"
          },
          "state":{
            "description":"State of the parking lot.",
            "type":"string",
            "enum":["open","closed","nodata"]
          },
          "id":{
            "description":"Id of the parking lot.",
            "type":"string"
          },
          "name":{
            "description":"Name of the Parking lot.",
            "type":"string"
          },
          "long_forecast_available":{
            "description":"Shows if long time data is available.",
            "type":"boolean"
          },
          "forecast":{
            "description":"Short time data for parking lot.",
            "type":"object",
            "properties":{
              "data_type":{
                "description":"Defines the type of the data.",
                "type":"string",
                "enum":["tendency","forecast"]
              },
              "data":{
                "description":"Short time data.",
                "type":[
                  "condition":{
                    "data_type":"tendency",
                    "type":"integer",
                    "enum":[-1,0,1]
                  },
                  "condition":{
                    "data_type":"forecast",
                    "type":"dict",
                    "properties":{
                      "description":"Short time forecast data.",
                      "key":{
                        "description":"Date of the data.",
                        "type":"string"
                      },
                      "value":{
                        "description":"Used place in percent",
                        "type":"integer"
                      }
                    }
                  }
                ]
              }
            },
            "required":["data","data_type"]
          },
          "region":{
            "description":"City region of this parking lot.",
            "type":"string"
          },
          "address":{
            "description":"Address of the parking lot.",
            "type": "string"
          },
          "lot_type":{
            "description":"Type of the Parking lot.",
            "type": "string"
          }
        },
        "required":["coords","total","free","state","id","name","long_forecast"]
      }
    } 
  },
  "required":["last_updated","last_downloaded","data_source","lots"]
} 
Clone this wiki locally