@b10cks/client 1.2.0 → 1.2.2
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 +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @b10cks/client
|
|
2
2
|
|
|
3
|
-
Core API client for b10cks,
|
|
3
|
+
Core API client for [b10cks](https://www.b10cks.com), the open-source headless CMS with a composable block-based content API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -28,7 +28,10 @@ const blocks = await dataApi.getBlocks()
|
|
|
28
28
|
const contents = await dataApi.getContents({ vid: 'published', page: 1, per_page: 20 })
|
|
29
29
|
|
|
30
30
|
// Fetch all contents across all pages
|
|
31
|
-
const allContents = await dataApi.getContents(
|
|
31
|
+
const allContents = await dataApi.getContents(
|
|
32
|
+
{ vid: 'published', per_page: 100 },
|
|
33
|
+
{ allPages: true }
|
|
34
|
+
)
|
|
32
35
|
|
|
33
36
|
// Fetch a specific content entry
|
|
34
37
|
const content = await dataApi.getContent('home', { vid: 'draft' })
|