PhotosDelete() public method

Delete a photo from Flickr.
Requires Delete permissions. Also note, photos cannot be recovered once deleted.
public PhotosDelete ( string photoId ) : void
photoId string The ID of the photo to delete.
return void
コード例 #1
0
ファイル: FlickrService.cs プロジェクト: cmeigs/SkiChair
 /// <summary>
 /// this method will delete a flickr photograph given its id
 /// </summary>
 /// <param name="flickrAuth">authentication string</param>
 /// <param name="imageUID">id of image</param>
 /// <returns>true if success, false if error/fail</returns>
 public bool DeletePhotograph(string flickrAuth, string imageUID)
 {
     try
     {
         flickr.AuthToken = flickrAuth;
         flickr.PhotosDelete(imageUID);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
コード例 #2
0
        public static void DeleteFlickrImage(FlickrInfo flickrInfo)
        {
            // Make sure we remove it from the history, if no error occured
            config.runtimeFlickrHistory.Remove(flickrInfo.ID);
            config.flickrUploadHistory.Remove(flickrInfo.ID);

            Flickr flickr = new Flickr(Flickr_API_KEY, Flickr_SHARED_SECRET, config.flickrToken);
            flickr.PhotosDelete(flickrInfo.ID);
            flickr = null;

            flickrInfo.Image = null;
        }