Skip to content

Go 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.

Notifications You must be signed in to change notification settings

chompfoods/sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for swagger

Important An API key is required for access to this API. * Get a Food Data API key at https://chompthis.com/api. * Get a Recipe Data API key at https://chompthis.com/api/recipes. ### Getting Started * Subscribe to the Food Data API or the Recipe Data API. * Scroll down and click the "Authorize" button. * Enter your API key into the "value" input, click the "Authorize" button, then click the "Close" button. * Scroll down to the section titled "default" and click on the API endpoint you wish to use. * Click the "Try it out" button. * Enter the information the endpoint requires. * Click the "Execute" button. ### Example * Branded food response object: View example » * Ingredient response object: View example » * Recipe response object: View example » * Error response object: View example » ### How Do I Find My API Key? * Your API key was sent to the email address you used to create your subscription. * You will also find your API key in the Client Center. * Read this article for more information. ### I'm a Premium subscriber. How do I access the API? * All Premium subscribers must pass in a unique user ID for each user on their platform that is accessing data from the Chomp API. A user ID can be any string of letters and numbers that you assign to your user. Simply add "user_id" as a URL parameter when calling the API. You must add a "user_id" URL parameter to every call you make to ANY endpoint. * Example > ENDPOINT.php?api_key=API_KEY&code=CODE&user_id=USER_ID ### Helpful Links * Help & Support * Knowledge Base » * Support » * Client Center » * Pricing * Food Data API Subscription Options » * Recipe Data API Subscription Options » * Food Data API Cost Calculator » * Recipe Data API Cost Calculator » * Guidelines * Terms & License » * Attribution »

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0-oas3
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

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

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

About

Go 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.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published