Class: Flickr::Notes

Inherits:
APIBase show all
Defined in:
lib/flickr/notes.rb

Instance Attribute Summary

Attributes inherited from APIBase

#flickr

Instance Method Summary collapse

Methods inherited from APIBase

#initialize

Constructor Details

This class inherits a constructor from Flickr::APIBase

Instance Method Details

#add(photo, x, y, w, h, text) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/flickr/notes.rb', line 4

def add(photo,x,y,w,h,text)
	photo = photo.id if photo.class == Flickr::Photo
	res = @flickr.call_method('flickr.photos.notes.add',
		'photo_id' => photo, 'note_x' => x, 'note_y' => y,
		'note_w' => w, 'note_h' => h, 'note_text' => text)
	return res.elements['/note'].attributes['id']
end

#delete(note) ⇒ Object



12
13
14
15
16
# File 'lib/flickr/notes.rb', line 12

def delete(note)
	note = note.id if note.class == Flickr::Note
	res = @flickr.call_method('flickr.photos.notes.delete',
		'note_id' => note)
end

#edit(note, x, y, w, h, text) ⇒ Object



18
19
20
21
22
23
# File 'lib/flickr/notes.rb', line 18

def edit(note,x,y,w,h,text)
	note = note.id if note.class == Flickr::Note
	res = @flickr.call_method('flickr.photos.notes.edit',
		'note_id' => note, 'note_x' => x, 'note_y' => y,
		'note_w' => w, 'note_h' => h, 'note_text' => text)
end