@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Erskine May API
@version v1
@endpoints 11
@toc api(11)

@endpoint GET /api/Chapter/{chapterNumber}
@desc Returns a single chapter overview by chapter number.
@required {chapterNumber: int(int32) # Chapter overview with the chapter number specified}
@returns(200) {partNumber: int(int32), number: int(int32), title: str?, description: str?, sections: [map]?} # Success
@errors {400: Bad Request, 404: Not Found}

@endpoint GET /api/IndexTerm/browse
@desc Returns a list of index terms by start letter.
@optional {startLetter: str # Index terms by start letter, skip: int(int32)=0 # The number of records to skip from the first, default is 0., take: int(int32)=20 # The number of records to return, default is 20, maximum is 20.}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?} # Success

@endpoint GET /api/IndexTerm/{indexTermId}
@desc Returns an index term by id.
@required {indexTermId: int(int32) # Index term by if}
@returns(200) {id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map{id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map{id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map{id: int(int32), term: str?, displayAs: str?, seeLinks: [map]?, references: [map]?, parentTerm: map, childTerms: [map]?}, childTerms: [map]?}, childTerms: [map]?}, childTerms: [map]?} # Success
@errors {400: Bad Request, 404: Not Found}

@endpoint GET /api/Part
@desc Returns a list of all parts.
@returns(200) Success

@endpoint GET /api/Part/{partNumber}
@desc Returns a part by part number.
@required {partNumber: int(int32) # Part by part number}
@returns(200) {number: int(int32), title: str?, description: str?, chapters: [map]?} # Success
@errors {400: Bad Request, 404: Not Found}

@endpoint GET /api/Search/IndexTermSearchResults/{searchTerm}
@desc Returns a list of index terms which contain the search term.
@required {searchTerm: str # Index terms which contain search term.}
@optional {skip: int(int32)=0 # The number of records to skip from the first, default is 0., take: int(int32)=20 # The number of records to return, default is 20, maximum is 20.}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?} # Success

@endpoint GET /api/Search/Paragraph/{reference}
@desc Returns a section overview by reference.
@required {reference: str # Section overview by reference.}
@returns(200) {id: int(int32), title: str?, titleChain: str?, subSections: [map]?} # Success
@errors {400: Bad Request, 404: Not Found}

@endpoint GET /api/Search/ParagraphSearchResults/{searchTerm}
@desc Returns a list of paragraphs which contain the search term.
@required {searchTerm: str # Paragraphs which contain search term in their content.}
@optional {skip: int(int32)=0 # The number of records to skip from the first, default is 0., take: int(int32)=20 # The number of records to return, default is 20, maximum is 20.}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?} # Success

@endpoint GET /api/Search/SectionSearchResults/{searchTerm}
@desc Returns a list of sections which contain the search term.
@required {searchTerm: str # Sections which contain search term in their title.}
@optional {skip: int(int32)=0 # The number of records to skip from the first, default is 0., take: int(int32)=20 # The number of records to return, default is 20, maximum is 20.}
@returns(200) {searchTerm: str?, skip: int(int32), take: int(int32), totalResults: int(int32), searchResults: [map]?, searchTerms: [str]?, suggestedSearch: str?} # Success

@endpoint GET /api/Section/{sectionId}
@desc Returns a section by section id.
@required {sectionId: int(int32) # Section by id.}
@returns(200) {id: int(int32), title: str?, titleChain: str?, subSections: [map]?, parentSectionId: int(int32)?, parentSectionTitle: str?, chapterNumber: int(int32), chapterTitle: str?, partNumber: int(int32), partTitle: str?, contentHtml: str?, isUpdated: bool, updatedDate: str(date-time)?, footnotes: [map]?} # Success
@errors {400: Bad Request, 404: Not Found}

@endpoint GET /api/Section/{sectionId},{step}
@desc Returns a section overview by section id and step.
@required {sectionId: int(int32) # Section by id., step: int(int32) # Number of sections to step over from given section.}
@returns(200) {id: int(int32), title: str?, titleChain: str?, subSections: [map]?} # Success
@errors {400: Bad Request, 404: Not Found}

@end
