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

minsh-api-client

v1.0.1

Published

Minsh API client for Node.js

Downloads

9

Readme

Minsh API client for Node.js

Install

$ npm install minsh-api-client --save

or

$ yarn add minsh-api-client

Usage

const Minsh = require('minsh-api-client');

/* create a new minsh object: first parameter is the `appName` and second one is the datacenter`, which can be either 'us' | 'eu' | 'asia' | 'seoul' */

var M = new Minsh('appName', 'us');

/* login, shout and logout */

(async function() {
  let err, bob, data;

  [err, bob] = await M.login({username: 'bob', password: 'spongebob'});
  if (err) { throw err; }

  [err, data] = await M.createShout({token: bob.token, shout: 'hello world!'});
  if (err) { throw err; }

  [err, data] = await M.logout({token: bob.token});
  if (err) { throw err; }
}());

bob is now an object containing the user details:

{ id: '5b7e95c0612d5769f6604742',
  username: 'bob',
  profile_image: 'http://www.gravatar.com/avatar/137691fa40af540ea7f19d4a297fd4ce?d=https%3A%2F%2Fmedia-us.min.sh%2Fdefault_profile_230.png',
  online: true,
  last_activity: '2018-08-23T11:08:48.504Z',
  geo: [ 77.5833, 12.9833 ],
  location: 'Bengaluru Karnataka India',
  email: '[email protected]',
  pn_shout: true,
  pn_event: true,
  pn_sponsor: true,
  pn_like: true,
  pn_mention: true,
  mailing_dm: true,
  mailing_mention: true,
  mailing_event: true,
  mailing_important: true,
  blocked_users: [],
  email_verified: false,
  pending: true,
  shout_read_receipts: [],
  default_profile_image: true,
  token: '0242fe69-79e5-4109-82e2-ff9a8292210b'
 }