New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mr-ed

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mr-ed

Mr. Ed

  • 1.0.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Mr. Ed

Easiest way to subscribe to Mercadoni's events.

How to use

  1. Install the module:
npm mr-ed --save
  1. Initialise the module.
//import the module to your project (where you initialise your node server)
var ed = require('mr-ed');
//connect to ED
ed.connect({
	token: 'token_provided_by_mercadoni',
	env: 'local|development|live|dev|production|staging'
}, app); // app is an optional parameter that you can use to integrate this module with express (app is an express app) and let ed handle the events for you.

Events

Listen for an event
ed.events.emitter.on('event_name' , function(data, oldData, extraData){
 ...	
});

Note: This emitter will be only available if you integrate express with ED. As there will be a route /events/:event where the webhooks will be received

By default, the events below exists in ED and any app can subscribe to them:

  • order_all_delivered
  • order_completed
  • order_cancel
  • order_checkout
  • order_pending_verification
  • retailer_product_checkout
  • retailer_product_order_pre_taken
  • retailer_product_order_taken
  • retailer_product_shopping
  • retailer_product_shopping_done
  • retailer_product_gets_out_of_retailer
  • retailer_product_arrive_to_client
  • retailer_product_cancel
  • retailer_product_reset_to_processing
  • retailer_product_has_been_rated
  • delivery_time_has_changed
  • shopper.active_has_changed
  • shopper.availability_has_changed
  • shopper_status_going_to_customer
  • shopper_status_shopping
  • shopper_status_idle
  • shopper_status_going_to_retailer
  • order_cash_payment_completed
  • retailer_product_cash_client_pays

Subscribers

Get my info account
ed.subscribers.me(function(err, me){
 ...	
});

License

MIT

Keywords

FAQs

Package last updated on 11 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc