codeforamerica/bestnest-api — pull request #52 by jden (2014-08-11 02:21:55+00:00)
Title: Comments

- adds POST /comments endpoint

POST content-type must be `application/json` with a body which looks like:

```json
{
"name":"Jill Pearson",
"subject":"homes/23934",
"body":"This is my comment!"
}
```
where `subject` is `homes/$homeId` (unless it's a comment about something else, like `landlords/$landlordId` etc.

Current implementation has a `user` field, but there's still no concept of users or sessions or anything like that on the api side, so it's just stubbed out for now.

- adds `data.comments` to `views/summary` response.

this is an array with all the comments for the home. if there are none, it is empty.

comments look like:
```json
{
...
"data": {
...
"comments": [
{
"name": "Jill Pearson",
"date": 1407723364823,
"body": "Hello there!"
},
{
"name": "Jack Parson",
"date": 1407723364891,
"body": "I live here!"
}
]
}
}
```