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/service-vendors

v2.4.1-alpha.2

Published

Vendors Service API

Downloads

168

Readme

version nextVersion downloads license dependency


Full documentation
install:
npm i @plasma-platform/service-vendors -S

Short documentation

Table of Contents

VendorsService

Vendors Micro Service API

Parameters

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

messages

Object with class service messages

Type: Object

getList

Get vendors list

Parameters

  • sortBy String sort by field (optional, default 'rating')
  • sortAsc Boolean ascending sorting (optional, default true)
  • page Number page number (optional, default 1)
  • nickname String search by nickname (optional, default '')

Examples

Get vendors list

(async () => {
  const Vendors = new VendorsService('//api.templatemonster.com/authors/v1/');
  const items = await Vendors.getList();
})();

Returns VendorsList array of posts

getListCount

Get vendors count

Examples

Get vendors list count

(async () => {
  const Vendors = new VendorsService('//api.templatemonster.com/authors/v1/');
  const count = await Vendors.getListCount();
})();

Returns number vendors count

getProfile

Get information about current vendor

Examples

Get vendor details

(async () => {
  const Vendors = new VendorsService('//api.templatemonster.com/authors/v1/');
  const details = await Vendors.getProfile();
})();

Returns Vendor vendor details

getProfileById

Get information about specific vendor by id

Parameters

Examples

Get vendor profile by id

(async () => {
  const Vendors = new VendorsService('//api.templatemonster.com/authors/v1/');
  const details = await Vendors.getProfileById(2);
})();

Returns Vendor vendor details

getProfileByNickname

Get information about specific vendor by nickname

Parameters

  • nickname string vendor nickname

Examples

Get vendor profile by nickname

(async () => {
  const Vendors = new VendorsService('//api.templatemonster.com/authors/v1/');
  const details = await Vendors.getProfileByNickname('nickname');
})();

Returns Vendor vendor details

getProfileByVendorId

Get information about specific vendor by vendor id

Parameters

Examples

Get vendor profile by vendor id

(async () => {
  const Vendors = new VendorsService('//api.templatemonster.com/authors/v1/');
  const details = await Vendors.getProfileByVendorId(831);
})();

Returns Vendor vendor details

Array

Vendors list object

Type: VendorsList

Properties

Vendor

Vendor object

Type: Vendor

Properties

  • id number vendor id
  • nickname string vendor nickname
  • country string author country (2 char code)
  • nickname string vendor nickname
  • cover string url to author cover image
  • avatar string url to author avatar image
  • rating number author total rating
  • designQualityIndex number Design Quality Index
  • supportQualityIndex number Support Quality Index (don't use it at the moment)
  • userReviewsRatings number User Reviews Rating
  • description string author description
  • user_id number author user ID (required)
  • exclusive_percent number revenue percent of exclusive sales per item
  • regular_percent number revenue percent of regular sales per item
  • is_trusted number 1 if trusted either 0
  • is_internal number 1 if is TM vendor and 0 if external vendor
  • socialAccounts object social accounts (additional field)
  • supportOptions object support options (additional field)
  • _links object HATEOAS links
  • products number products count
  • sales number sales count
  • created_at number creation timestamp
  • updated_at number update timestamp