@financial-times/content-curation-client 6.1.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/_tsup-dts-rollup.d.cts +1395 -118
- package/dist/_tsup-dts-rollup.d.ts +1395 -118
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,6 +42,18 @@ const page = await client.page.getStructure(pageId);
|
|
|
42
42
|
console.log(page.properties.title);
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
### List pages by category
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
const pages = await client.page.listPages({ pageCategory: "topic" });
|
|
49
|
+
|
|
50
|
+
console.log(JSON.stringify(pages, null, 2));
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- Pass `pageCategory` (e.g. `"topic"`) to return only pages with an exact match.
|
|
54
|
+
- Pass `{ pageCategory: "page" }` to return pages explicitly categorised as page and legacy pages with no category set (treated as the default).
|
|
55
|
+
- To return all published pages regardless of category omit the options object, omit `pageCategory`, or pass an empty string.
|
|
56
|
+
|
|
45
57
|
### Update page structure
|
|
46
58
|
|
|
47
59
|
```typescript
|