photo-front/documentation/api/Api.markdown
2011-10-09 17:09:59 -07: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.

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

API Endpoints

Test / diagnostics endpoints

  1. GET /hello.json Test endpoint.

Action endpoings (comments, favorites, etc)

  1. [POST /action/:id/:type/create.json][PostActionCreate] Create an action.
  2. [POST /action/:id/delete.json][PostActionDelete] Delete an action.

Photo endpoints

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

Tag endpoints

  1. GET /tags/list.json Get a user's tags.
  2. [POST /tag/:id/update.json][PostTag] Modify meta data for a user's tag.

Group endpoints

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

Webhook endpoints

  1. [GET /webhook/:id/view.json][GetWebhook] Get a user's webhook by id.
  2. [GET /webhooks/list.json][GetWebhooks] An internal private API to list the user's webhooks.
  3. [POST /webhook/create.json][PostWebhookCreate] Create a new webhook for the user.
  4. [POST /webhook/:id/delete.json][PostWebHookDelete] Delete an existing webhook.
  5. [POST /webhook/:id/update.json][PostWebHookUpdate] Update an eixsting webhook.