forked from PintLabs/Pintlabs_Service_Untappd
-
Notifications
You must be signed in to change notification settings - Fork 0
wrewdison/Pintlabs_Service_Untappd
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
PHP library to interact with the public Untappd API version 4, patterned after other service libraries in Zend Framework. Information on the API can be found on Untappd's website. http://untappd.com/api/dashboard A client ID and client secret is required. An access token is required for certain method calls, such as myFriendFeed. Contact Untappd to attain your credentials. This library also contains 2 helper methods to generate the correct authenticate URI for OAuth2 authentication, as well as a method to exchange a "code" from your redirect URI for an access token. Examples are below. ============================================== Usage: <?php // Setup Untappd $config = array( 'clientId' => $clientId, 'clientSecret' => $clientSecret, 'accessToken' => $accessToken, 'redirectUri' => $redirectUri, ); $untappd = new Pintlabs_Service_Untappd($config); // Example 1: Basic method call try { $result = $untappd->myFriendFeed(); } catch (Pintlabs_Service_Untappd_Exception $e) { die($e->getMessage()); } // Example 2: Redirecting to Untappd OAuth2 authentication URI header('Location: ' . $untappd->authenticateUri()); // Example 3: Exchanging code argument for access token $accessToken = $untappd->getAccessToken($_GET['code']);
About
PHP library to interact with the Untappd public API
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- PHP 100.0%