<commit_before># Messages API

<a name="index"></a>
## GET /api/v1/messages
Gets all messages
### Params
Yes :
 * **max** (int) : Max results in output, defaults to 10
 * **offset** (int) : Offset for results, defaults to 0

*Ex : /api/v1/messages?max=5&offset=2*
### Authentication
Yes : **HTTP BASIC**
### Output
```json
[
  {
    "id": 1,
    "name": "male",
    "description": null,
    "dateCreated": "2016-02-01T16:50:58Z"
  },
  {
    "id": 2,
    "name": "female",
    "description": null,
    "dateCreated": "2016-02-01T16:50:58Z"
  }
]
```
<a name="show"></a>
## GET /api/v1/messages/:id
Gets a message by its Id
### Params
None (Id is included in URL)
### Authentication
Yes : **HTTP BASIC**
### Output
```json
{
  "id": 1,
  "name": "male",
  "description": null,
  "dateCreated": "2016-02-01T16:50:58Z"
}
```<commit_msg>Mise à jour de la doc pour les messages<commit_after># Messages API

<a name="show"></a>
## GET /api/v1/messages/:id
Gets a message by its Id
### Params
None (Id is included in URL)
### Authentication
Yes : **HTTP BASIC**
### Output
```json
{
    "id": 1,
    "name": null,
    "description": "Un petit message pour mon pote",
    "creator": {
        "id": 1,
        "username": "Thomas Bull",
        "imageUrl": null
    },
    "recipient": {
        "id": 2,
        "username": "Theodore Cummings",
        "imageUrl": "http://www.pixnfit.com/image/show/29"
    },
    "dateCreated": "2016-02-08T20:03:07Z"
}
```

<a name="create"></a>
## POST /api/v1/messages
Creates a new message
### Params
```json
{
    "description" : "Contenu du message",
    "recipientId" : 2
}
```
### Authentication
Yes : **HTTP BASIC**
### Output
```json
{
  "id": 1,
  "name": null,
  "description": "Contenu du message",
  "creator": {
    "id": 1,
    "username": "Thomas Bull",
    "imageUrl": null
  },
  "recipient": {
    "id": 2,
    "username": "Theodore Cummings",
    "imageUrl": "http://www.pixnfit.com/image/show/29"
  },
  "dateCreated": "2016-02-08T20:03:07Z"
}
```
{'fraction_non_alphanumeric': 0.20931397095643464, 'fraction_numerical': 0.04707060590886329, 'mean_word_length': 3.197478991596639, 'pattern_counts': {'":': 36, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1504895', 'n_tokens_mistral': 839, 'n_tokens_neox': 764, 'n_words': 195}