@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api ISBNdb API
@base https://api.isbndb.com
@version 1.0.1
@auth ApiKey x-api-key in header
@endpoints 10
@toc author(1), authors(1), book(1), books(1), publisher(1), publishers(1), search(1), stats(1), subject(1), subjects(1)

@group author
@endpoint GET /author/{name}
@desc Gets author details
@required {name: any # The name of an author in the Author's database}
@optional {page: any # The number of page to retrieve, please note the API will not return more than 10,000 results no matter how you paginate them, pageSize: any # How many items should be returned per page, maximum of 1,000}
@returns(200) The author name was found in the database
@errors {404: Author not found}

@endgroup

@group authors
@endpoint GET /authors/{query}
@desc Search authors
@required {query: any # A string to search for in the Author’s database}
@optional {pageSize: any # How many items should be returned per page, maximum of 1,000, page: any # The number of page to retrieve, please note the API will not return more than 10,000 results no matter how you paginate them}
@returns(200) The query string found results in the author's database
@errors {404: There are no results in the author's database for the given query}

@endgroup

@group book
@endpoint GET /book/{isbn}
@desc Gets book details
@required {isbn: any # an ISBN 10 or ISBN 13 in the Books database}
@returns(200) The book ISBN was found in the database
@errors {404: Book not found}

@endgroup

@group books
@endpoint GET /books/{query}
@desc Search books
@required {query: any # A string to search for in the Book’s database}
@optional {page: any # The number of page to retrieve, please note the API will not return more than 10,000 results no matter how you paginate them, author: any # Filters the query results by author, pageSize: any # How many items should be returned per page, maximum of 1,000}
@returns(200) The query string found results in the books's database
@errors {404: There are no results in the book's database for the given query}

@endgroup

@group publisher
@endpoint GET /publisher/{name}
@desc Gets publisher details
@required {name: any # The name of a publisher in the Publisher's database}
@optional {page: any # The number of page to retrieve, please note the API will not return more than 10,000 results no matter how you paginate them, pageSize: any # How many items should be returned per page, maximum of 1,000}
@returns(200) The publisher name was found in the database
@errors {404: Publisher not found}

@endgroup

@group publishers
@endpoint GET /publishers/{query}
@desc Search publishers
@required {query: any # A string to search for in the Publisher’s database}
@optional {pageSize: any # How many items should be returned per page, maximum of 1,000, page: any # The number of page to retrieve, please note the API will not return more than 10,000 results no matter how you paginate them}
@returns(200) The query string found results in the publisher's database
@errors {404: There are no results in the publisher's database for the given query}

@endgroup

@group search
@endpoint GET /search
@desc Search all ISBNDB databases
@optional {q: any # A query string compatible with ElasticSearch 6}
@returns(200) Results were found in the requested database
@errors {404: No results found in the requested database}

@endgroup

@group stats
@endpoint GET /stats
@desc Gets status on the ISBNDB Database
@returns(200) Stats on the ISBNDB sucessfully retrieved

@endgroup

@group subject
@endpoint GET /subject/{name}
@desc Gets subject details
@required {name: any # A subject in the Subject's database}
@returns(200) The subject was found in the database
@errors {404: Subject not found}

@endgroup

@group subjects
@endpoint GET /subjects/{query}
@desc Search subjects
@required {query: any # A string to search for in the Subject’s database}
@optional {pageSize: any # How many items should be returned per page, maximum of 1,000, page: any # The number of page to retrieve, please note the API will not return more than 10,000 results no matter how you paginate them}
@returns(200) The query string found results in the subject's database
@errors {404: There are no results in the subject's database for the given query}

@endgroup

@end
