Updating docs to point to theopenphotoproject.org

This commit is contained in:
Jaisen Mathai 2011-12-03 20:03:07 -08:00
parent e2a95a4989
commit dedfe920b1
6 changed files with 86 additions and 129 deletions

View file

@ -1,99 +0,0 @@
Open Photo API
=======================
#### OpenPhoto, a photo service for the masses
----------------------------------------
### How do I authenticate?
The Open Photo API uses [OAuth1.0a][oauth1.0a] for authentication. See the complete [guide on authentication][authentication] for details.
### What's the response format?
Every API endpoint returns a JSON response in a [standard envelope][Envelope].
{
message: "A string describing the response",
code: 200,
result: {
foo: "bar"
}
}
### API Endpoints
#### Test / diagnostics endpoints
1. [GET /hello.json][GetHelloWorld]
Test endpoint.
#### Action endpoings (comments, favorites, etc)
1. [POST /action/:id/:type/create.json][PostActionCreate]
Create an action.
1. [POST /action/:id/delete.json][PostActionDelete]
Delete an action.
#### Photo endpoints
1. [POST /photos/:id/delete.json][PostPhotoDelete]
Delete a user's photo.
1. [POST /photos/:id/update.json][PostPhotoUpdate]
Update data on a user's photo.
1. [GET /photo/:id/view.json][GetPhoto]
Get a user's photo.
1. [GET /photos/list.json][GetPhotos]
Get a list of the user's photos.
1. [GET /photo/:id/nextprevious.json][GetPhotoNextPrevious]
Get the next and previous photo.
1. [POST /photo/upload.json][PostPhotoUpload]
Upload a new photo.
#### Tag endpoints
1. [GET /tags/list.json][GetTags]
Get a user's tags.
1. [POST /tag/:id/create.json][PostTagCreate]
Create a tag for the user.
1. [POST /tag/:id/update.json][PostTagUpdate]
Modify meta data for a user's tag.
#### Group endpoints
1. [GET /group/:id/view.json][GetGroup]
Get a group.
1. [GET /groups/list.json][GetGroups]
Get a listing of a user's groups.
1. [POST /group/create.json][PostGroupCreate]
Create a group.
1. [POST /group/delete.json][PostGroupDelete]
Delete a group.
1. [POST /group/update.json][PostGroupUpdate]
Update a group.
#### Webhook endpoints
1. [POST /webhook/subscribe][PostWebHookSubscribe]
Update an eixsting webhook.
1. [GET /webhook/:id/view.json][GetWebhook]
Get a user's webhook by id.
1. [POST /webhook/:id/delete.json][PostWebHookDelete]
Delete an existing webhook.
[Envelope]: Envelope.markdown
[GetHelloWorld]: GetHelloWorld.markdown
[GetPhotos]: GetPhotos.markdown
[GetPhoto]: GetPhoto.markdown
[GetPhotoNextPrevious]: GetPhotoNextPrevious.markdown
[PostPhotoDelete]: PostPhotoDelete.markdown
[PostPhotoUpdate]: PostPhotoUpdate.markdown
[PostPhotoUpload]: PostPhotoUpload.markdown
[PostActionCreate]: PostActionCreate.markdown
[PostActionDelete]: PostActionDelete.markdown
[GetTags]: GetTags.markdown
[PostTagCreate]: PostTagCreate.markdown
[PostTagUpdate]: PostTagUpdate.markdown
[GetGroup]: GetGroup.markdown
[GetGroups]: GetGroups.markdown
[PostGroupCreate]: PostGroupCreate.markdown
[PostGroupUpdate]: PostGroupUpdate.markdown
[PostGroupDelete]: PostGroupDelete.markdown
[GetWebhook]: GetWebhook.markdown
[PostWebhookSubscribe]: PostWebhookSubscribe.markdown
[PostWebhookDelete]: PostWebhookDelete.markdown
[authentication]: Authentication.markdown
[oauth1.0a]: http://oauth.net/core/1.0a/

View file

@ -1,8 +1,5 @@
Open Photo API / Authentication
Authentication using OAuth 1.0a
=======================
#### OpenPhoto, a photo service for the masses
----------------------------------------
### Using OAuth (1.0a)
@ -10,6 +7,7 @@ A full introduction to OAuth is beyond the scope of the OpenPhoto documentation.
In all reality you probably don't need to understand the ins and outs of OAuth, just grab one of our libraries.
* <a href="https://github.com/openphoto/openphoto-php">openphoto/openphoto-php</a> - Our PHP language binding.
* <a href="https://github.com/openphoto/openphoto-java">openphoto/openphoto-java</a> - Our Java language binding.
* More coming soon, <a href="mailto:hello@openphoto.me">contact us</a> if you'd like to write bindings in an unlisted language.
### Obtaining a consumer key and secret

View file

@ -0,0 +1,75 @@
Open Photo API
=======================
#### OpenPhoto, a photo service for the masses
----------------------------------------
### How do I authenticate?
The Open Photo API uses [OAuth1.0a](http://oauth.net/core/1.0a/) for authentication. See the complete [guide on authentication](http://theopenphotoproject.org/documentation/api/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.
1. [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.
1. [POST /photos/:id/update.json][http://theopenphotoproject.org/documentation/api/PostPhotoUpdate]
Update data on a user's photo.
1. [GET /photo/:id/view.json][http://theopenphotoproject.org/documentation/api/GetPhoto]
Get a user's photo.
1. [GET /photos/list.json][http://theopenphotoproject.org/documentation/api/GetPhotos]
Get a list of the user's photos.
1. [GET /photo/:id/nextprevious.json][http://theopenphotoproject.org/documentation/api/GetPhotoNextPrevious]
Get the next and previous photo.
1. [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.
1. [POST /tag/:id/create.json][http://theopenphotoproject.org/documentation/api/PostTagCreate]
Create a tag for the user.
1. [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.
1. [GET /groups/list.json][http://theopenphotoproject.org/documentation/api/GetGroups]
Get a listing of a user's groups.
1. [POST /group/create.json][http://theopenphotoproject.org/documentation/api/PostGroupCreate]
Create a group.
1. [POST /group/delete.json][http://theopenphotoproject.org/documentation/api/PostGroupDelete]
Delete a group.
1. [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.
1. [GET /webhook/:id/view.json][http://theopenphotoproject.org/documentation/api/GetWebhook]
Get a user's webhook by id.
1. [POST /webhook/:id/delete.json][http://theopenphotoproject.org/documentation/api/PostWebHookDelete]
Delete an existing webhook.

View file

@ -1,6 +1,6 @@
Documentation
Frequently asked questions
=======================
#### OpenPhoto, a photo service for the masses
This is a list of common questions that people have about OpenPhoto.
If you have one which is not on this list send us a message via <a href="http://twitter.com/openphoto">Twitter</a> or <a href="mailto:hello@openphoto.me">email</a>.
@ -55,13 +55,10 @@ It depends on who you use but here are some guidelines.
### When will the OpenPhoto software be completed?
You can set up the OpenPhoto software using [any of the guides][guides].
You can set up the OpenPhoto software using guides.
----------------------------------------
### When will the hosted version of OpenPhoto be available?
We are aiming to have it ready by the end of November (2011).
[guides]: ../guides/Guides.markdown

View file

@ -1,14 +1,11 @@
Open Photo API / Photo Upload
How photos are generated
=======================
#### OpenPhoto, a photo service for the masses
----------------------------------------
### Overview of how and when versions of photos are generated
By default, when a photo is uploaded there are two versions of that photo which are stored. The original version (`pathOriginal`) and a slightly lower resolution version (`pathBase`).
The API is capable of returning URLs for any size version of every photo. This is acheived by passing in a parameter named `returnSizes` to the [GET Photos][GetPhotos] and [GET Photo][GetPhoto] APIs. This ensures that the response for the photo(s) will include a URL for the size(s) you specify. Here is an example.
The API is capable of returning URLs for any size version of every photo. This is acheived by passing in a parameter named `returnSizes` to the [GET Photos](http://theopenphotoproject.org/documentation/api/GetPhotos) and [GET Photo](http://theopenphotoproject.org/documentation/api/GetPhoto) APIs. This ensures that the response for the photo(s) will include a URL for the size(s) you specify. Here is an example.
curl "http://current.openphoto.me/photo/63.json?returnSizes=123x123"
@ -106,8 +103,4 @@ The `returnSizes` parameter takes values in the form of _WxH[[xA]xB]_ which mean
Additional options include `CR` and `BW`. `CR` tells the API to crop the photo to be exactly _width_ by _height_. It does a center crop and minimizes the portion of the photo that is cropped. `BW` applies a greyscale filter to the photo. `100x100xCRxBW` means the photo will have a key of `path100x100xCRxBW` and will be exactly _100_ by _100_, cropped and greyscale.
For more information on the `returnSizes` parameter see our [documentation on returnSizes][ReturnSizes].
[GetPhotos]: ../api/GetPhotos.markdown
[GetPhoto]: ../api/GetPhoto.markdown
[ReturnSizes]: ../faq/ReturnSizes.markdown
For more information on the `returnSizes` parameter see our [documentation on returnSizes](http://theopenphotoproject.org/documentation/faq/ReturnSizes).

View file

@ -1,14 +1,11 @@
Open Photo API / Photo Upload
Getting specific sizes of a photo
=======================
#### OpenPhoto, a photo service for the masses
----------------------------------------
### Understanding the `returnSizes` parameter and how to use it
For the [GET /photo/view.json][GetPhoto] and [GET /photos/list.json][GetPhotos] you can pass in an optional `returnSizes` parameter.
For the [GET /photo/view.json](http://theopenphotoproject.org/documentation/api/GetPhoto) and [GET /photos/list.json](http://theopenphotoproject.org/documentation/api/GetPhotos) you can pass in an optional `returnSizes` parameter.
If you need a path to a photo then you'll want to make sure you pass this parameter in else your response won't contain any URLs.
We also have a more detailed look at how [photos are generated][photogeneration].
We also have a more detailed look at how [photos are generated](http://theopenphotoproject.org/documentation/faq/PhotoGeneration).
### Specifying the width and height of photos you want
The first decision you need to make is the size or sizes of photos you want in the response.
@ -35,7 +32,3 @@ Adding `xCR` means that the photo will be exactly _200px_ by _200px_ and cropped
### Accessing the paths in the response
The name of the URL attribute in the response is, by convention, `pathWxH` where `WxH` is the value passed in to returnSizes.
[GetPhoto]: ../api/GetPhoto.markdown
[GetPhotos]: ../api/GetPhotos.markdown
[photogeneration]: ../faq/PhotoGeneration.markdown