0.0.12 • Published 10 years ago

opnotiq v0.0.12

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

opnotiq

NPM version Build Status

opnotiq is a component to handle actions against operations and notifications queues, a simple pattern we use for decoupling work load from API requests, for accepting operations via non-api calls (i.e through a GCM upstream message) and notify when it's done.

Usage

  var queues = require('queues');

  var options = {
    token: 'xxxxxxxx'
    project_id: 'xxxxxxxx'
  }

  // init queue provider
  var provider = queues.iron(options);

  // init optoniq
  var opnotiq = require('opnotiq')(provider);

  opnotiq.on('notification', function(msg) {
    // handle notification
  });


  opnotiq.postOperation('update-task', {
    // op specific data
  }, function(){
    // callback
  });


  opnotiq.postNotification('attach-project', 9349, {
    // notification specific data
  }, function(){
    // callback
  });
0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago