Four Square Specials

Gives details about a special, including text and whether it is unlocked for the current user.

Figure 1a. Instantiate Specials
$specials = eden('foursquare')->specials($_SESSION['oauth_token']);
Figure 1b. Usage: Retrieve a List Available Specials.
$specials
	->setVenueId('VENUE_ID')		//optional
    ->setStatus('all')				//optional
    ->getSpecial();
Figure 1c. Usage: Retrieve a List of Specials near the Current Location.
$specials
	->setRadius('[INTEGER]')		//optional
    ->setLimit('[INTEGER]')			//optional
    ->search('LONGTITUDE', 'LATITUDE');
Figure 1d. Specials Methods
Method Arguments Returns Description
$specials->setVenueId($venueId);
  1. string
Eden_Foursquare_Specials Set venue Id
$specials->setStatus($status);
  1. string
Eden_Foursquare_Specials Set specials to return: pending, active, expired, all
$specials->setName($name);
  1. string
Eden_Foursquare_Specials A name for the special.
$specials->setText($text);
  1. string
Eden_Foursquare_Specials Additional text about why the user has flagged this special
$specials->setFinePrint($finePrint);
  1. string
Eden_Foursquare_Specials Maximum length of 200 characters. Fine print, shown in small type on the special detail page.
$specials->count1($count1);
  1. integer
Eden_Foursquare_Specials Count for frequency, count, regular, swarm, friends, and flash specials
$specials->count2($count2);
  1. integer
Eden_Foursquare_Specials Secondary count for regular, flash specials
$specials->count3($count3);
  1. integer
Eden_Foursquare_Specials Tertiary count for flash specials
$specials->setOfferId($offerId);
  1. integer
Eden_Foursquare_Specials Maximum length of 16 characters. Internal id in your 3rd party system.
$specials->setCost($cost);
  1. integer|float
Eden_Foursquare_Specials The amount of money the user must spend to use this special in dollars and cents. For example, 5.50 meaning 5 dollars and 50 cents.
$specials->setTypeToMayor();
  1. string
Eden_Foursquare_Specials The type of special to mayor unlocked only for the mayor
$specials->setTypeToFrequency();
  1. string
Eden_Foursquare_Specials The type of special to frequency unlocked every count1 check-ins
$specials->setTypeToCount();
  1. string
Eden_Foursquare_Specials The type of special to count unlocked on the count1th check-in (all-time)
$specials->setTypeToRegular();
  1. string
Eden_Foursquare_Specials The type of special to regular unlocked if you have checked in at least count1 times in the last count2 days
$specials->setTypeToSwarm();
  1. string
Eden_Foursquare_Specials The type of special to swarm unlocked if there are count1 people here right now (but only for the first count1 people)
$specials->setTypeToFriends();
  1. string
Eden_Foursquare_Specials The type of special to swarm unlocked if at least count1 friends check in together.
$specials->setTypeToFlash();
  1. string
Eden_Foursquare_Specials The type of special to flash first-come first-serve; unlocked for the first count1 people to check in between count2 and count3 (given in minutes since midnight, local time) each day. In all cases, the user must be at the venue (checked in within the last 3 hours, and not having checked in anywhere else since then) to unlock a special.
$specials->createSpecial($text, $unlockedText);
  1. string
  2. - Maximum length of 200 characters.
  3. string
  4. - Maximum length of 200 characters. Special text that is shown when the user has unlocked the special.
array Allows you to create a new special.
$specials->getSpecial(); none array List available specials.
$specials->search($longtitude, $latitude);
  1. string|integer|float
  2. - Longtitude
  3. string|integer|float
  4. - Latitude
array Returns a list of specials near the current location.
$specials->getSpecialDetail($specialId);
  1. string
  2. - The ID of the special to retrieve configuration details for.
array Get special configuration details.
$specials->flag($specialId, $venueId, $problem);
  1. string
  2. - The ID of the special being flagged
  3. string
  4. - The id of the venue running the special.
  5. string
  6. - One of not_redeemable, not_valuable, other
array Allows users to indicate a Special is improper in some way.
$specials->retire($specialId);
  1. string
  2. - The ID of the special to retire
array Retire a special. Retired specials will not show up in the list of specials and cannot be assigned to a group. Also ends any active campaigns associated with the special.

© 2012 Openovate Labs. All rights reserved.