FlickrNet.Flickr.PhotosSetMeta C# (CSharp) Method

PhotosSetMeta() public method

Sets the title and description of the photograph.
Thrown when the photo id cannot be found.
public PhotosSetMeta ( string photoId, string title, string description ) : bool
photoId string The numerical photoId of the photograph.
title string The new title of the photograph.
description string The new description of the photograph.
return bool
        public bool PhotosSetMeta(string photoId, string title, string description)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("method", "flickr.photos.setMeta");
            parameters.Add("photo_id", photoId);
            parameters.Add("title", title);
            parameters.Add("description", description);

            FlickrNet.Response response = GetResponseNoCache(parameters);

            if( response.Status == ResponseStatus.OK )
            {
                return true;
            }
            else
            {
                throw new FlickrException(response.Error);
            }
        }

Usage Example

Exemplo n.º 1
0
        private void UpdatePhotoButton_Click(object sender, EventArgs e)
        {
            Flickr flickr = new Flickr(ApiKey.Text, SharedSecret.Text, AuthToken.Text);

            flickr.PhotosSetMeta(PhotoId.Text, NewTitle.Text, null);

            OutputTextbox.Text += "Photo title updated";

            PhotosetCollection sets = flickr.PhotosetsGetList();
            Photoset set = sets[0];

            flickr.PhotosetsAddPhoto(set.PhotosetId, PhotoId.Text);
        }
All Usage Examples Of FlickrNet.Flickr::PhotosSetMeta
Flickr