GroceriStar Fetch Module

GroceriStar Fetch Module

  • Summary
  • GitHub
  • Help

›SearchAPI project

  • Getting Started

Chicken Kyiv

  • ChickenKyiv project

GroceriStar project

  • GroceriStar project

Meal Calendar project

  • Meal Calendar project

SearchAPI project

  • SearchAPI project

Search Form project

  • Search Form project

GraphQL

  • GraphQL

Selector

  • Selector

Stretch Goals

  • Stretch Goals

  • Test

SearchAPI project

Search API repository: https://github.com/ChickenKyiv/recipe-search-api


Importing Search module

const { search } = require('@groceristar/groceristar-fetch');
// or 
import { search } from '@groceristar/groceristar-fetch';

Get an array of Allergies

var allergies = search.getAttribute('allergies');

Return

[
  "Gluten-Free",
  "Peanut-Free",
  "Seafood-Free"
]

Get an array of Courses

var courses = search.getAttribute('courses');

Return

[
  "Main Dishes",
  "Desserts",
  "Side Dishes",
  "Appetizers"
]

Get an array of Cuisines

var cuisines = search.getAttribute('cuisines');

Get an array of Diets

var diets = search.getAttribute('diets');

Return

[
  "Lacto vegetarian",
  "Ovo vegetarian",
  "Pescetarian"
]

Get an array of Holidays

var holidays = search.getAttribute('holidays');

Get an array of Ingredients (Search part)

var ingredients1 = search.getIngredients1();

Get an array of Ingredients (Search part)

var ingredients2 = search.getIngredients2();

Get an array of Measurements

var measurements = search.getMeasurements();

// returns array of measurements object containing singular, plural and abbreviation

Return

{
    "singular": "gram",
    "plural": "grams",
    "abbreviation": "g"
}
← Meal Calendar projectSearch Form project →
GroceriStar Fetch Module
Docs
Getting StartedGroceriStar sectionChickenKyiv sectionMeal Calendar sectionSearch API sectionSearch Form section
More
BlogGitHubStar
Copyright © 2019 GroceriStar company