Skip to content

Commit

Permalink
Comments now include ids so they can be referenced for trashing. Also…
Browse files Browse the repository at this point in the history
…, add trash to comments API
  • Loading branch information
dhh committed Mar 28, 2012
1 parent 86240b8 commit 51ab774
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
14 changes: 6 additions & 8 deletions sections/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Comments are included on the [topics](https://github.com/37signals/bcx-api/blob/
{
"comments": [
{
"id": 1028592764,
"content": "Yeah, really, welcome!",
"created_at": "2012-03-22T16:56:48-05:00",
"updated_at": "2012-03-22T16:56:48-05:00"
"updated_at": "2012-03-22T16:56:48-05:00",
"creator": {
"id": 149087659,
"name": "Jason Fried"
Expand Down Expand Up @@ -49,11 +50,8 @@ Create comment

This will return `200 OK`, with the location of the commentable where the comment appears in the `Location` header, if the creation was a success. See the [files API](https://github.com/37signals/bcx-api/blob/master/sections/files.md) for details on how to upload files to be attachments.

```json
{
"content": "Shipped all the things!",
}
```

*Note*: Make sure that the `name` matches the name of the file, or else your
attachment won't display properly.
Trash comment
-------------

* `DELETE /projects/1/comments/1.json` will trash the comment specified and return `200 OK` if that was successful. If the user does not have access to trash the comment, you'll see `403 Forbidden`.
2 changes: 1 addition & 1 deletion sections/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Attaching files requires both the token, and the name of the attachment. This *m
}
```

*Note*: Uploads can only have one attachment, despite the json blob accepting plural `attachments`. This is for consistency across the other endpoints that accept attachments. Hit the endpoint multiple times if you need to create multiple uploads.
*Note*: Uploads can only have one attachment, despite the json blob accepting plural `attachments`. This is for consistency across the other endpoints that accept attachments. Hit the endpoint multiple times if you need to create multiple uploads. Also, make sure that the `name` matches the name of the file, or else your attachment won't display properly.
1 change: 1 addition & 0 deletions sections/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Messages are listed alongside all the other [topics](https://github.com/37signal
},
"comments": [
{
"id": 1028592764,
"content": "Yeah, really, welcome!",
"created_at": "2012-03-22T16:56:48-05:00",
"updated_at": "2012-03-22T16:56:48-05:00"
Expand Down
1 change: 1 addition & 0 deletions sections/todos.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ To get an index of all todos on a list, see [todolists](https://github.com/37sig
},
"comments": [
{
"id": 1028592764,
"content": "+1",
"created_at": "2012-03-24T09:53:34-05:00",
"updated_at": "2012-03-24T09:53:34-05:00",
Expand Down

0 comments on commit 51ab774

Please sign in to comment.