GroceriStar Fetch Module

GroceriStar Fetch Module

  • Summary
  • GitHub
  • Help

›

  • 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

Getting Started

Groceristar-fetch module

Synopsis

Food Tech related static data in json arrays, like recipes, ingredients, recipes, diets, allergies, etc.

Code Example

const { groceristar } = require('@groceristar/groceristar-fetch')
const departments = groceristar.getDepartments();

// returns an array of all departments

example
[
  {
    "name": "Fresh vegetables",
    "type": "food"
  },
  {
    "name": "Condiments / sauces",
    "type": "food"
  }
]

Motivation

In a few our projects we have a similar files. And we always copy-paste code between them. So by moving this code into separated place - i hope we'll make our projects better.

Installation

Provide code examples and explanations of how to get the project.

npm install @groceristar/static-fetch or yarn add @groceristar/static-fetch

Usage

const { groceristar, search } = require('@groceristar/groceristar-fetch');
console.log(groceristar.getDepartments());
console.log(search.getAttribute('diets'));

//or
 
import { groceristar, mealCalendar } from '@groceristar/groceristar-fetch'

Tests

npm test

Contributors

Let people know how they can dive into the project, include important links to things like issue trackers, irc, twitter accounts if applicable.

ChickenKyiv project →
GroceriStar Fetch Module
Docs
Getting StartedGroceriStar sectionChickenKyiv sectionMeal Calendar sectionSearch API sectionSearch Form section
More
BlogGitHubStar
Copyright © 2019 GroceriStar company