durancristhian / meetup-randomizer

Console application that chooses random persons from a Meetup's event.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

meetup-randomizer

npm version Travis branch Dependency Status node

semantic-release js-standard-style Commitizen friendly

Greenkeeper badge PRs Welcome All Contributors license

πŸ”€ 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

meetup-randomizer

Instalation

npm i meetup-randomizer

Use

  • As a CLI:
# 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):
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 to get the list of RSVPs.
  2. It excludes the hosts members.
  3. It excludes the non-confirmed attendees.
  4. It returns an array of random winners.

In the case of the CLI, it shows the winner's picture into the console.

Contributors


Cristhian Duran

πŸ’» πŸ“–

Alejandro Oviedo

πŸ’» πŸ“–

Justin Hall

πŸ’»

This project follows the all-contributors specification.

License

MIT

About

Console application that chooses random persons from a Meetup's event.

License:MIT License


Languages

Language:JavaScript 100.0%