meetup-randomizer
Version:
Console application that chooses random persons from a Meetup's event.
71 lines (48 loc) • 3.93 kB
Markdown
# meetup-randomizer
[](https://www.npmjs.com/package/meetup-randomizer)
[](https://travis-ci.org/durancristhian/meetup-randomizer)
[](https://dependencyci.com/github/durancristhian/meetup-randomizer)
[](https://www.npmjs.com/package/meetup-randomizer)
[](https://github.com/semantic-release/semantic-release)
[](http://standardjs.com/)
[](http://commitizen.github.io/cz-cli/)
[](https://greenkeeper.io/)
[](http://makeapullrequest.com)
[](#contributors)
[](https://github.com/durancristhian/meetup-randomizer/blob/master/LICENSE)
:twisted_rightwards_arrows: Library that chooses random persons from a Meetup's event. It can be executed as a CLI or as any other npm module (including client-side implementations).
## Demo

## Instalation
```bash
npm i meetup-randomizer
```
## Use
* As a **CLI**:
```bash
# 1
meetup-randomizer --meetup-name 'banodejs' --event-id '231888421' --winners-amount 2
# 2
meetup-randomizer --url 'www.meetup.com/banodejs/events/231097952/' --winners-amount 2
```
* As any other **npm module** (including *client-side* implementations):
```javascript
const meetupRandomizer = require('meetup-randomizer')
meetupRandomizer('banodejs', '231888421', 2)
.then(winners => console.log)
.catch(error => console.error)
```
## How it works
1. It uses the [Meetup API](http://www.meetup.com/meetup_api/) to get the list of RSVPs.
1. It excludes the hosts members.
1. It excludes the non-confirmed attendees.
1. It returns an array of random winners.
In the case of the **CLI**, it shows the winner's picture into the console.
## Contributors
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars.githubusercontent.com/u/4248944?v=3" width="100px;"/><br /><sub><b>Cristhian Duran</b></sub>](https://github.com/durancristhian)<br />[💻](https://github.com/durancristhian/meetup-randomizer/commits?author=durancristhian "Code") [📖](https://github.com/durancristhian/meetup-randomizer/commits?author=durancristhian "Documentation") | [<img src="https://avatars.githubusercontent.com/u/2440935?v=3" width="100px;"/><br /><sub><b>Alejandro Oviedo</b></sub>](https://github.com/a0viedo)<br />[💻](https://github.com/durancristhian/meetup-randomizer/commits?author=a0viedo "Code") [📖](https://github.com/durancristhian/meetup-randomizer/commits?author=a0viedo "Documentation") | [<img src="https://avatars.githubusercontent.com/u/1288694?v=3" width="100px;"/><br /><sub><b>Justin Hall</b></sub>](https://github.com/wKovacs64)<br />[💻](https://github.com/durancristhian/meetup-randomizer/commits?author=wKovacs64 "Code") |
| :---: | :---: | :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.
## License
MIT