Skip to content
Browse files

Calendars API

  • Loading branch information...
1 parent d14122b commit 68fa4ea7b18e73a5545f5e859afa62e67a6b2dcc @dhh dhh committed
Showing with 88 additions and 1 deletion.
  1. +1 −1 README.md
  2. +87 −0 sections/calendars.md
View
2 README.md
@@ -83,13 +83,13 @@ API ready for use
* [Todos](https://github.com/37signals/bcx-api/blob/master/sections/todos.md)
* [Documents](https://github.com/37signals/bcx-api/blob/master/sections/documents.md)
* [Files](https://github.com/37signals/bcx-api/blob/master/sections/files.md)
+* [Calendars](https://github.com/37signals/bcx-api/blob/master/sections/calendars.md)
* [Calendar events](https://github.com/37signals/bcx-api/blob/master/sections/calendar_events.md)
API still under development
---------------------------
-* Calendars: Working with events
* Notifications: Letting people know by email if new content was added
* Moving todos and todolists: Changing their position in the UI
* Companies/Groups: Organize people in groups
View
87 sections/calendars.md
@@ -0,0 +1,87 @@
+Calendars
+=========
+
+Get calendars
+-------------
+
+* `GET /calendars.json` will return all calendars sorted alphabetically.
+
+```json
+[
+ {
+ "id": 336154974,
+ "name": "Board Meetings",
+ "updated_at": "2012-03-27T13:19:29-05:00",
+ "url": "http://bcx.dev/735644780/api/v1/calendars/336154974-board-meetings.json"
+ },
+ {
+ "id": 237581901,
+ "name": "General",
+ "updated_at": "2012-03-27T13:19:29-05:00",
+ "url": "http://bcx.dev/735644780/api/v1/calendars/237581901-general.json"
+ }
+]
+```
+
+
+Get calendar
+------------
+
+* `GET /calendar/1.json` will return the specified calendar.
+
+```json
+{
+ "id": 567469885,
+ "name": "Vacation",
+ "created_at": "2012-03-28T13:14:30-05:00",
+ "updated_at": "2012-03-28T13:26:07-05:00",
+ "creator": {
+ "id": 149087659,
+ "name": "Jason Fried"
+ },
+ "accesses": {
+ "count": 3,
+ "updated_at": "2012-03-28T13:14:31-05:00",
+ "url": "http://bcx.dev/735644780/api/v1/calendars/567469885-vacation/accesses.json"
+ },
+ "calendar_events": {
+ "count": 1,
+ "updated_at": "2012-03-28T13:26:07-05:00",
+ "url": "http://bcx.dev/735644780/api/v1/calendars/567469885-vacation/calendar_events.json"
+ }
+}
+```
+
+
+Create calendar
+---------------
+
+* `POST /calendars.json` will create a new calendar from the parameters passed.
+
+```json
+{
+ "name": "This is my new calendar!"
+}
+```
+
+This will return `200 OK`, with the location of the new calendar in the `Location` header, if the creation was a success.
+
+
+Update calendar
+---------------
+
+* `PUT /calendars/1.json` will update the calendar from the parameters passed.
+
+```json
+{
+ "name": "This is a new name for the calendar!"
+}
+```
+
+This will return `200 OK` if the update was a success. If the user does not have access to update the calendar, you'll see `403 Forbidden`.
+
+
+Delete calendar
+-------------
+
+* `DELETE /calendars/1.json` will delete the calendar specified and return `200 OK` if that was successful. If the user does not have access to delete the calendar, you'll see `403 Forbidden`.

0 comments on commit 68fa4ea

Please sign in to comment.
Something went wrong with that request. Please try again.