example-data.com

ingredients

ingredients

Page 4 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": 73,
      "name": "Ricotta Cheese",
      "slug": "ricotta-cheese-73",
      "foodCategoryId": null,
      "unit": "g",
      "defaultPricePerUnit": 22.78,
      "currency": "USD"
    },
    {
      "id": 74,
      "name": "Mozzarella Cheese",
      "slug": "mozzarella-cheese-74",
      "foodCategoryId": null,
      "unit": "g",
      "defaultPricePerUnit": 5.97,
      "currency": "USD"
    },
    {
      "id": 75,
      "name": "Parmesan Cheese",
      "slug": "parmesan-cheese-75",
      "foodCategoryId": 2,
      "unit": "g",
      "defaultPricePerUnit": 8.56,
      "currency": "USD"
    }
  ],
  "meta": {
    "page": 4,
    "limit": 24,
    "total": 200,
    "totalPages": 9
  },
  "links": {
    "self": "/api/v1/ingredients?page=4",
    "next": "/api/v1/ingredients?page=5",
    "prev": "/api/v1/ingredients?page=3"
  }
}
Draftbit