Four Square Users

Returns profile information for a given user, including selected badges and mayorships.

Figure 1a. Instantiate Users
$users = eden('foursquare')->users($_SESSION['oauth_token']);
Figure 1b. Usage: Returns users informations
$users->getList();
Figure 1c. Usage: Get Friends
$users
	->setLimit()	//optional
	->setOffset()	//optional	
	->getFriends();
Figure 1d. Usage: Sends a friend request to another user.
$users->sendRequest('USER_ID');
Figure 1e. Usage: Denies a pending friend request from another user.
$users->denyRequest('USER_ID');
Figure 1f. Usage: Cancels any relationship between the acting user and the specified user. .
$users->unFriend('USER_ID');
Figure 1g. Usage: Returns users leader board
$users->getLeaderBoard();
Figure 1h. Usage: Returns Users Search
$users
	->setPhone('[STRING]')				//optional
    ->setEmail('[STRING]')				//optional
    ->setTwitter('[STRING]')			//optional
    ->setTwitterSource('[STRING]')		//optional
    ->setFacebookId('[STRING]')			//optional
    ->setName('[STRING]')				//optional
    ->search();
Figure 1i. Users Methods
Method Arguments Returns Description
$users->setPhone($phone);
  1. string
Eden_Foursquare_Users Set phone
$users->setEmail($email);
  1. string
Eden_Foursquare_Users Set email
$users->setTwitter($twitter);
  1. string
Eden_Foursquare_Users Set twitter account
$users->setTwitterSource($twitterSource);
  1. string
Eden_Foursquare_Users Set twitter account id
$users->setFacebookId($facebookId);
  1. string
Eden_Foursquare_Users Set facebook account
$users->setName($name);
  1. string
Eden_Foursquare_Users Set name
$users->setLimit($limit);
  1. integer
Eden_Foursquare_Users Set limits
$users->setAfterTimeStamp(); none Eden_Foursquare_Users Set to get a results after timestamp
$users->setBeforeTimeStamp(); none Eden_Foursquare_Users Set to get a results before timestamp
$users->setOffset($offset);
  1. integer
Eden_Foursquare_Users Set offset for the results timestamp
$users->setGroup($group);
  1. string
Eden_Foursquare_Users Set groups
$users->setLocation($longtitude, $latitude);
  1. int|float
  2. int|float
Eden_Foursquare_Users Set location by setting longtitide and latitude
$users->getList(); none array Returns users informations
$users->getLeaderBoard();
  1. string
array Returns users leader board
$users->getPendingRequest(); none array Returns users all pending request
$users->search(); none array Returns users search
$users->getBadget(); none array Returns users badges
$users->getCheckins(); none array Returns users checkins
$users->getFriends();
  1. string
array Returns users friends
$users->getUsersList(); none array Returns users list
$users->getMayorships(); none array Returns users mayor ships
$users->getPhotos(); none array Returns users photos
$users->getVenuehistory(); none array Returns users catagory history
$users->updatePhoto($photo);
  1. string
  2. - Photo under 100KB in multipart MIME encoding with content type image/jpeg, image/gif, or image/png.
array Updates the user's profile photo.
$users->unFriend($userId);
  1. string
  2. - Identity of the user to unfriend.
array Cancels any relationship between the acting user and the specified user.
$users->setPings($userId, $value);
  1. string
  2. - The user ID of a friend.
  3. boolean
array Changes whether the acting user will receive pings when the specified user checks in.
$users->sendRequest($userId);
  1. string
  2. - The user ID to which a request will be sent.
array Sends a friend request to another user.
$users->denyRequest($userId);
  1. string
  2. - The user ID of a pending friend.
array Denies a pending friend request from another user.
$users->approveRequest($userId);
  1. string
  2. - The user ID of a pending friend.
array Approves a pending friend request from another user.

© 2012 Openovate Labs. All rights reserved.