Skip to content

Latest commit

 

History

History
executable file
·
61 lines (41 loc) · 2.41 KB

File metadata and controls

executable file
·
61 lines (41 loc) · 2.41 KB

Ingredients

(Ingredients)

Overview

The ingredients endpoints.

Available Operations

ListIngredients

Get a list of ingredients, if authenticated this will include stock levels and product codes otherwise it will only include public information.

Example Usage

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
    }
}

Parameters

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.

Response

*operations.ListIngredientsResponse, error