Delete a photo from the logged in users account.

        :param photo_id: The okcupid id of the photo to delete.
        :param album_id: The album from which to delete the photo.
183151
def delete(self, photo_id, album_id=0):
        
        if isinstance(photo_id, Info):
            photo_id = photo_id.id
        return self._session.okc_post('photoupload', data={
            'albumid': album_id,
            'picid': photo_id,
            'authcode': self._authcode,
            'picture.delete_ajax': 1
        })
749256
public void delete(String photoId, String userId) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_DELETE);

        parameters.put("photo_id", photoId);
        parameters.put("user_id", userId);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
    }
597153
public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);

        $album = $this->PhotosAlbums->get($id);

        //Before deleting, it checks if the album has some photos
        if (!$album->photo_count) {
            $this->PhotosAlbums->deleteOrFail($album);
            $this->Flash->success(I18N_OPERATION_OK);
        } else {
            $this->Flash->alert(I18N_BEFORE_DELETE);
        }

        return $this->redirect(['action' => 'index']);
    }
452838
def remove_image(self, image_id, force=False, noprune=False):
        
        logger.info("removing image '%s' from filesystem", image_id)
        logger.debug("image_id = '%s'", image_id)
        if isinstance(image_id, ImageName):
            image_id = image_id.to_str()
        self.d.remove_image(image_id, force=force, noprune=noprune)
1365867
public function destroy(PhotoAlbum $album, Request $request)
    {
        $this->deleteEntry($album, $request);

        return redirect_to_resource();
    }
399333
def delete_user_id(self, user_id, mount_point='app-id'):
        
        return self._adapter.delete('/v1/auth/{0}/map/user-id/{1}'.format(mount_point, user_id))
322584
def remove(photo)
      response = connection.delete("/collections/#{id}/remove", photo_id: photo.id)
      (200..299).include?(response.status)
    end
444278
function favorites_add ($photo_id)
    {
        /** http://www.flickr.com/services/api/flickr.favorites.add.html */
        $this->request('flickr.favorites.add', array('photo_id'=>$photo_id), TRUE);
        return $this->parsed_response ? true : false;
    }
462271
def delete(self, upload_id):
        

        return super(UploadsProxy, self).delete(upload_id, file_upload=True)
498093
public function deleteEventAlbum($albumId)
    {
        if (is_null($albumId) || $albumId == '') {
            throw new Exception('The albumId is required to delete an album.');
        }

        $params = array(
            'method' => 'sp.album.delete',
            'album_id' => $albumId
        );

        return $this->_makeApiRequest($params);
    }
975865
def delete_event(self, calendar_id, event_id):
        
        self.request_handler.delete(endpoint='calendars/%s/events' % calendar_id, data={'event_id': event_id})
699259
public void removePhotos(String photosetId, String photoIds) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_REMOVE_PHOTOS);

        parameters.put("photoset_id", photosetId);
        parameters.put("photo_ids", photoIds);

        Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
    }
557832
def delete(self, collector_id=None):
        
        cid = self.collector_id

        if collector_id:
            cid = collector_id

        # param to delete id
        url = '{0}/{1}'.format(self.url, cid)
        request = requests.delete(url, auth=self.auth)
        try:
            # unable to delete collector
            response = request.json()
        except ValueError:
            # returns when collector is deleted
            # apparently, the request does not return
            # a json response
            response = {
                u'message': u'The request completed successfully.',
                u'status': 200,
            }
        return response
684224
public function deletePhoto($photoId)
    {
        if (is_null($photoId) || $photoId == '') {
            throw new Exception('The photoId is required to delete a photo.');
        }

        $params = array(
            'method' => 'sp.photo.delete',
            'photo_id' => $photoId
        );

        return $this->_makeApiRequest($params);
    }
599751
def delete(self, id, product_id, session):
        ''''''
        request = TOPRequest('taobao.product.img.delete')
        request['id'] = id
        request['product_id'] = product_id
        self.create(self.execute(request, session)['product_img'])
        return self
51471
def delete(self, photo, **kwds):
        
        return self._client.post("/photo/%s/delete.json" %
                                 self._extract_id(photo),
                                 **kwds)["result"]
203965
def delete_gallery_file(self, file_id, scope='content/write'):
        
        return _delete(
            token=self.oauth.get_user_token(scope),
            uri='/user/media/file/' + urllib.quote(file_id)
        )