@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Interactive documentation for your Premium plan
@base /api/v1/premium
@version v1
@auth ApiKey Authorization in header
@common_fields {key: str}
@endpoints 7
@toc point(1), find_places(1), find_places_prefix(1), nearest_place(1), map(1), time_machine(1), air_quality(1)

@group point
@endpoint GET /point
@optional {place_id: str, lat: str, lon: str, sections: str=current,hourly, timezone: str, language: str=en, units: str=auto}
@returns(200)
@errors {400, 402, 403, 422, 429}

@endgroup

@group find_places
@endpoint GET /find_places
@required {text: str}
@optional {language: str=en}
@returns(200)
@errors {400, 402, 403, 422, 429}

@endgroup

@group find_places_prefix
@endpoint GET /find_places_prefix
@required {text: str}
@optional {language: str=en}
@returns(200)
@errors {400, 402, 403, 422, 429}

@endgroup

@group nearest_place
@endpoint GET /nearest_place
@required {lat: str, lon: str}
@optional {language: str=en}
@returns(200) {name: str, place_id: str, adm_area1: any, adm_area2: any, country: any, lat: str, lon: str, timezone: any, type: str}
@errors {400, 402, 403, 422, 429}

@endgroup

@group map
@endpoint GET /map
@required {variable: str, datetime: str}
@optional {tile_x: int, tile_y: int, tile_zoom: int, min_lat: str, min_lon: str, max_lat: str, max_lon: str}
@returns(200)
@errors {400, 402, 403, 422, 429}

@endgroup

@group time_machine
@endpoint GET /time_machine
@required {date: str(date)}
@optional {place_id: str, lat: str, lon: str, timezone: str, units: str=auto, language: str=en}
@returns(200) {lat: str, lon: str, elevation: int, timezone: str, units: str, data: [map], daily: map{temperature: num, temperature_min: num, temperature_max: num, feels_like: num, feels_like_min: num, feels_like_max: num, wind_chill: num, wind_chill_min: num, wind_chill_max: num, soil_temperature: num, soil_temperature_min: num, soil_temperature_max: num, dew_point: num, dew_point_min: num, dew_point_max: num, surface_temperature: num, surface_temperature_min: num, surface_temperature_max: num, wind: map{speed: num, gusts: num, dir: str(binary), angle: num}, cloud_cover: map{total: num, low: num, middle: num, high: num}, pressure: num, precipitation: map{total: num, type: str(binary)}, humidity: num}, statistics: map{temperature: map{avg: num, avg_min: num, avg_max: num, record_min: num, record_max: num}, wind: map{avg_speed: num, avg_angle: num, avg_dir: str(binary), max_speed: num, max_gust: num}, precipitation: map{avg: num, probability: int}}}
@errors {400, 402, 403, 422, 429}

@endgroup

@group air_quality
@endpoint GET /air_quality
@optional {place_id: str, lat: str, lon: str, timezone: str}
@returns(200) {lat: str, lon: str, elevation: int, timezone: str, data: [map]}
@errors {400, 402, 403, 422, 429}

@endgroup

@end
