ner0tic / foursquare-api
Foursquare API v2 client
Installs: 59
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/ner0tic/foursquare-api
Requires
- php: >=5.3.2
- ner0tic/php-api-core: >=2.0.0
This package is not auto-updated.
Last update: 2025-09-27 18:40:47 UTC
README
ORM agnostic php library to access foursquare api version 2.0
Installation
Add to composer
"require": { "ner0tic/php-api-core": "2.*", "ner0tic/foursquare-api": "2.*" // ...
Usage
$fs = new \Foursquare\Client(); $checkins = $fs->api('checkins')->recent(); // recent($id,max=10) foreach($checkins as $checkin) { echo $checkin; // $checkin->timestamp.' '.$checkin->getVenue()->getName() }
Api's to choose from:
- users
- checkins
- venues
- venue groups
- tips
- lists
- updates
- photos
- settings
- specials
- campaigns
- events
- pages
- page updates
- multi
To set the auth settings manually
$fs = new \Foursquare\Client(); $fs->setAuthClientId($id); $fs->setAuthHttpPassword($pass); $fs->setAuthUrlToken($token); $fs->setAuthHttpToken($token);
If you have api keys to use, mash them into a pem file and
set the certificate
option to the path of the file.
$client->setOption('certificate', $pem_file);
Make a query
$result = $api->get($endpoint, $parameters, $request_options);
ToDo
Laundry List
- DI to access config.yml for variables