example-data.com

ingredients

ingredients

Page 8 of 9.

curl -sS \
  "https://example-data.com/api/v1/ingredients?limit=25"
const res = await fetch(
  "https://example-data.com/api/v1/ingredients?limit=25"
);
const { data, meta } = await res.json();
import type { Ingredient, ListEnvelope } from "https://example-data.com/types/ingredients.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/ingredients?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Ingredient>;
import requests

res = requests.get(
    "https://example-data.com/api/v1/ingredients",
    params={"limit": 25},
)
data = res.json()
{
  "data": [
    {
      "id": 169,
      "name": "Paprika",
      "slug": "paprika-169",
      "foodCategoryId": 23,
      "unit": "g",
      "defaultPricePerUnit": 22.89,
      "currency": "USD"
    },
    {
      "id": 170,
      "name": "Smoked Paprika",
      "slug": "smoked-paprika-170",
      "foodCategoryId": 6,
      "unit": "g",
      "defaultPricePerUnit": 12.17,
      "currency": "USD"
    },
    {
      "id": 171,
      "name": "Cinnamon",
      "slug": "cinnamon-171",
      "foodCategoryId": 24,
      "unit": "g",
      "defaultPricePerUnit": 21.97,
      "currency": "USD"
    }
  ],
  "meta": {
    "page": 8,
    "limit": 24,
    "total": 200,
    "totalPages": 9
  },
  "links": {
    "self": "/api/v1/ingredients?page=8",
    "next": "/api/v1/ingredients?page=9",
    "prev": "/api/v1/ingredients?page=7"
  }
}
Draftbit