(Ingredients)
The ingredients endpoints.
- ListIngredients - Get a list of ingredients.
Get a list of ingredients, if authenticated this will include stock levels and product codes otherwise it will only include public information.
package main
import(
"context"
"log"
templatespeakeasybar "github.com/speakeasy-sdks/template-speakeasy-bar"
"github.com/speakeasy-sdks/template-speakeasy-bar/pkg/models/shared"
)
func main() {
s := templatespeakeasybar.New(
templatespeakeasybar.WithSecurity(""),
)
ingredients := []string{
"string",
}
ctx := context.Background()
res, err := s.Ingredients.ListIngredients(ctx, ingredients)
if err != nil {
log.Fatal(err)
}
if res.Ingredients != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
ingredients |
[]string | ➖ | A list of ingredients to filter by. If not provided all ingredients will be returned. |