@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Jokes One API
@base https://api.jokes.one
@version 1.1
@auth ApiKey X-JokesOne-Api-Secret in header
@endpoints 12
@toc jod(2), joke(10)

@group jod
@endpoint GET /jod
@optional {category: any}
@returns(200)

@endpoint GET /jod/categories
@returns(200)

@endgroup

@group joke
@endpoint PUT /joke
@required {title: any, text: any}
@optional {author: any, tags: any}
@returns(200)
@errors {401}

@endpoint PATCH /joke
@required {id: any}
@optional {title: any, text: any, author: any, tags: any}
@returns(200)
@errors {401}

@endpoint GET /joke
@optional {id: any}
@returns(200)
@errors {401}

@endpoint DELETE /joke
@required {id: any}
@returns(200)
@errors {401, 404}

@endpoint GET /joke/random
@returns(200)
@errors {401}

@endpoint GET /joke/search
@optional {category: any, query: any, minlength: any, maxlength: any, author: any, private: any}
@returns(200)
@errors {401}

@endpoint GET /joke/categories/search
@required {query: any}
@optional {start: any}
@returns(200)

@endpoint GET /joke/list
@optional {start: any}
@returns(200)
@errors {401}

@endpoint POST /joke/tags/add
@required {id: any, tags: any}
@returns(200)
@errors {401, 404}

@endpoint POST /joke/tags/remove
@required {id: any, tags: any}
@returns(200)
@errors {401, 404}

@endgroup

@end
