Skip to content

Commit

Permalink
More docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Mar 28, 2012
1 parent 957ac86 commit bc20d04
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 19 deletions.
5 changes: 3 additions & 2 deletions sections/accesses.md
Expand Up @@ -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
[
Expand All @@ -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
{
Expand All @@ -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.
3 changes: 2 additions & 1 deletion sections/calendar_events.md
Expand Up @@ -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
{
Expand Down
38 changes: 37 additions & 1 deletion sections/events.md
Expand Up @@ -104,4 +104,40 @@ Get project events
"url": "https://basecamp.com/999999999/api/v1/projects/605816632-bcx/todos/1046098402-t.json"
}
]
```
```


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"
}
]```
15 changes: 0 additions & 15 deletions sections/people.md
Expand Up @@ -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"
}
}
```
Expand Down

0 comments on commit bc20d04

Please sign in to comment.