diff --git a/www/content/docs/client.mdx b/www/content/docs/client.mdx index a286d01d..e6f4b637 100644 --- a/www/content/docs/client.mdx +++ b/www/content/docs/client.mdx @@ -46,4 +46,18 @@ const article = await drupal.getResource( ### Pages Router -TODO +```ts +import { NextDrupalPages } from "next-drupal" + +// Create a new DrupalClient. +const drupal = new NextDrupalPages("https://example.com") + +// Fetch articles. +const articles = await drupal.getResourceCollection("node--article") + +// Fetch one article by id. +const article = await drupal.getResource( + "node--article", + "f4c61473-8297-4bf3-bab7-21c9633a7ca7" +) +```