PHP Classes

Groupon API Client: Get deal information from Groupon using its API

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 391 All time: 6,651 This week: 73Up
Version License PHP version Categories
groupon 17BSD License5.3PHP 5, E-Commerce, Web services
Description 

Author

This package can get deal information from Groupon using its API.

It can send HTTP requests to Groupon Web services API Web server to perform several operations on Groupon deals.

Currently it can retrieve the lists of divisions, deals and individual deal details.

Innovation Award
PHP Programming Innovation award nominee
February 2012
Number 6


Prize: One book of choice by Packt
Groupon is one of the most popular group discount coupon buying sites.

This class provides a pure PHP client to call Groupon Web services API to obtain information about available Groupon deals.

Manuel Lemos
Picture of Fernando André
Name: Fernando André <contact>
Classes: 5 packages by
Country: Portugal Portugal
Innovation award
Innovation award
Nominee: 2x

 

Details

Groupon Api client in PHP 5.3 You can copy directly from the: src/php/ directory to your use case path be it in Zend Framework or other development environment. This code uses the namespace prefix: Netcrash A how to use example can be seen in the: src/php/Netcrash/Groupon/example directory, and can be run by using: php exampleusage_output.txt You will require groupon API key for online testing. And using it like: $api = new \Netcrash\Groupon\apiClient(); $api->setToken("API_KEY"); And can use the GCurl "Driver" or develop your own this can be found in the directory src/php/Netcrash/Groupon/ApiQuery/Driver/ Setting a driver can be done by using: // this $api->setDriver(new \Netcrash\Groupon\ApiQuery\Driver\GTest()); // for testing // or this $api->setDriver(new \Netcrash\Groupon\ApiQuery\Driver\GCurl()); // for online api You can list divisions by using: $api->getDivisions(); List deals by using: $api->getDeals(); View a Deal Detail: $Deal = $api->getDealById("GROUPON_DEAL_ID"); DataObjects are used to represent the results you can find these in: src/php/Netcrash/Groupon/DataObject/ Deal has a more detailed class DealOptions because it has many properties for other return values like price, array are returned. Examples of return data in the json format were kept in (and other details used for testing and development): src/php/Netcrash/Groupon/example/jsonexamples/

  Files folder image Files (26)  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file LICENSE.txt Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:391
This week:0
All time:6,651
This week:73Up