@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Chomp Food Database API Documentation
@base https://chompthis.com/api/v2
@version 1.0.0-oas3
@auth ApiKey api_key in query
@endpoints 4
@toc food(4)

@endpoint GET /food/branded/barcode.php
@required {code: str}
@returns(200) {items: [map]}
@errors {400, 401, 404, 500}

@endpoint GET /food/branded/name.php
@required {name: str}
@optional {limit: int(1/2/3/4/5/6/7/8/9/10), page: int}
@returns(200) {items: [map]}
@errors {400, 401, 404, 500}

@endpoint GET /food/branded/search.php
@optional {allergen: str, brand: str, category: str, country: str, diet: str(Vegan/Vegetarian/Gluten Free), ingredient: str, keyword: str, mineral: str, nutrient: str, palm_oil: str, trace: str, vitamin: str, limit: int(1/2/3/4/5/6/7/8/9/10), page: int}
@returns(200) {items: [map]}
@errors {400, 401, 404, 500}

@endpoint GET /food/ingredient/search.php
@required {find: str}
@optional {limit: int(1/2/3)}
@returns(200) {items: [map]}
@errors {400, 401, 404, 500}

@end
