dominos-pizza-profile

A simple module to grab info about a user's Domino's Pizza Profile

Usage no npm install needed!

<script type="module">
  import dominosPizzaProfile from 'https://cdn.skypack.dev/dominos-pizza-profile';
</script>

README

How to use this thing

var PizzaProfile = require('dominos-pizza-profile');

// initialize the user object
var person = new PizzaProfile.User();

// login
person.login("person@example.com", "hunter2", (profile) => {
  // the profile information is automatically stored in the user object,
  // but you can access it from here if you'd like.
  console.log(profile.FirstName);

  // note that saved cards have a separate request, so you'd need to do this:
  person.getCards((cards) => {
    // cards are also saved in User.Cards, but again, you can access them here
    console.log(cards[0]);
  });
});