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

@plasma-platform/tm-service-reviews

v1.2.1

Published

Reviews service api

Downloads

7

Readme

Documentation

Table of Contents

ReviewsService

Reviews Micro Service API

Parameters

  • url string service url
  • token (string | null) user access token if available (optional, default null)

getReviews

Return review information for given identifiers.

Parameters

  • params {Object} Reviews parameters

Returns Object { "currentPageIndex":1, "totalCount":11, "lastPageIndex":6, "items": [ { "id":23, "status":4, "user_id":21543, "user_name":"mice mice", "title":"review title", "content":"review content", "score":5, "template_id":58444, "vote_up":0, "vote_down":0, "_links":{"self":{"href":"http://service-reviews.dev/api/v1/reviews/23"}} }, ...] }

getReviewsUser

Return review information for given identifiers. (user mode)

Parameters

  • params {Object} Reviews parameters

Returns Object { "currentPageIndex":1, "totalCount":11, "lastPageIndex":6, "items": [ { "id":23, "status":4, "user_id":21543, "user_name":"mice mice", "title":"review title", "content":"review content", "score":5, "template_id":58444, "vote_up":0, "vote_down":0, "_links":{"self":{"href":"http://service-reviews.dev/api/v1/reviews/23"}} }, ...] }

getReviewsVendor

Return vendors reviews for given identifiers.

Parameters

  • params {Object} Reviews parameters

Returns Object { "currentPageIndex":1, "totalCount":11, "lastPageIndex":6, "items": [ { "id":23, "status":4, "user_id":21543, "user_name":"mice mice", "title":"review title", "content":"review content", "score":5, "template_id":58444, "vote_up":0, "vote_down":0, "_links":{"self":{"href":"http://service-reviews.dev/api/v1/reviews/23"}} }, ...] }

approveReview

Return approve review information for given identifiers.

Parameters

  • token {String} Access token
  • id {Number} Review id

Returns Object { "canModerate": 1, "items": { "id": 1, "title": "Really good. Html is better than cms", "content": "I had font problem with flash cms. Now I have no problem with html", "score": 5, "created_at": 1469607948519, "user_id": 123, "template_id": 12345, "status": "initial", "vote_up": 1, "vote_down": 0, "_links": {"self":{"href":"http://service-reviews.dev/api/v1/reviews/1"}} } }

completeReview

Return complete review information for given identifiers.

Parameters

  • token {String} Access token
  • id {Number} Review id
  • params {Object} Reviews parameters

Returns Object { "canModerate": 1, "items": { "id": 1, "title": "Really good. Html is better than cms", "content": "I had font problem with flash cms. Now I have no problem with html", "score": 5, "created_at": 1469607948519, "user_id": 123, "template_id": 12345, "status": "initial", "vote_up": 1, "vote_down": 0, "_links": {"self":{"href":"http://service-reviews.dev/api/v1/reviews/1"}} } }

declineReview

Return decline review information for given identifiers.

Parameters

  • token {String} Access token
  • id {Number} Review id

Returns Object { "canModerate": 1, "items": { "id": 1, "title": "Really good. Html is better than cms", "content": "I had font problem with flash cms. Now I have no problem with html", "score": 5, "created_at": 1469607948519, "user_id": 123, "template_id": 12345, "status": "initial", "vote_up": 1, "vote_down": 0, "_links": {"self":{"href":"http://service-reviews.dev/api/v1/reviews/1"}} } }

addReviewVote

Return added votes for the review: increment vote_up or vote_down field.

Parameters

  • token {String} Access token
  • id {Number} Review id
  • params {Object} Reviews votes parameters

Returns Object { "canModerate": 1, "items": { "id": 1, "title": "Really good. Html is better than cms", "content": "I had font problem with flash cms. Now I have no problem with html", "score": 5, "created_at": 1469607948519, "user_id": 123, "template_id": 12345, "status": "initial", "vote_up": 1, "vote_down": 0, "_links": {"self":{"href":"http://service-reviews.dev/api/v1/reviews/1"}} } }

replayTheReview

Return reply of the review information for given identifiers.

Parameters

  • token {String} Access token
  • reviewId {Number} ID of the parent review
  • params {Object} Body parameters

Returns Object { "canModerate": 1, "items": { "id": 1, "review_id": 1, "content": "I had font problem with flash cms. Now I have no problem with html", "created_at": 1469607948519, "user_id": 123, "vote_up": 0, "vote_down": 0, "_links": {"self":{"href":"http://service-reviews.dev/api/v1/reviews/1/comment/1"}} } }

requestReviewComments

Return request review comments list.

Parameters

  • reviewId {Number} ID of the parent review

Returns Object { "canModerate": 1, "items": { "id": 1, "review_id": 1, "content": "I had font problem with flash cms. Now I have no problem with html", "created_at": 1469607948519, "user_id": 123, "vote_up": 0, "vote_down": 0, "_links": {"self":{"href":"http://service-reviews.dev/api/v1/reviews/1/comment/1"}} } }

voteComments

Return votes of the review.

Parameters

  • token {String} Access token
  • id {Number} ID of the comment
  • reviewId {Number} ID of the parent review

Returns Object { "canModerate": 1, "items": {

"id": 1, "review_id": 1, "content": "I had font problem with flash cms. Now I have no problem with html", "created_at": 1469607948519, "user_id": 123, "vote_up": 0, "vote_down": 0, "_links": {"self":{"href":"http://service-reviews.dev/api/v1/reviews/1/comment/1"}} } }

getComments

Return comments information for given identifiers.

Parameters

  • params {Object} Comments parameters

Returns Object { "currentPageIndex":1, "totalCount":11, "lastPageIndex":6, "items": [ { "id":23, "status":4, "user_id":21543, "user_name":"mice mice", "title":"comment title", "content":"comment content", "template_id":58444, "vote_up":0, "vote_down":0, "created_at": 1469607948519, "updated_at": 1469607948519, "author": "user", "_links":{"self":{"href":"http://service-reviews.dev/api/v1/reviews/23"}} }, ...] }

getCommentsUser

Return users comments information for given identifiers.

Parameters

  • params {Object} Comments parameters

Returns Object { "currentPageIndex":1, "totalCount":11, "lastPageIndex":6, "items": [ { "id":23, "status":4, "user_id":21543, "user_name":"mice mice", "title":"comment title", "content":"comment content", "template_id":58444, "vote_up":0, "vote_down":0, "created_at": 1469607948519, "updated_at": 1469607948519, "author": "user", "_links":{"self":{"href":"http://service-reviews.dev/api/v1/reviews/23"}} }, ...] }

addComment

Add new QA

Parameters

  • token {String} Access token
  • params {Object} Body parameters

Returns Object { "canModerate": 1, "items": { "id": 1, "status": "pending", "user_id": 12345, "user_name": "John Doe", "user_email": "jho***@gmail.com", "content": "I had font problem with flash cms. Now I have no problem with html", "template_id": 55555, "created_at": 1469607948519, "updated_at": 1469607948519, "vote_up": 0, "vote_down": 0, "locale": "en", "author": "moderator" "_links": {"self":{"href":"http://service-reviews.dev/api/v1/qas/1"}} }

addCommentVote

Return added votes for the comment: increment vote_up or vote_down field.

Parameters

  • token {String} Access token
  • id {Number} Comment id
  • params {Object} Comment votes parameters

Returns Object { "canModerate": 1, "items": { "id": 1, "status": "pending", "user_id": 12345, "user_name": "John Doe", "user_email": "jho***@gmail.com", "content": "I had font problem with flash cms. Now I have no problem with html", "template_id": 55555, "created_at": 1469607948519, "updated_at": 1469607948519, "vote_up": 0, "vote_down": 0, "locale": "en", "author": "moderator" "_links": {"self":{"href":"http://service-reviews.dev/api/v1/qas/1"}} } }

getReviewsMetadata

Get reviews metadata

Parameters

  • params {Object} parameters

Examples

* @returns {Object} <pre>{
"headers":
 {
   "totalCount": 1}
 }</pre>