Skip to content

This is a quick hack of a PHP client class to access the 500px.com API (Only for the public API points that do not require user access tokens). This was done for the Facebook World Hack Event 2012 in Vancouver.

Notifications You must be signed in to change notification settings

mechastorm/500px-api-client-public-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

500px-api-client-public-php

@requires php_curl @author Shih Oon Liong github@mechaloid.com

A simple PHP client to access the 500px API points that does is public (that does not require a user access token). To use the API with a 500px's user access token please refer to the official documentation

@see https://github.com/500px/api-documentation

Usage example to get photos:

// API options $options = array( 'key' => 'YOUR API KEY', 'secret' => 'YOUR SECRET KEY', );

// Initialize Cient $five00Px = Five00PxPubClient::factory($options); $tags = array( // Tag 1 // Tag 2 );

// Search Params for the Photo $apiParams = array ( 'tag' => implode(',', $tags), 'term' => 'Search Term', 'rpp' => 40, );

// Do the API call try { $photos = $five00Px->api('photos/search', $params); } catch(Exception $e) { echo 'Error in call ' . $e->getMessage(); }

var_dump($photos);

About

This is a quick hack of a PHP client class to access the 500px.com API (Only for the public API points that do not require user access tokens). This was done for the Facebook World Hack Event 2012 in Vancouver.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages