Перейти к файлу
Dave Justice 251577d296
Merge pull request #9 from mozilla/0.3.0-release
bump release to 0.3.0
2018-08-30 13:34:11 -04:00
.eslintrc.js Update deps 2018-08-29 16:32:15 -07:00
.gitignore init 2015-08-13 14:53:25 -07:00
LICENSE init 2015-08-13 14:53:25 -07:00
README.md Fix a github link 2016-08-08 00:25:26 -04:00
index.js fix #4: assign defaultOpts from email, newsletters params 2018-08-29 16:57:24 -05:00
package-lock.json Update deps 2018-08-29 16:32:15 -07:00
package.json bump release to 0.3.0 2018-08-30 13:33:33 -04:00
test.js Update deps 2018-08-29 16:32:15 -07:00

README.md

mozilla-basket

npm install mozilla-basket

API wrapper around mozilla's basket newsletter api

Usage

// instantiate
var b = new Basket({BASKET_URL: 'https://basket.mozilla.org'});
b.subscribe('assata@example.com', 'marketplace, beta', function(err, body) {
  console.log(body.status);
}

Methods:

  • subscribe - subscribe to newsletters
  • unsubscribe - unsubscribe from newsletters
  • user - post user info (token required)
  • newsletters - return newsletters data
  • debugUser - (requires supertoken)
  • lookupUser - check if user is on list (requires apikey)
  • recover - send user a password recovery email.

existing work

python client

Who is responsible for this?

LICENSE

MPL 2.0