<commit_before># API Documentation

All POST requests are closed without redirecting the page.

### GET `/api/events`
Retrieves events from the server.

| Request variable | Type | Description | 
| --- | --- | --- |
| `event_uid` | string | The server-assigned event UID. If empty, the server returns every event. |

The return data is a JSON object formatted as:
| Key | Type | Description | 
| --- | --- | --- |
| `name` | string | Name of the event |
| `description` | string | Description of the event |
| `date` | string | Date of the event (format agnostic) |
| `times` | array | Integer array of the time of the event (0-47) |
| `owner` | string | Name of the event owner/creator |
| `attendees` | array | An array of JS objects with two keys: `name` (string), `times` (integer array), which describes the attendees and what times they are attending |

### POST `/api/events/new`
Creates a new event on the server.

| Request variable | Type | Description | 
| --- | --- | --- |
| `name` | string | Name of the event |
| `description` | string | Description of the event |
| `date` | string | Date of the event (format agnostic) |
| `times` | array | Integer array of the time of the event (0-47) |
| `owner` | string | The person who created the event |

### POST `/api/events/register`
Registers a person to attend an event
| Request variable | Type | Description | 
| --- | --- | --- |
| `event_uid` | string | UID of the event |
| `name` | string | Name of the attendee |
| `times` | array | Integer array of the times the user is attending |

### POST `/api/events/delete`
Deletes a given event from the server.

| Request variable | Type | Description | 
| --- | --- | --- |
| `event_uid` | string | UID of the event to delete. |<commit_msg>Fix github markdown rendering problem in docs/api.md<commit_after># API Documentation

All POST requests are closed without redirecting the page.

### GET `/api/events`
Retrieves events from the server.

| Request variable | Type | Description | 
| --- | --- | --- |
| `event_uid` | string | The server-assigned event UID. If empty, the server returns every event. |

The return data is a JSON object formatted as:

| Key | Type | Description | 
| --- | --- | --- |
| `name` | string | Name of the event |
| `description` | string | Description of the event |
| `date` | string | Date of the event (format agnostic) |
| `times` | array | Integer array of the time of the event (0-47) |
| `owner` | string | Name of the event owner/creator |
| `attendees` | array | An array of JS objects with two keys: `name` (string), `times` (integer array), which describes the attendees and what times they are attending |

### POST `/api/events/new`
Creates a new event on the server.

| Request variable | Type | Description | 
| --- | --- | --- |
| `name` | string | Name of the event |
| `description` | string | Description of the event |
| `date` | string | Date of the event (format agnostic) |
| `times` | array | Integer array of the time of the event (0-47) |
| `owner` | string | The person who created the event |

### POST `/api/events/register`

Registers a person to attend an event
| Request variable | Type | Description | 
| --- | --- | --- |
| `event_uid` | string | UID of the event |
| `name` | string | Name of the attendee |
| `times` | array | Integer array of the times the user is attending |

### POST `/api/events/delete`
Deletes a given event from the server.

| Request variable | Type | Description | 
| --- | --- | --- |
| `event_uid` | string | UID of the event to delete. |
{'fraction_non_alphanumeric': 0.14032121724429417, 'fraction_numerical': 0.0033812341504649195, 'mean_word_length': 3.1423570595099184, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4754824', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1049, 'n_words': 446}