/sdk-kotlin

Kotlin SDK for the Chomp Food & Recipe Database API. Use our API to get high-quality data on recipes and 875,000+ branded/grocery foods plus raw ingredients.

Primary LanguageKotlin

io.swagger.client - Kotlin client library for Chomp Food & Recipe Database API Documentation

Requires

  • Kotlin 1.1.2
  • Gradle 3.3

Build

First, create the gradle wrapper script:

gradle wrapper

Then, run:

./gradlew check assemble

This runs all tests and packages the library.

Features/Implementation Notes

  • Supports JSON inputs/outputs, File inputs, and Form inputs.
  • Supports collection formats for query parameters: csv, tsv, ssv, pipes.
  • Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in Swagger definitions.
  • Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets.

Documentation for API Endpoints

All URIs are relative to https://chompthis.com/api/v2

Class Method HTTP request Description
DefaultApi foodBrandedBarcodePhpGet GET /food/branded/barcode.php Get a branded food item using a barcode
DefaultApi foodBrandedNamePhpGet GET /food/branded/name.php Get a branded food item by name
DefaultApi foodBrandedSearchPhpGet GET /food/branded/search.php Get data for branded food items using various search parameters
DefaultApi foodIngredientSearchPhpGet GET /food/ingredient/search.php Get raw/generic food ingredient item(s)
DefaultApi recipeIdPhpGet GET /recipe/id.php Get a recipe by ID
DefaultApi recipeIngredientPhpGet GET /recipe/ingredient.php Get recipes using a list of ingredients
DefaultApi recipeRandomPhpGet GET /recipe/random.php Get random popular recipes
DefaultApi recipeSearchPhpGet GET /recipe/search.php Get recipes using a title and optional filters

Documentation for Models

Documentation for Authorization

ApiKeyAuth