photo-front/documentation/api/Readme.markdown
2011-12-03 20:03:07 -08:00

3.2 KiB

Open Photo API

OpenPhoto, a photo service for the masses


How do I authenticate?

The Open Photo API uses OAuth1.0a for authentication. See the complete guide on authentication for details.

What's the response format?

Every API endpoint returns a JSON response in a [standard envelope][http://theopenphotoproject.org/documentation/api/Envelope].

{
  message: "A string describing the response",
  code: 200,
  result: {
    foo: "bar"
  }
}

API Endpoints

Test / diagnostics endpoints

  1. [GET /hello.json][http://theopenphotoproject.org/documentation/api/GetHelloWorld] Test endpoint.

Action endpoings (comments, favorites, etc)

  1. [POST /action/:id/:type/create.json][http://theopenphotoproject.org/documentation/api/PostActionCreate] Create an action.
  2. [POST /action/:id/delete.json][http://theopenphotoproject.org/documentation/api/PostActionDelete] Delete an action.

Photo endpoints

  1. [POST /photos/:id/delete.json][http://theopenphotoproject.org/documentation/api/PostPhotoDelete] Delete a user's photo.
  2. [POST /photos/:id/update.json][http://theopenphotoproject.org/documentation/api/PostPhotoUpdate] Update data on a user's photo.
  3. [GET /photo/:id/view.json][http://theopenphotoproject.org/documentation/api/GetPhoto] Get a user's photo.
  4. [GET /photos/list.json][http://theopenphotoproject.org/documentation/api/GetPhotos] Get a list of the user's photos.
  5. [GET /photo/:id/nextprevious.json][http://theopenphotoproject.org/documentation/api/GetPhotoNextPrevious] Get the next and previous photo.
  6. [POST /photo/upload.json][http://theopenphotoproject.org/documentation/api/PostPhotoUpload] Upload a new photo.

Tag endpoints

  1. [GET /tags/list.json][http://theopenphotoproject.org/documentation/api/GetTags] Get a user's tags.
  2. [POST /tag/:id/create.json][http://theopenphotoproject.org/documentation/api/PostTagCreate] Create a tag for the user.
  3. [POST /tag/:id/update.json][http://theopenphotoproject.org/documentation/api/PostTagUpdate] Modify meta data for a user's tag.

Group endpoints

  1. [GET /group/:id/view.json][http://theopenphotoproject.org/documentation/api/GetGroup] Get a group.
  2. [GET /groups/list.json][http://theopenphotoproject.org/documentation/api/GetGroups] Get a listing of a user's groups.
  3. [POST /group/create.json][http://theopenphotoproject.org/documentation/api/PostGroupCreate] Create a group.
  4. [POST /group/delete.json][http://theopenphotoproject.org/documentation/api/PostGroupDelete] Delete a group.
  5. [POST /group/update.json][http://theopenphotoproject.org/documentation/api/PostGroupUpdate] Update a group.

Webhook endpoints

  1. [POST /webhook/subscribe][http://theopenphotoproject.org/documentation/api/PostWebHookSubscribe] Update an eixsting webhook.
  2. [GET /webhook/:id/view.json][http://theopenphotoproject.org/documentation/api/GetWebhook] Get a user's webhook by id.
  3. [POST /webhook/:id/delete.json][http://theopenphotoproject.org/documentation/api/PostWebHookDelete] Delete an existing webhook.