@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Groundhog Day API
@base https://virtserver.swaggerhub.com/pcraig3/groundhog-day-api/1.2.1
@version 1.2.1
@endpoints 5
@toc api(5)

@endpoint GET /api/v1
@returns(200) {message: str, _links: map{self: map{href: str}, groundhogs: map{href: str}, groundhog: map{href: str}, predictions: map{href: str}, spec: map{href: str}}}

@endpoint GET /api/v1/groundhogs
@optional {country: str, isGroundhog: str(1/0/true/false)}
@returns(200) {groundhogs: [map]}

@endpoint GET /api/v1/groundhogs/{slug}
@returns(200) {groundhog: map{id: int, slug: str, shortname: str, name: str, city: str, region: str, country: str, coordinates: str, source: str, contact: str, currentPrediction: str, isGroundhog: int(binary), type: str, active: int(binary), description: str, image: str, predictions: [map], predictionsCount: int}}
@errors {400}

@endpoint GET /api/v1/predictions
@optional {year: int}
@returns(200) {predictions: [map]}
@errors {302, 400}

@endpoint GET /api/v1/spec
@returns(200)

@end
