GithubHelp home page GithubHelp logo

isabella232 / notify-my-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thethingsystem/notify-my-android

0.0 0.0 0.0 127 KB

Node.js interface to Notify My Android

License: MIT License

JavaScript 100.00%

notify-my-android's Introduction

notify-my-android - NMA for Node.js API

Be happy! Send notifications to androids using the Notify My Android service. Simple, easy and clean.

As of now this API supports notify and only notify.

Installation

npm install notify-my-android

or put it in your package.json as usual and hit npm install. It depends on xml2js and request.

Usage

The API requires your API-key, which could be found/created under "My Account" on the Notify My Android website.

Initialize it with your key and start notifying!

var NMA = require('notify-my-android');

var nma = new NMA('MY-API-KEY');

Now, use the nma object whenever sending a notify:

nma.notify('My app', 'The happiest day', 'This is the happiest day', function( err, remaining ){
	if( err ) throw err;
	console.log( 'I have ' + remaining.calls + ' calls left to the api during current hour. BOOM!' );
});

You can provide more options to the notification:

nma.notify('My app', 'The happiest day', 'This is the happiest day!', {
	priority: 1,
	url: 'http://en.wikisource.org/wiki/(The_Happiest_Day)'
}, function( err, remaining ){
	if( err ) throw err;
	console.log( 'I have ' + remaining.calls + ' calls left to the api during current hour. BOOM!' );
});

Contribute

I´d be happy if you wanted to contribute with pull requests or tips. I´ll add you to the contributors list here and in the package.json file.

Testing

While contributing, make sure to write a test and make it pass if you extend the library. Tests are written in the test directory, preferably in all.js, since its quite small right now. It uses should.js and mocha for tests.

Test by installing mocha and should.js (dev dependencies) and then just hit:

NMA_KEY=[my key here] make

And voila, it autotests for you.

Legacy

notify-my-android is heavily based on [node-prowl}(https://github.com/arnklint/node-prowl.git).

notify-my-android's People

Contributors

mrose17 avatar torkelsson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.