Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

string FlickrNet::Flickr::NotesAdd ( string  photoId,
int  noteX,
int  noteY,
int  noteWidth,
int  noteHeight,
string  noteText 
) [inline]

Add a note to a picture.

Parameters:
photoId The photo id to add the note to.
noteX The X co-ordinate of the upper left corner of the note.
noteY The Y co-ordinate of the upper left corner of the note.
noteWidth The width of the note.
noteHeight The height of the note.
noteText The text in the note.
Returns:

Definition at line 1410 of file Flickr.cs.

            {
                  NameValueCollection parameters = new NameValueCollection();
                  parameters.Add("method", "flickr.photos.notes.add");
                  parameters.Add("photo_id", photoId);
                  parameters.Add("note_x", noteX.ToString());
                  parameters.Add("note_y", noteY.ToString());
                  parameters.Add("note_w", noteWidth.ToString());
                  parameters.Add("note_h", noteHeight.ToString());
                  parameters.Add("note_text", noteText);

                  FlickrNet.Response response = GetResponseCache(parameters);

                  if( response.Status == ResponseStatus.OK )
                  {
                        foreach(XmlElement element in response.AllElements)
                        {
                              return element.Attributes["id", ""].Value;
                        }
                        return string.Empty;
                  }
                  else
                  {
                        throw new FlickrException(response.Error);
                  }
            }


Generated by  Doxygen 1.6.0   Back to index