@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Faretrotter Travel API
@base https://api.faretrotter.com/v2.0/{apikey}
@version 2.0
@auth ApiKey ApiKeyAuth in header
@endpoints 2
@toc places(1), routes(1)

@group places
@endpoint GET /places
@desc Returns possible modes of transportation between two cities.
@returns(200) Everything worked as expected.
@errors {400: Parameters did not match the endpoint requirements. Check that all required fields are present and spelt correctly., 401: Authentication Failed., 402: All parameters are correct but the request failed., 403: Request IP does not match IP address registered with key., 404: The endpoint doesn't exist., 429: Too many requests hit the API too quickly., 501: Server error, 502: Server error}

@endgroup

@group routes
@endpoint GET /routes
@required {origin_lat: any, origin_lng: any, destination_lat: any, destination_lng: any}
@returns(200) Everything worked as expected.
@errors {400: Parameters did not match the endpoint requirements. Check that all required fields are present and spelt correctly., 401: Authentication Failed., 402: All parameters are correct but the request failed., 403: Request IP does not match IP address registered with key., 404: The endpoint doesn't exist., 429: Too many requests hit the API too quickly., 501: Server error, 502: Server error}

@endgroup

@end
