Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

contential

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contential

JavaScript client for Contential.

  • 0.0.9
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

  • A Contential account
  • Created a space
  • Created an API key
  • Node.js 8 or above

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.

FAQs

Package last updated on 22 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc