Documentation
- Installation
- Ubuntu and Apache
- OSX and Macports
- AWS EC2 using an AMI
- SUSE and Apache
- API FAQs
- General FAQs
- Authenticating with OAuth 1.0a
- How photos are generated
- How to get specific photo sizes
- Test APIs
- GET /hello.json
- Action APIs
- POST /action/:id/create.json
- POST /action/:id/delete.json
- Activity APIs
- GET /activities/list.json
- Photo APIs
- POST /photo/:id/delete.json
- POST /photo/:id/update.json
- GET /photos/list.json
- GET /photo/:id/view.json
- GET /photo/:id/nextprevious.json
- POST /photo/upload.json
- Tag APIs
- GET /tags/list.json
- POST /tag/:id/create.json
- GET /tags/:id/update.json
- Group APIs
- GET /group/:id/view.json
- GET /groups/list.json
- POST /group/:id/create.json
- POST /group/:id/delete.json
- GET /groups/:id/update.json
- Webhook APIs
- POST /webhook/subscribe
- GET /webhook/:id/view.json
- POST /webhook/:id/delete.json
Hello World
Purpose of the Get Hello World API
This endpoint is used to test connectivity and/or authentication. Any parameters passed in the query string are returned in the response.
Endpoint
Authentication: optional
GET /hello.json
Parameters
- auth (optional), Pass this in with a value of
trueto test OAuth requests.
Examples
Command Line (using openphoto-php)
# without authentication
./openphoto -p -h current.openphoto.me -e /hello.json
# with authentication
./openphoto -p -h current.openphoto.me -e /hello.json -F 'auth=true'
PHP (using openphoto-php)
// without authentication
$client = new OpenPhotoOAuth($host);
$response = $client->get("/hello.json");
// with authentication
$client = new OpenPhotoOAuth($host, $consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$response = $client->get("/hello.json", array('auth' => 'true'));
Response
The response is in a standard response envelope.
- message, A string describing the result. Don't use this for anything but reading.
- code, 200 on success
- result, Any GET parameters passed in to the request plus
__route__.
Sample
{
"message":"Hello, world!",
"code":200,
"result":
{
"__route__":"\/hello.json"
}
}