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



24
25
26
27
28
29
30
# File 'lib/flickr/notes.rb', line 24

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



32
33
34
35
36
# File 'lib/flickr/notes.rb', line 32

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



38
39
40
41
42
43
# File 'lib/flickr/notes.rb', line 38

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