From bc20d04ffc2d405acdf4003c388042dea6f36b7c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 28 Mar 2012 21:35:11 +0200 Subject: [PATCH] More docs --- sections/accesses.md | 5 +++-- sections/calendar_events.md | 3 ++- sections/events.md | 38 ++++++++++++++++++++++++++++++++++++- sections/people.md | 15 --------------- 4 files changed, 42 insertions(+), 19 deletions(-) diff --git a/sections/accesses.md b/sections/accesses.md index 3529a9e..64c9105 100644 --- a/sections/accesses.md +++ b/sections/accesses.md @@ -8,6 +8,7 @@ Get accesses ------------ * `GET /projects/1/accesses.json` will return all the people with access to the project. +* `GET /calendars/1/accesses.json` will return all the people with access to the calendar. ```json [ @@ -32,7 +33,7 @@ Get accesses Grant access ------------ -* `POST /projects/1/accesses.json` will grant access to the project for the existing `ids` of people already on the account or new people via `email_addresses`. +* `POST /projects/1/accesses.json` will grant access to the project for the existing `ids` of people already on the account or new people via `email_addresses`. (Same goes for calendars with /calendars/ instead) ```json { @@ -49,6 +50,6 @@ This will return `200 OK` if the access was granted successfully. If the user do Revoke access ------------- -* `DELETE /projects/1/accesses/1.json` will revoke the access of the person who's id is mentioned in the URL. +* `DELETE /projects/1/accesses/1.json` will revoke the access of the person who's id is mentioned in the URL. (Same goes for calendars with /calendars/ instead) This will return `200 OK` if the revoke was a success. If the user does not have access to revoke access from the project, `403 Forbidden` will be returned. diff --git a/sections/calendar_events.md b/sections/calendar_events.md index 838c705..e5e4212 100644 --- a/sections/calendar_events.md +++ b/sections/calendar_events.md @@ -46,7 +46,8 @@ Get calendar events Get calendar event ------------------ -* `GET /projects/1/calendar_events/1.json` will return the specified calendar event. +* `GET /projects/1/calendar_events/1.json` will return the specified calendar event. +* `GET /calendars/1/calendar_events/1.json` will return the specified calendar event. ```json { diff --git a/sections/events.md b/sections/events.md index a6c5cca..9e1ff5f 100644 --- a/sections/events.md +++ b/sections/events.md @@ -104,4 +104,40 @@ Get project events "url": "https://basecamp.com/999999999/api/v1/projects/605816632-bcx/todos/1046098402-t.json" } ] -``` \ No newline at end of file +``` + + +Get person events +------------------ + +* `GET /people/1/events.json?since=2012-03-24T11:00:00-06:00` will return all the events by that person like the global GET, except there won't be creator parameter. Similar use of the since term and the pagination. + +```json +[ + { + "id": 1054456336, + "created_at": "2012-03-24T11:00:50-05:00", + "updated_at": "2012-03-24T11:00:50-05:00", + "bucket": { + "id": 605816632, + "name": "BCX", + "type": "Project", + "url": "https://basecamp.com/999999999/api/v1/projects/605816632-bcx.json" + }, + "summary": "re-assigned a to-do to Funky ones: Design it", + "url": "https://basecamp.com/999999999/api/v1/projects/605816632-bcx/todos/223304243-design-it.json" + }, + { + "id": 1054456334, + "created_at": "2012-03-24T11:00:39-05:00", + "updated_at": "2012-03-24T11:00:39-05:00", + "bucket": { + "id": 605816632, + "name": "BCX", + "type": "Project", + "url": "https://basecamp.com/999999999/api/v1/projects/605816632-bcx.json" + }, + "summary": "created a to-do list: lists", + "url": "https://basecamp.com/999999999/api/v1/projects/605816632-bcx/todolists/1056802576-lists.json" + } +]``` \ No newline at end of file diff --git a/sections/people.md b/sections/people.md index 24d33c2..4f0e250 100644 --- a/sections/people.md +++ b/sections/people.md @@ -44,21 +44,6 @@ Get person "count": 19, "updated_at": "2012-03-23T13:55:43-05:00", "url": "https://basecamp.com/999999999/api/v1/people/149087659-jason-fried/events.json" - }, - "assigned_todos": { - "count": 0, - "updated_at": null, - "url": "https://basecamp.com/999999999/api/v1/people/149087659-jason-fried/assigned_todos.json" - }, - "completed_todos": { - "count": 0, - "last_completed_at": null, - "url": "https://basecamp.com/999999999/api/v1/people/149087659-jason-fried/completed_todos.json" - }, - "attachments": { - "count": 3, - "updated_at": "2012-03-22T16:56:47-05:00", - "url": "https://basecamp.com/999999999/api/v1/people/149087659-jason-fried/attachments.json" } } ```