0.0.52 • Published 9 months ago

contential v0.0.52

Weekly downloads
6
License
-
Repository
-
Last release
9 months ago

Contential - JavaScript SDK

JavaScript SDK for Contential content and GraphQL APIs. It helps you to easily access your data stored in Contential with your JavaScript applications.

Core features

  • Create, retrieve, update and remove records
  • Create, retrieve, update and remove lists
  • Subscribe to records and lists
  • Search lists
  • Make GraphQL queries on lists
  • Works in the browser and in Node.js

Requirements

Installation

npm install contential

Contential client

Use the createClient method to create an authenticated client that connects to your data.

const { createClient } = require('contential');
const contential = createClient({
  apiKey: 'e347fea300b50578870fda807ec455',
});

The Contential APIs use API keys to authenticate requests. You can view and manage your API keys in the Contential Dashboard.

Creating your first record

PropertyTypeExampleRequiredDescription
regionIdStringustrueRegion of where the data will be stored.
spaceIdString4dcb2eaf1dtrueID of space of where the data will be stored.
recordIdStringmy-recordtrueThe ID for your record.
localeIdStringen-USfalseLocale for your data to allow for translations.
dataString | ObjectMy record datatrueThe data for the record. Can be a string or an object.
const { createClient } = require('contential');
const contential = createClient({
  apiKey: 'e347fea300b50578870fda807ec455',
});

contential.record
  .add({
    regionId: 'us',
    spaceId: '4dcb2eaf1d',
    recordId: 'my-record',
    localeId: 'en-US',
    data: { 'message":"Contential is amazing!' },
  })
  .then(result => console.log(result))
  .catch(error => console.log(error));

Documentation

For more details on getting started with Contential, visit the Contential Docs

Get involved

We appreciate any help you can give to improve Contential.

PRs are welcome!

Licencse

This repository is published under the MIT license.

0.0.40

10 months ago

0.0.41

10 months ago

0.0.42

10 months ago

0.0.43

10 months ago

0.0.44

10 months ago

0.0.45

10 months ago

0.0.46

10 months ago

0.0.47

10 months ago

0.0.37

10 months ago

0.0.38

10 months ago

0.0.39

10 months ago

0.0.2-test

10 months ago

0.0.30

10 months ago

0.0.31

10 months ago

0.0.32

10 months ago

0.0.1-test

10 months ago

0.0.33

10 months ago

0.0.34

10 months ago

0.0.35

10 months ago

0.0.36

10 months ago

0.0.0-test

10 months ago

0.0.26

10 months ago

0.0.27

10 months ago

0.0.28

10 months ago

0.0.29

10 months ago

0.0.21

10 months ago

0.0.23

10 months ago

0.0.24

10 months ago

0.0.25

10 months ago

0.0.3-test

10 months ago

0.0.15

10 months ago

0.0.17

10 months ago

0.0.18

10 months ago

0.0.19

10 months ago

0.0.51

10 months ago

0.0.52

9 months ago

0.0.11

10 months ago

0.0.12

10 months ago

0.0.13

10 months ago

0.0.14

10 months ago

0.0.50

10 months ago

0.0.48

10 months ago

0.0.49

10 months ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0-beta

4 years ago