3.0.0-alpha.4 • Published 4 years ago
@becomes/cms-client v3.0.0-alpha.4
Becomes CMS client library
This library was written to enable easy connectivity with Becomes CMS.
How to use
- Install package from NPM:
npm i --save @becomes/cms-client - Create new Client instance and make a request to CMS:
// Import Client class.
import { BCMSClient } from '@becomes/cms-client';
async function main() {
// Create new instance of a Client.
const client = BCMSClient({
cmsOrigin: process.env.API_ORIGIN,
key: {
id: process.env.API_KEY,
secret: process.env.API_SECRET,
},
});
// Get all Entries in specified Template.
const query = await client.entry.getAll('__TEMPLATE_ID__');
// Print query result
console.log(query);
}API
Get Template
const query = await client.template.get('__TEMPLATE_ID__');Get Entry
const query = await client.entry.get({
templateId: '__TEMPLATE_ID__',
entryId: '__ENTRY_ID__',
});Get all Entries
const query = await client.entry.getAll('__TEMPLATE_ID__');Get all Media
const query = await client.media.getAll();Get Media
const query = await client.media.get('__MEDIA_ID__');Get Media binary data
const query = await client.media.get('__MEDIA_ID__');
const bin = await query.bin();3.4.0
2 years ago
3.4.1
2 years ago
3.3.6
2 years ago
3.3.5
3 years ago
3.3.4
3 years ago
3.3.3
3 years ago
3.3.1
3 years ago
3.3.2
3 years ago
3.1.3
4 years ago
3.3.0
4 years ago
3.2.0
4 years ago
3.1.5
4 years ago
3.1.4
4 years ago
3.1.2
4 years ago
3.0.0-alpha.3
4 years ago
3.0.0-alpha.4
4 years ago
3.1.1
4 years ago
3.1.0
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
3.0.0-alpha.2
4 years ago
3.0.0-alpha.1
4 years ago
2.0.7
4 years ago
3.0.0-alpha1
4 years ago
3.0.0-alpha2
4 years ago
2.0.6
4 years ago
2.0.5
5 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
