npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sentinel-api-js

v1.0.7

Published

JS library for building client websites that consume the sentinel platform API

Downloads

12

Readme

sentinel-js

JS library for building client websites that consume the sentinel platform API

Install the plugin

yarn add sentinel-api-js 

Import into your project

import Sentinel from 'sentinel-api-js'

Declare a new instance of Sentinel in your code

The parameter is the url of the data you wish the access.

const sentinel = new Sentinel('http://yourapp.sentinel-api.com')

The rest of these docs will be a reference to the above

Pages

Pages only have 2 endpoints - they all return promises.

getPages()

sentinel.page.getPages()

getPage()

sentinel.page.getPage(1)

Blog

The blog is able to get posts and retrieve the comments from them posts - again all return promises.

getPosts()

sentinel.blog.getPosts()

getPost()

sentinel.blog.getPost(1)

getPostComments()

sentinel.blog.getPostComments()

postComment()

The data needs to be structured liks so and will need to be signed in to do so:

{
  comment: {
    body: ''
  }
}
sentinel.blog.postComment(postId, data)

deleteComment()

To delete a comment you will need to be signed in as the user who made the comment.

sentinel.blog.deleteComment(postId, commentId)

editComment()

The data needs to be structured liks so and will need to be signed in to do so:

{
  comment: {
    body: ''
  }
}
sentinel.blog.editComment(postId, commentId, data)

In future Releases there will be these endpoints

GET    /api/v1/users/sign_in
POST   /api/v1/users/sign_in
DELETE /api/v1/users/sign_out 
GET    /api/v1/users/password/new 
GET    /api/v1/users/password/edit
PATCH  /api/v1/users/password
PUT    /api/v1/users/password
POST   /api/v1/users/password
GET    /api/v1/users/cancel 
GET    /api/v1/users/sign_up 
GET    /api/v1/users/edit 
PATCH  /api/v1/users
PUT    /api/v1/users
DELETE /api/v1/users
POST   /api/v1/users
GET    /api/v1/custom_data/tables/:table_name/records
POST   /api/v1/custom_data/tables/:table_name/records 
GET    /api/v1/custom_data/tables
POST   /api/v1/custom_data/tables
GET    /api/v1/custom_data/tables/new
GET    /api/v1/custom_data/tables/:name/edit 
GET    /api/v1/custom_data/tables/:name
PATCH  /api/v1/custom_data/tables/:name
PUT    /api/v1/custom_data/tables/:name
DELETE /api/v1/custom_data/tables/:name