Breadcrumbs

Getting the breadcrumbs for the current page:

GET /events/event-1/@breadcrumbs HTTP/1.1
Accept: application/json

Or use the client directly:

import { Client } from '@robgietema/nick';

const cli = Client.initialize({ apiPath: 'http://localhost:8080' });

const { data } = await cli.getBreadcrumbs({ path: '/events/event-1' });

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@id": "http://localhost:8080/events/event-1/@breadcrumbs",
  "items": [
    {
      "@id": "http://localhost:8080/events",
      "title": "Events"
    },
    {
      "@id": "http://localhost:8080/events/event-1",
      "title": "Event 1"
    }
  ],
  "root": "/"
}