@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api SearchLy API v1
@base https://searchly.asuarez.dev/api/v1
@version 1.0
@endpoints 3
@toc similarity(2), song(1)

@group similarity
@endpoint GET /similarity/by_song
@desc API endpoint to search similarity using a song identifier
@required {song_id: int # Song identifier.}
@returns(200) {error: bool, message: str, response: map{similarity_list: [map]}} # Standard SearchLy API v1 JSON response. You should check the `error` attribute to determine if there was an error.

@endpoint POST /similarity/by_content
@desc API endpoint to search similarity using content
@optional {content: str # Content for searching similarity.}
@returns(200) {error: bool, message: str, response: map{similarity_list: [map]}} # Standard SearchLy API v1 JSON response. You should check the `error` attribute to determine if there was an error.

@endgroup

@group song
@endpoint GET /song/search
@desc API endpoint to search songs from the database given a query
@required {query: str # Query.}
@returns(200) {error: bool, message: str, response: map{results: [map]}} # Standard SearchLy API v1 JSON response. You should check the `error` attribute to determine if there was an error.

@endgroup

@end
