@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api They Said So Quotes API
@base https://quotes.rest
@version 5.1
@auth Bearer bearer
@endpoints 45
@hint download_for_search
@toc qod(5), quote(32), qshow(8)

@group qod
@endpoint GET /qod
@optional {category: str(string), language: str(string)=en, id: str(string)}
@returns(200) {success: str, contents: any}
@errors {400}

@endpoint PUT /qod
@required {title: str(string)}
@optional {repeat_after: int(integer)=30, authors: str(array), private: bool=false, language: str(string)=en, sfw: bool=false}
@returns(200) {success: str, contents: [any]}
@errors {400, 403}

@endpoint PATCH /qod
@required {title: str(string)}
@optional {repeat_after: int(integer)=30, authors: str(array), private: bool=false, language: str(string)=en, sfw: bool=false}
@returns(200) {success: str, contents: any}
@errors {400, 403}

@endpoint GET /qod/categories
@optional {language: str(string)=en, detailed: bool=false}
@returns(200)
@errors {400}

@endpoint GET /qod/languages
@returns(200)

@endgroup

@group quote
@endpoint GET /quote/random
@optional {language: str(string)=en, limit: int(integer)=1}
@returns(200) {success: str, contents: any}
@errors {401}

@endpoint GET /quote/search
@optional {category: str(string), author: str(string), minlength: int(int32)=100, maxlength: int(int32)=300, query: str(string), private: bool=false, language: str(string)=en, limit: int(integer)=1, sfw: bool=false}
@returns(200) {success: str, contents: any}
@errors {401, 404}

@endpoint GET /quote/categories/popular
@optional {start: int(int32)=0, limit: int(int32)=5}
@returns(200)

@endpoint GET /quote/categories/search
@optional {query: str(string)=0, start: int(int32)=0, limit: int(int32)=2}
@returns(200)

@endpoint GET /quote/authors/popular
@optional {language: str(string)=en, detailed: bool=false, start: int(int32)=0, limit: int(int32)=5}
@returns(200)
@errors {400}

@endpoint GET /quote/authors/search
@optional {query: str(string), language: str(string)=en, detailed: bool=false, start: int(int32)=0, limit: int(int32)=1}
@returns(200)
@errors {400}

@endpoint PUT /quote
@required {quote: str(string)}
@optional {author: str(string), tags: str(string), language: str(string)=en}
@returns(200)
@errors {401}

@endpoint POST /quote
@required {quote: str(string)}
@optional {author: str(string), tags: str(string), language: str(string)=en}
@returns(200)
@errors {401}

@endpoint PATCH /quote
@required {id: str(string)}
@optional {quote: str(string), author: str(string), language: str(string)=en, tags: str}
@returns(200)
@errors {401}

@endpoint GET /quote
@optional {id: str(string)}
@returns(200) {success: str, contents: any}
@errors {401}

@endpoint DELETE /quote
@required {id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/list
@optional {start: int(int32)=0, limit: int(int32)=10}
@returns(200)
@errors {401}

@endpoint POST /quote/tags/add
@required {id: str(string), tags: str(string)}
@returns(200)
@errors {401, 404}

@endpoint POST /quote/tags/remove
@required {id: str(string), tags: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/like/toggle
@required {quote_id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/bookmark/toggle
@required {quote_id: str(string)}
@returns(200)
@errors {401, 404}

@endgroup

@group qshow
@endpoint PUT /qshow
@required {title: str(string)}
@optional {description: str(string), tags: [str]}
@returns(200)
@errors {401}

@endpoint GET /qshow
@required {id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint PATCH /qshow
@required {id: str(string)}
@optional {title: str(string), description: str(string), tags: [str]}
@returns(200)
@errors {401, 404}

@endpoint DELETE /qshow
@required {id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint POST /qshow/quotes/add
@required {id: str(string), quoteid: str(string)}
@returns(200)
@errors {401, 404}

@endpoint POST /qshow/quotes/remove
@required {id: str(string), quoteid: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /qshow/quotes
@required {id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /qshow/list
@optional {start: int(int32)=0, public: bool=false}
@returns(200)
@errors {401}

@endgroup

@group quote
@endpoint PUT /quote/image
@required {quote_id: str(string)}
@optional {bgimage_id: str(string)=theysaidso_default_background_image, bg_color: str(string), font_id: str(string)=theysaidso_default_font, text_color: str(string), text_size: str(string), halign: str(string)=center, valign: str(string)=center, width: int(integer), height: int(integer), branding: bool=false, include_transparent_layer: bool=true}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/image
@required {id: str(string)}
@optional {binary: bool=true}
@returns(200)
@errors {401, 404}

@endpoint DELETE /quote/image
@required {id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/image/search
@optional {category: str(string), author: str(string), private: bool=false}
@returns(200)
@errors {401, 404}

@endpoint POST /quote/image/background
@returns(200)
@errors {401}

@endpoint DELETE /quote/image/background
@required {id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/image/background/search
@optional {query: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/image/background/list
@optional {start: int(integer)}
@returns(200)
@errors {401, 404}

@endpoint POST /quote/image/background/tags/add
@required {id: str(string), tags: str(string)}
@returns(200)
@errors {401, 404}

@endpoint POST /quote/image/background/tags/remove
@required {id: str(string), tags: str(string)}
@returns(200)
@errors {401, 404}

@endpoint POST /quote/image/font
@returns(200)
@errors {401}

@endpoint DELETE /quote/image/font
@required {id: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/image/font/search
@optional {query: str(string)}
@returns(200)
@errors {401, 404}

@endpoint GET /quote/image/font/list
@optional {start: int(integer)}
@returns(200)
@errors {401, 404}

@endpoint POST /quote/image/font/tags/add
@required {id: str(string), tags: str(string)}
@returns(200)
@errors {401, 404}

@endpoint POST /quote/image/font/tags/remove
@required {id: str(string), tags: str(string)}
@returns(200)
@errors {401, 404}

@endgroup

@end
