All URIs are relative to https://api.spoonacular.com
Method | HTTP request | Description |
---|---|---|
GetDishPairingForWine | Get /food/wine/dishes | Dish Pairing for Wine |
GetWineDescription | Get /food/wine/description | Wine Description |
GetWinePairing | Get /food/wine/pairing | Wine Pairing |
GetWineRecommendation | Get /food/wine/recommendation | Wine Recommendation |
GetDishPairingForWine200Response GetDishPairingForWine(ctx).Wine(wine).Execute()
Dish Pairing for Wine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/ddsky/spoonacular-api-clients/go"
)
func main() {
wine := "malbec" // string | The type of wine that should be paired, e.g. \"merlot\", \"riesling\", or \"malbec\".
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WineAPI.GetDishPairingForWine(context.Background()).Wine(wine).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WineAPI.GetDishPairingForWine``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDishPairingForWine`: GetDishPairingForWine200Response
fmt.Fprintf(os.Stdout, "Response from `WineAPI.GetDishPairingForWine`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetDishPairingForWineRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
wine | string | The type of wine that should be paired, e.g. "merlot", "riesling", or "malbec". |
GetDishPairingForWine200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetWineDescription200Response GetWineDescription(ctx).Wine(wine).Execute()
Wine Description
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/ddsky/spoonacular-api-clients/go"
)
func main() {
wine := "merlot" // string | The name of the wine that should be paired, e.g. \"merlot\", \"riesling\", or \"malbec\".
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WineAPI.GetWineDescription(context.Background()).Wine(wine).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WineAPI.GetWineDescription``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWineDescription`: GetWineDescription200Response
fmt.Fprintf(os.Stdout, "Response from `WineAPI.GetWineDescription`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetWineDescriptionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
wine | string | The name of the wine that should be paired, e.g. "merlot", "riesling", or "malbec". |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetWinePairing200Response GetWinePairing(ctx).Food(food).MaxPrice(maxPrice).Execute()
Wine Pairing
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/ddsky/spoonacular-api-clients/go"
)
func main() {
food := "steak" // string | The food to get a pairing for. This can be a dish (\"steak\"), an ingredient (\"salmon\"), or a cuisine (\"italian\").
maxPrice := float32(50) // float32 | The maximum price for the specific wine recommendation in USD. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WineAPI.GetWinePairing(context.Background()).Food(food).MaxPrice(maxPrice).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WineAPI.GetWinePairing``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWinePairing`: GetWinePairing200Response
fmt.Fprintf(os.Stdout, "Response from `WineAPI.GetWinePairing`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetWinePairingRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
food | string | The food to get a pairing for. This can be a dish ("steak"), an ingredient ("salmon"), or a cuisine ("italian"). | |
maxPrice | float32 | The maximum price for the specific wine recommendation in USD. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetWineRecommendation200Response GetWineRecommendation(ctx).Wine(wine).MaxPrice(maxPrice).MinRating(minRating).Number(number).Execute()
Wine Recommendation
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/ddsky/spoonacular-api-clients/go"
)
func main() {
wine := "merlot" // string | The type of wine to get a specific product recommendation for.
maxPrice := float32(50) // float32 | The maximum price for the specific wine recommendation in USD. (optional)
minRating := float32(0.7) // float32 | The minimum rating of the recommended wine between 0 and 1. For example, 0.8 equals 4 out of 5 stars. (optional)
number := float32(3) // float32 | The number of wine recommendations expected (between 1 and 100). (optional) (default to 10)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WineAPI.GetWineRecommendation(context.Background()).Wine(wine).MaxPrice(maxPrice).MinRating(minRating).Number(number).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WineAPI.GetWineRecommendation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWineRecommendation`: GetWineRecommendation200Response
fmt.Fprintf(os.Stdout, "Response from `WineAPI.GetWineRecommendation`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetWineRecommendationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
wine | string | The type of wine to get a specific product recommendation for. | |
maxPrice | float32 | The maximum price for the specific wine recommendation in USD. | |
minRating | float32 | The minimum rating of the recommended wine between 0 and 1. For example, 0.8 equals 4 out of 5 stars. | |
number | float32 | The number of wine recommendations expected (between 1 and 100). | [default to 10] |
GetWineRecommendation200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]