We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dcc592 commit 11a18fcCopy full SHA for 11a18fc
www/content/docs/client.mdx
@@ -46,4 +46,18 @@ const article = await drupal.getResource(
46
47
### Pages Router
48
49
-TODO
+```ts
50
+import { NextDrupalPages } from "next-drupal"
51
+
52
+// Create a new DrupalClient.
53
+const drupal = new NextDrupalPages("https://example.com")
54
55
+// Fetch articles.
56
+const articles = await drupal.getResourceCollection("node--article")
57
58
+// Fetch one article by id.
59
+const article = await drupal.getResource(
60
+ "node--article",
61
+ "f4c61473-8297-4bf3-bab7-21c9633a7ca7"
62
+)
63
+```
0 commit comments