PHP Classes


Recommend this page to a friend!
  Classes of Fernando André  >  Groupon API Client  >  >  Download  
Role: Documentation
Content type: text/plain
Description: Documentation
Class: Groupon API Client
Get deal information from Groupon using its API
Author: By
Last change: Update of
Date: 25 days ago
Size: 1,401 bytes


Class file image Download
Groupon Api client in PHP 5.3

You can copy directly from the:
directory to your use case path be it in Zend Framework or other development

This code uses the namespace prefix:

A how to use example can be seen in the:
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();

And can use the GCurl "Driver" or develop your own
this can be found in the directory

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:

List deals by using:

View a Deal Detail:
$Deal = $api->getDealById("GROUPON_DEAL_ID");

DataObjects are used to represent the results you can find these in:
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):

For more information send a message to info at phpclasses dot org.