OpenParking Documentation Beta

Structure Lot

public struct Lot

A place where cars can be left to do whatever cars do when no one's around.

Nested Types

Lot.Available
Lot.State
Lot.LotType
Lot.Pricing
Lot.OpeningHours

Initializers

init(data​Age:​name:​coordinates:​city:​region:​address:​available:​capacity:​state:​type:​detail​URL:​image​URL:​pricing:​opening​Hours:​additional​Information:​)

public init(dataAge: Date? = nil, name: String, coordinates: Coordinates?, city: String, region: String? = nil, address: String? = nil, available: Available, capacity: Int? = nil, state: Lot.State, type: Lot.LotType? = nil, detailURL: URL? = nil, imageURL: URL? = nil, pricing: Pricing? = nil, openingHours: OpeningHours? = nil, additionalInformation: [String : Any]? = nil)

Properties

data​Age

let dataAge: Date?

The time when this data was last updated according to the source.

name

let name: String

Name of the lot.

coordinates

let coordinates: Coordinates?

A physical location.

city

let city: String

The city or town this lot resides in.

region

let region: String?

An optional region or district, if applicable.

address

let address: String?

A street address, if applicable.

available

let available: Available

The count of empty spots available for use. Can either be a discrete value or a range.

capacity

let capacity: Int?

The total capacity if available.

state

let state: State

The current state of the lot, e.g. is it open for access?

type

let type: LotType?

The lot's type, maybe it's not a lot at all, but an underground carpark?

detail​URL

let detailURL: URL?

An optional detail URL pointing to more info on this lot.

image​URL

let imageURL: URL?

An optional image URL.

pricing

let pricing: Pricing?

Pricing information, can contain a direct description and/or a URL pointing to more information or payment options.

opening​Hours

let openingHours: OpeningHours?

Hours of operation, can contain a direct description and/or a URL pointing to more information.

additional​Information

let additionalInformation: [String: Any]?

Any additional information that could be relevant, possibly an entrance height?