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

myprowl

v0.1.1

Published

Prowl API Library for node

Downloads

7

Readme

myprowl -- Prowl API Library for node

Description

Wrapper for Prowl's third-party API in version 2011-01-30

  • add
  • verify
  • create API keys

More info and API/Provider Key registration: https://www.prowlapp.com/

Install

It`s simple

Add a notification with the required parameters.

var prowl = require('myprowl');
prowl.keys.setApikey("API-KEY");
prowl.add.simple("myApp","TestEvent","myDescription", function(error,response){
	if(!error){
		console.log("OK, remaining: "+response.success.remaining+
					" , resetdate: "+response.success.resetdate);
	}else{
		console.log(error);
	}
});

Take Control

Add a notification with optional parameters.

var prowl = require('myprowl');
prowl.keys.setApikey("API-KEY");
prowl.add.complex({
		priority: 1,
		url: "http://nodejs.org",
		application: "TestApp",
		event: "TestEvent",
		description: "TestDescription"
	}, 
	function(error,response){
	if(!error){
		console.log("OK, remaining: "+response.success.remaining+
					" , resetdate: "+response.success.resetdate);
	}else{
		console.log(error);
	}
});

Verify API keys

Verify an API key that is provided by a user.

var prowl = require('myprowl');
prowl.verify("USER-API-KEY",function(error,response){
	if(!error){
		console.log("valid");
		console.log(response);
	}else{
		console.log(error);
	}
});

Create API keys for users

Allow applications to create API keys for users.

1. Step: Get a registration token.

var prowl = require('myprowl');
prowl.keys.setProviderkey("Provider-KEY");
prowl.retrieve.token(function(error,response){
	if(!error){
		console.log("OK, remaining: "+response.success.remaining+
					" , resetdate: "+response.success.resetdate);
		console.log("Token: "+response.retrieve.token);
		console.log("Redirect user to url: "+response.retrieve.url);
	}else{
		console.log(error);
	}
});

2. Step: Get the key.

var prowl = require('myprowl');
prowl.keys.setProviderkey("Provider-KEY");
prowl.retrieve.apikey("TOKEN",function(error,response){
	if(!error){
		console.log("OK, remaining: "+response.success.remaining+
					" , resetdate: "+response.success.resetdate);
		console.log("API key: "+response.retrieve.apikey);
	}else{
		console.log(error);
	}
});

Methods

keys.setApikey(key)

Set the API Key for your application. The key is used for the add API calls.

  • key - 40-byte hexadecimal string or multiple keys separated by commas.

keys.setProviderkey(key)

Set the Provider Key for your application. The provider key is used for all API calls.

  • key - 40-byte hexadecimal string.

add.simple(app,event,description,callback)

  • app - Name of the application. [256 chars]
  • event - Name of the event or the subject. [1024 chars]
  • description - Description [10000 chars]
  • callback - callback(error,response)

add.complex(options,callback)

  • options
    • priority - Notification priority. [-2,2] (Optional)
    • url - URL which will be attached to the notification. [512 chars] (Optional)
    • app - Name of the application. [256 chars]
    • event - Name of the event or the subject. [1024 chars]
    • description - Description [10000 chars]
  • callback - callback(error,response)

retrieve.token(callback)

  • callback - callback(error,response)

retrieve.apikey(token,callback)

  • token - Token returned from retrieve.token.
  • callback - callback(error,response)