Пример #1
0
 /**
  * Eliminar una foto especifica.
  *
  * @param  integer          $albumId id del album
  * @param  integer          $photoId id de la foto
  * @return void
  */
 public function deletePhoto($albumId, $photoId)
 {
     $photoQuery = new Zend_Gdata_Photos_PhotoQuery();
     $photoQuery->setAlbumId($albumId);
     $photoQuery->setPhotoId($photoId);
     $photoQuery->setType('entry');
     $entry = $this->_photos->getPhotoEntry($photoQuery);
     $this->_photos->deletePhotoEntry($entry, true);
 }
Пример #2
0
 public function picasaDelete($photoId)
 {
     $token = $this->get_login_token();
     $client = new Zend_Gdata_HttpClient();
     $client->setAuthSubToken($token);
     $client->setClientLoginToken($token);
     $gphoto = new Zend_Gdata_Photos($client);
     $photoQuery = $gphoto->newPhotoQuery();
     $photoQuery->setUser($this->config['user']);
     $photoQuery->setAlbumId($this->config['album_id']);
     $photoQuery->setPhotoId($photoId);
     $photoQuery->setType('entry');
     $entry = $gphoto->getPhotoEntry($photoQuery);
     $gphoto->deletePhotoEntry($entry, true);
 }
Пример #3
0
/**
 * Deletes the specified photo
 *
 * @param  Zend_Http_Client $client  The authenticated client
 * @param  string           $user    The user's account name
 * @param  integer          $albumId The album's id
 * @param  integer          $photoId The photo's id
 * @return void
 */
function deletePhoto($client, $user, $albumId, $photoId)
{
    $photos = new Zend_Gdata_Photos($client);
    $photoQuery = new Zend_Gdata_Photos_PhotoQuery();
    $photoQuery->setUser($user);
    $photoQuery->setAlbumId($albumId);
    $photoQuery->setPhotoId($photoId);
    $photoQuery->setType('entry');
    $entry = $photos->getPhotoEntry($photoQuery);
    $photos->deletePhotoEntry($entry, true);
    outputAlbumFeed($client, $user, $albumId);
}