|
| 1 | +# javascript-client |
| 2 | + |
| 3 | +## Requirements |
| 4 | + |
| 5 | +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. |
| 6 | + |
| 7 | +## Installation |
| 8 | + |
| 9 | +To install the API client library to your local Maven repository, simply execute: |
| 10 | + |
| 11 | +```shell |
| 12 | +mvn install |
| 13 | +``` |
| 14 | + |
| 15 | +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: |
| 16 | + |
| 17 | +```shell |
| 18 | +mvn deploy |
| 19 | +``` |
| 20 | + |
| 21 | +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. |
| 22 | + |
| 23 | +### Maven users |
| 24 | + |
| 25 | +Add this dependency to your project's POM: |
| 26 | + |
| 27 | +```xml |
| 28 | +<dependency> |
| 29 | + <groupId>com.spoonacular</groupId> |
| 30 | + <artifactId>javascript-client</artifactId> |
| 31 | + <version>1.0</version> |
| 32 | + <scope>compile</scope> |
| 33 | +</dependency> |
| 34 | +``` |
| 35 | + |
| 36 | +### Gradle users |
| 37 | + |
| 38 | +Add this dependency to your project's build file: |
| 39 | + |
| 40 | +```groovy |
| 41 | +compile "com.spoonacular:javascript-client:1.0" |
| 42 | +``` |
| 43 | + |
| 44 | +### Others |
| 45 | + |
| 46 | +At first generate the JAR by executing: |
| 47 | + |
| 48 | + mvn package |
| 49 | + |
| 50 | +Then manually install the following JARs: |
| 51 | + |
| 52 | +- target/javascript-client-1.0.jar |
| 53 | +- target/lib/*.jar |
| 54 | + |
| 55 | +## Getting Started |
| 56 | + |
| 57 | +Please follow the [installation](#installation) instruction and execute the following Java code: |
| 58 | + |
| 59 | +```java |
| 60 | + |
| 61 | +import com.spoonacular.DefaultApi; |
| 62 | + |
| 63 | +public class DefaultApiExample { |
| 64 | + |
| 65 | + public static void main(String[] args) { |
| 66 | + DefaultApi apiInstance = new DefaultApi(); |
| 67 | + String q = salmon with fusilli and no nuts; // String | The recipe search query. |
| 68 | + try { |
| 69 | + Object result = apiInstance.analyzeARecipeSearchQuery(q); |
| 70 | + System.out.println(result); |
| 71 | + } catch (ApiException e) { |
| 72 | + System.err.println("Exception when calling DefaultApi#analyzeARecipeSearchQuery"); |
| 73 | + e.printStackTrace(); |
| 74 | + } |
| 75 | + } |
| 76 | +} |
| 77 | + |
| 78 | +``` |
| 79 | + |
| 80 | +## Documentation for API Endpoints |
| 81 | + |
| 82 | +All URIs are relative to *https://api.spoonacular.com* |
| 83 | + |
| 84 | +Class | Method | HTTP request | Description |
| 85 | +------------ | ------------- | ------------- | ------------- |
| 86 | +*DefaultApi* | [**analyzeARecipeSearchQuery**](docs/DefaultApi.md#analyzeARecipeSearchQuery) | **GET** /recipes/queries/analyze | Analyze a Recipe Search Query |
| 87 | +*DefaultApi* | [**analyzeRecipeInstructions**](docs/DefaultApi.md#analyzeRecipeInstructions) | **POST** /recipes/analyzeInstructions | Analyze Recipe Instructions |
| 88 | +*DefaultApi* | [**autocompleteIngredientSearch**](docs/DefaultApi.md#autocompleteIngredientSearch) | **GET** /food/ingredients/autocomplete | Autocomplete Ingredient Search |
| 89 | +*DefaultApi* | [**autocompleteMenuItemSearch**](docs/DefaultApi.md#autocompleteMenuItemSearch) | **GET** /food/menuItems/suggest | Autocomplete Menu Item Search |
| 90 | +*DefaultApi* | [**autocompleteProductSearch**](docs/DefaultApi.md#autocompleteProductSearch) | **GET** /food/products/suggest | Autocomplete Product Search |
| 91 | +*DefaultApi* | [**autocompleteRecipeSearch**](docs/DefaultApi.md#autocompleteRecipeSearch) | **GET** /recipes/autocomplete | Autocomplete Recipe Search |
| 92 | +*DefaultApi* | [**classifyCuisine**](docs/DefaultApi.md#classifyCuisine) | **POST** /recipes/cuisine | Classify Cuisine |
| 93 | +*DefaultApi* | [**classifyGroceryProduct**](docs/DefaultApi.md#classifyGroceryProduct) | **POST** /food/products/classify | Classify Grocery Product |
| 94 | +*DefaultApi* | [**classifyGroceryProductBulk**](docs/DefaultApi.md#classifyGroceryProductBulk) | **POST** /food/products/classifyBatch | Classify Grocery Product Bulk |
| 95 | +*DefaultApi* | [**convertAmounts**](docs/DefaultApi.md#convertAmounts) | **GET** /recipes/convert | Convert Amounts |
| 96 | +*DefaultApi* | [**createRecipeCard**](docs/DefaultApi.md#createRecipeCard) | **POST** /recipes/visualizeRecipe | Create Recipe Card |
| 97 | +*DefaultApi* | [**detectFoodInText**](docs/DefaultApi.md#detectFoodInText) | **POST** /food/detect | Detect Food in Text |
| 98 | +*DefaultApi* | [**extractRecipeFromWebsite**](docs/DefaultApi.md#extractRecipeFromWebsite) | **GET** /recipes/extract | Extract Recipe from Website |
| 99 | +*DefaultApi* | [**generateMealPlan**](docs/DefaultApi.md#generateMealPlan) | **GET** /recipes/mealplans/generate | Generate Meal Plan |
| 100 | +*DefaultApi* | [**getARandomFoodJoke**](docs/DefaultApi.md#getARandomFoodJoke) | **GET** /food/jokes/random | Get a Random Food Joke |
| 101 | +*DefaultApi* | [**getAnalyzedRecipeInstructions**](docs/DefaultApi.md#getAnalyzedRecipeInstructions) | **GET** /recipes/{id}/analyzedInstructions | Get Analyzed Recipe Instructions |
| 102 | +*DefaultApi* | [**getComparableProducts**](docs/DefaultApi.md#getComparableProducts) | **GET** /food/products/upc/{upc}/comparable | Get Comparable Products |
| 103 | +*DefaultApi* | [**getConversationSuggests**](docs/DefaultApi.md#getConversationSuggests) | **GET** /food/converse/suggest | Get Conversation Suggests |
| 104 | +*DefaultApi* | [**getDishPairingForWine**](docs/DefaultApi.md#getDishPairingForWine) | **GET** /food/wine/dishes | Get Dish Pairing for Wine |
| 105 | +*DefaultApi* | [**getFoodInformation**](docs/DefaultApi.md#getFoodInformation) | **GET** /food/ingredients/{id}/information | Get Food Information |
| 106 | +*DefaultApi* | [**getIngredientSubstitutes**](docs/DefaultApi.md#getIngredientSubstitutes) | **GET** /food/ingredients/substitutes | Get Ingredient Substitutes |
| 107 | +*DefaultApi* | [**getIngredientSubstitutesByID**](docs/DefaultApi.md#getIngredientSubstitutesByID) | **GET** /food/ingredients/{id}/substitutes | Get Ingredient Substitutes by ID |
| 108 | +*DefaultApi* | [**getMenuItemInformation**](docs/DefaultApi.md#getMenuItemInformation) | **GET** /food/menuItems/{id} | Get Menu Item Information |
| 109 | +*DefaultApi* | [**getProductInformation**](docs/DefaultApi.md#getProductInformation) | **GET** /food/products/{id} | Get Product Information |
| 110 | +*DefaultApi* | [**getRandomFoodTrivia**](docs/DefaultApi.md#getRandomFoodTrivia) | **GET** /food/trivia/random | Get Random Food Trivia |
| 111 | +*DefaultApi* | [**getRandomRecipes**](docs/DefaultApi.md#getRandomRecipes) | **GET** /recipes/random | Get Random Recipes |
| 112 | +*DefaultApi* | [**getRecipeEquipmentByID**](docs/DefaultApi.md#getRecipeEquipmentByID) | **GET** /recipes/{id}/equipmentWidget.json | Get Recipe Equipment by ID |
| 113 | +*DefaultApi* | [**getRecipeInformation**](docs/DefaultApi.md#getRecipeInformation) | **GET** /recipes/{id}/information | Get Recipe Information |
| 114 | +*DefaultApi* | [**getRecipeInformationBulk**](docs/DefaultApi.md#getRecipeInformationBulk) | **GET** /recipes/informationBulk | Get Recipe Information Bulk |
| 115 | +*DefaultApi* | [**getRecipeIngredientsByID**](docs/DefaultApi.md#getRecipeIngredientsByID) | **GET** /recipes/{id}/ingredientWidget.json | Get Recipe Ingredients by ID |
| 116 | +*DefaultApi* | [**getRecipeNutritionByID**](docs/DefaultApi.md#getRecipeNutritionByID) | **GET** /recipes/{id}/nutritionWidget.json | Get Recipe Nutrition by ID |
| 117 | +*DefaultApi* | [**getRecipePriceBreakdownByID**](docs/DefaultApi.md#getRecipePriceBreakdownByID) | **GET** /recipes/{id}/priceBreakdownWidget.json | Get Recipe Price Breakdown by ID |
| 118 | +*DefaultApi* | [**getSimilarRecipes**](docs/DefaultApi.md#getSimilarRecipes) | **GET** /recipes/{id}/similar | Get Similar Recipes |
| 119 | +*DefaultApi* | [**getWineDescription**](docs/DefaultApi.md#getWineDescription) | **GET** /food/wine/description | Get Wine Description |
| 120 | +*DefaultApi* | [**getWinePairing**](docs/DefaultApi.md#getWinePairing) | **GET** /food/wine/pairing | Get Wine Pairing |
| 121 | +*DefaultApi* | [**getWineRecommendation**](docs/DefaultApi.md#getWineRecommendation) | **GET** /food/wine/recommendation | Get Wine Recommendation |
| 122 | +*DefaultApi* | [**guessNutritionByDishName**](docs/DefaultApi.md#guessNutritionByDishName) | **GET** /recipes/guessNutrition | Guess Nutrition by Dish Name |
| 123 | +*DefaultApi* | [**mapIngredientsToGroceryProducts**](docs/DefaultApi.md#mapIngredientsToGroceryProducts) | **POST** /food/ingredients/map | Map Ingredients to Grocery Products |
| 124 | +*DefaultApi* | [**parseIngredients**](docs/DefaultApi.md#parseIngredients) | **POST** /recipes/parseIngredients | Parse Ingredients |
| 125 | +*DefaultApi* | [**quickAnswer**](docs/DefaultApi.md#quickAnswer) | **GET** /recipes/quickAnswer | Quick Answer |
| 126 | +*DefaultApi* | [**searchFoodVideos**](docs/DefaultApi.md#searchFoodVideos) | **GET** /food/videos/search | Search Food Videos |
| 127 | +*DefaultApi* | [**searchGroceryProducts**](docs/DefaultApi.md#searchGroceryProducts) | **GET** /food/products/search | Search Grocery Products |
| 128 | +*DefaultApi* | [**searchGroceryProductsByUPC**](docs/DefaultApi.md#searchGroceryProductsByUPC) | **GET** /food/products/upc/{upc} | Search Grocery Products by UPC |
| 129 | +*DefaultApi* | [**searchMenuItems**](docs/DefaultApi.md#searchMenuItems) | **GET** /food/menuItems/search | Search Menu Items |
| 130 | +*DefaultApi* | [**searchRecipes**](docs/DefaultApi.md#searchRecipes) | **GET** /recipes/search | Search Recipes |
| 131 | +*DefaultApi* | [**searchRecipesByIngredients**](docs/DefaultApi.md#searchRecipesByIngredients) | **GET** /recipes/findByIngredients | Search Recipes by Ingredients |
| 132 | +*DefaultApi* | [**searchRecipesByNutrients**](docs/DefaultApi.md#searchRecipesByNutrients) | **GET** /recipes/findByNutrients | Search Recipes by Nutrients |
| 133 | +*DefaultApi* | [**searchRecipesComplex**](docs/DefaultApi.md#searchRecipesComplex) | **GET** /recipes/complexSearch | Search Recipes Complex |
| 134 | +*DefaultApi* | [**searchSiteContent**](docs/DefaultApi.md#searchSiteContent) | **GET** /food/site/search | Search Site Content |
| 135 | +*DefaultApi* | [**summarizeRecipe**](docs/DefaultApi.md#summarizeRecipe) | **GET** /recipes/{id}/summary | Summarize Recipe |
| 136 | +*DefaultApi* | [**talkToChatbot**](docs/DefaultApi.md#talkToChatbot) | **GET** /food/converse | Talk to Chatbot |
| 137 | +*DefaultApi* | [**visualizeEquipment**](docs/DefaultApi.md#visualizeEquipment) | **POST** /recipes/visualizeEquipment | Visualize Equipment |
| 138 | +*DefaultApi* | [**visualizeIngredients**](docs/DefaultApi.md#visualizeIngredients) | **POST** /recipes/visualizeIngredients | Visualize Ingredients |
| 139 | +*DefaultApi* | [**visualizeMenuItemNutritionByID**](docs/DefaultApi.md#visualizeMenuItemNutritionByID) | **GET** /food/menuItems/{id}/nutritionWidget | Visualize Menu Item Nutrition by ID |
| 140 | +*DefaultApi* | [**visualizePriceBreakdown**](docs/DefaultApi.md#visualizePriceBreakdown) | **POST** /recipes/visualizePriceEstimator | Visualize Price Breakdown |
| 141 | +*DefaultApi* | [**visualizeProductNutritionByID**](docs/DefaultApi.md#visualizeProductNutritionByID) | **GET** /food/products/{id}/nutritionWidget | Visualize Product Nutrition by ID |
| 142 | +*DefaultApi* | [**visualizeRecipeEquipmentByID**](docs/DefaultApi.md#visualizeRecipeEquipmentByID) | **GET** /recipes/{id}/equipmentWidget | Visualize Recipe Equipment by ID |
| 143 | +*DefaultApi* | [**visualizeRecipeIngredientsByID**](docs/DefaultApi.md#visualizeRecipeIngredientsByID) | **GET** /recipes/{id}/ingredientWidget | Visualize Recipe Ingredients by ID |
| 144 | +*DefaultApi* | [**visualizeRecipeNutrition**](docs/DefaultApi.md#visualizeRecipeNutrition) | **POST** /recipes/visualizeNutrition | Visualize Recipe Nutrition |
| 145 | +*DefaultApi* | [**visualizeRecipeNutritionByID**](docs/DefaultApi.md#visualizeRecipeNutritionByID) | **GET** /recipes/{id}/nutritionWidget | Visualize Recipe Nutrition by ID |
| 146 | +*DefaultApi* | [**visualizeRecipePriceBreakdownByID**](docs/DefaultApi.md#visualizeRecipePriceBreakdownByID) | **GET** /recipes/{id}/priceBreakdownWidget | Visualize Recipe Price Breakdown by ID |
| 147 | + |
| 148 | + |
| 149 | +## Documentation for Models |
| 150 | + |
| 151 | + - [InlineObject](docs/InlineObject.md) |
| 152 | + - [InlineObject1](docs/InlineObject1.md) |
| 153 | + - [InlineObject2](docs/InlineObject2.md) |
| 154 | + - [InlineObject3](docs/InlineObject3.md) |
| 155 | + - [InlineObject4](docs/InlineObject4.md) |
| 156 | + - [InlineObject5](docs/InlineObject5.md) |
| 157 | + - [InlineObject6](docs/InlineObject6.md) |
| 158 | + - [InlineObject7](docs/InlineObject7.md) |
| 159 | + - [InlineObject8](docs/InlineObject8.md) |
| 160 | + - [InlineObject9](docs/InlineObject9.md) |
| 161 | + |
| 162 | + |
| 163 | +## Documentation for Authorization |
| 164 | + |
| 165 | +Authentication schemes defined for the API: |
| 166 | +### apiKeyScheme |
| 167 | + |
| 168 | +- **Type**: API key |
| 169 | + |
| 170 | +- **API key parameter name**: api_key |
| 171 | +- **Location**: URL query string |
| 172 | + |
| 173 | + |
| 174 | +## Recommendation |
| 175 | + |
| 176 | +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. |
| 177 | + |
| 178 | +## Author |
| 179 | + |
| 180 | + |
| 181 | + |
0 commit comments