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    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (11 months ago) RSS 2.0 feedNot 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é is available for providing paid consulting. Contact Fernando André .
Classes: 5 packages by
Country: Portugal Portugal
Age: 41
All time rank: 124316 in Portugal Portugal
Week rank: 136 Up6 in Portugal Portugal Up
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

  Files folder image Files (26)  /  src  
File Role Description
Files folder imagephp (1 directory)

  Files folder image Files (26)  /  src  /  php  
File Role Description
Files folder imageNetcrash (1 directory)

  Files folder image Files (26)  /  src  /  php  /  Netcrash  
File Role Description
Files folder imageGroupon (1 file, 3 directories)

  Files folder image Files (26)  /  src  /  php  /  Netcrash  /  Groupon  
File Role Description
Files folder imageApiQuery (3 files, 1 directory)
Files folder imageDataObject (5 files)
Files folder imageexample (3 files, 1 directory)
  Plain text file apiClient.php Class Class source

  Files folder image Files (26)  /  src  /  php  /  Netcrash  /  Groupon  /  ApiQuery  
File Role Description
Files folder imageDriver (3 files)
  Plain text file Deals.php Class Class source
  Plain text file Divisions.php Class Class source
  Plain text file GQuery.php Class Class source

  Files folder image Files (26)  /  src  /  php  /  Netcrash  /  Groupon  /  ApiQuery  /  Driver  
File Role Description
  Plain text file GCurl.php Class Class source
  Plain text file GDriver.php Class Class source
  Plain text file GTest.php Class Class source

  Files folder image Files (26)  /  src  /  php  /  Netcrash  /  Groupon  /  DataObject  
File Role Description
  Plain text file Basic.php Class Class source
  Plain text file Deal.php Class Class source
  Plain text file DealOption.php Class Class source
  Plain text file Division.php Class Class source
  Plain text file WebClient.php Class Class source

  Files folder image Files (26)  /  src  /  php  /  Netcrash  /  Groupon  /  example  
File Role Description
Files folder imagejsonexamples (9 files)
  Accessible without login Plain text file exampleusage.php Example Example script
  Accessible without login Plain text file exampleusage_output.txt Output Sample output
  Accessible without login Plain text file __autoload.php Example Example script

  Files folder image Files (26)  /  src  /  php  /  Netcrash  /  Groupon  /  example  /  jsonexamples  
File Role Description
  Accessible without login Plain text file BasicPropInDeals.txt Data Auxiliary data
  Accessible without login Plain text file Deal1.json Data Auxiliary data
  Accessible without login Plain text file DealGen.json Data Auxiliary data
  Accessible without login Plain text file DealOptions.txt Doc. Documentation
  Accessible without login Plain text file deals.json Data Auxiliary data
  Accessible without login Plain text file Deal_Options.json Data Auxiliary data
  Accessible without login Plain text file divisions.json Data Auxiliary data
  Accessible without login Plain text file example-gg-original-slanket.json Data Auxiliary data
  Accessible without login Plain text file sedDivision.sh Data Auxiliary data

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