<commit_before># Secret Santa as a Service
A simple REST API for the popular gift exchanging game "Secret Santa".

**Live Demo**: [secretsanta.mattgmade.me](http://secretsanta.mattgmade.me)

###Features
+ Provide a list of people, and get a list of randomized pairings back.
+ Supports disallowed pairings in order to prevent certain people from getting paired.
+ Can send customizable emails to each person in the list.

###Installation
+ Run `npm install` to install dependencies
+ Enter your MailGun api key and domain in `config.js`. (If you don't have an account, [MailGun](https://mailgun.com) is free and easy to set up!)
+ Start the app on `localhost:3000` by running `npm start`

##Base URL
The base url is the API version, currently `/v1`

**POST: /match**
----
  _Generates and returns a random match result. Does not send emails. This can be used to test your list before calling `/send`._
* **Request parameters**
    + `list`: an array of people
        + `name`: The name of the person. Required.
        + `exclusions`: (Optional) An array of names representing people that should be ignored when assigning a match to this person.<commit_msg>add options section to readme<commit_after># Secret Santa as a Service
A simple REST API for the popular gift exchanging game "Secret Santa".

**Live Demo**: [secretsanta.mattgmade.me](http://secretsanta.mattgmade.me)

###Features
+ Provide a list of people, and get a list of randomized pairings back.
+ Supports disallowed pairings in order to prevent certain people from getting paired.
+ Can send customizable emails to each person in the list.

###Installation
+ Run `npm install` to install dependencies
+ Enter your MailGun api key and domain in `config.js`. (If you don't have an account, [MailGun](https://mailgun.com) is free and easy to set up!)
+ Start the app on `localhost:3000` by running `npm start`

##Base URL
The base url is the API version, currently `/v1`

**OPTIONS**
----
An OPTIONS request can be sent to **all endpoints** for detailed documentation of the endpoint in JSON.

**POST: /match**
----
  _Generates and returns a random match result. Does not send emails. This can be used to test your list before calling `/send`._
* **Request parameters**
    + `list`: an array of people
        + `name`: The name of the person. Required.
        + `exclusions`: (Optional) An array of names representing people that should be ignored when assigning a match to this person.
{'fraction_non_alphanumeric': 0.09250203748981255, 'fraction_numerical': 0.004074979625101874, 'mean_word_length': 4.030737704918033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2665533', 'n_tokens_mistral': 699, 'n_tokens_neox': 658, 'n_words': 349}