FlickrNet.Flickr.PhotosetsCommentsAddComment C# (CSharp) Method

PhotosetsCommentsAddComment() public method

Adds a new comment to a photoset.
public PhotosetsCommentsAddComment ( string photosetId, string commentText ) : string
photosetId string The ID of the photoset to add the comment to.
commentText string The text of the comment. Can contain some HTML.
return string
        public string PhotosetsCommentsAddComment(string photosetId, string commentText)
        {
            Hashtable parameters = new Hashtable();
            parameters.Add("method", "flickr.photosets.comments.addComment");
            parameters.Add("photoset_id", photosetId);
            parameters.Add("comment_text", commentText);

            FlickrNet.Response response = GetResponseNoCache(parameters);

            if( response.Status == ResponseStatus.OK )
            {
                XmlNode node = response.AllElements[0];
                if( node.Attributes.GetNamedItem("id") != null )
                    return node.Attributes.GetNamedItem("id").Value;
                else
                    throw new FlickrException(9001, "Comment ID not found");
            }
            else
            {
                throw new FlickrException(response.Error);
            }
        }
Flickr