Download the PHP package jcroll/foursquare-api-client without Composer
On this page you can find all versions of the php package jcroll/foursquare-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jcroll/foursquare-api-client
More information about jcroll/foursquare-api-client
Files in jcroll/foursquare-api-client
Package foursquare-api-client
Short Description PHP Foursquare Api Client built on Guzzle
License MIT
Homepage https://github.com/jcroll/foursquare-api-client
Informations about the package foursquare-api-client
JcrollFoursquareApiClient
Find the Symfony Bundle for this library here.
Why?
There is no library currently built to interact with the foursquare api using the fantastic Guzzle HTTP Client library. Guzzle is awesome and supplies a lot of great things for building web service clients. Guzzle is fully unit tested which allows this library to be a light wrapper around the Guzzle core. You can read more about Guzzle here.
Installation
The JcrollFoursquareApiClient is available on Packagist (jcroll/foursquare-api-client) and as such installable via Composer.
If you do not use Composer, you can grab the code from GitHub, and use any PSR-4 compatible autoloader (e.g. the Symfony ClassLoader component) to load the library's classes.
Guzzle Versioning
This package is compatible with different versions of Guzzle (see below):
Guzzle Version | Foursquare Client Version |
---|---|
~3 | ~1 |
~4, ~5 | ~2 |
~6 | ~3 |
Composer example
Add JcrollFoursquareApiBundle in your composer.json:
Download the library:
After installing, you need to require Composer's autoloader somewhere in your code:
Usage
You can find a list of the client's available commands in the bundle's client.json but basically they should be the same as the api endpoints listed in the docs.
Oauth Integration
Endpoints in the foursquare API that are user specific will require authorization with foursquare using the Oauth 2.0 protocol.
If you're using the HWIOAuthBundle with Symfony you can install the JcrollFoursquareApiBundle for automatic integration with your oauth requests.
Otherwise oauth protocol authorization is beyond the scope of this library but you can find a list of possible libraries here. After authorization you can pass the access token into the client for user specific access.