jamments-front

2.0.0 • Public • Published

Jamments front

This library is to be used with Jamments comment API.

Jamments is a self hosted commenting API that puts you in control. It's a dead simple REST API that seamlessly integrates with your already existing JAMstack.

This is the frontend API library for Jamments' API. Its aim is to ease Jamments integration within your code. You should go to the documentation for more details.

Also note that this library uses the Fetch API and that it might not be available in older browsers. If you're willing to support older browsers, you can easily polyfill it.

Install with npm or yarn

npm install --save jamments-front

And then just import it as any ES module.

import Jamments from 'jamments-front';

Usage

Here's how you post a new comment

jamments.postComment(slug, comment, name, email, parentId)
.then(() => {
    // comment successfully submitted to the api
})
.catch((err) => {
    // Houston, we had a problem
});

Readme

Keywords

none

Package Sidebar

Install

npm i jamments-front

Weekly Downloads

0

Version

2.0.0

License

BSD-3-Clause

Unpacked Size

17 kB

Total Files

5

Last publish

Collaborators

  • buzut