2.1.5 • Published 7 years ago

get-lottery v2.1.5

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

A Powerball Lottery api wrapper with added functionality.

Installation

'get-lottery' is an npm module, and as such, can be installed using the install command.

$ npm install get-lottery

Usage

Get an api key at https://dev.socrata.com/foundry/data.ny.gov/8vkr-v8vh.

let getLottery = require('get-lottery');
    
//set api key (optional)
getLottery.setKey('bjp8KrRvAPtuf809u1UXnI0Z8');
    
//generate potential lottery numbers based on data
getLottery.generateNumbers().then(result => {
	//returns array of numbers
});

Documentation

setKey

An api key is not required, but will allow you to make more requests per second.

getLottery.setKey('bjp8KrRvAPtuf809u1UXnI0Z8');

getAll

Get all Powerball data since 2010, including date, multiplier, and of course, winning numbers.

getLottery.getAll().then(result => {
    //returns array of objects
});

getWinningNumbers

Get only winning number data.

//get winning numbers only
getLottery.getWinningNumbers().then(result => {
	//returns array of strings
});
    
//get winning numbers, counted
getLottery.getWinningNumbers(true).then(result => {
    //returns array of objects
    //id = number;
    //count = how many times the number appears in the data
});

generateNumbers

Based on probability, return an array of numbers consituting future lottery numbers.

getLottery.generateNumbers().then(result => {
    //returns array of numbers
});

License

This module is under the MIT License. Feel free to use it to your liking.

2.1.5

7 years ago

2.1.4

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.9.0

7 years ago

1.8.0

7 years ago

1.7.0

7 years ago

1.6.0

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago