Class: Flickr::Interestingness

Inherits:
APIBase
  • Object
show all
Defined in:
lib/flickr/interestingness.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

#getList(date = nil, extras = nil, per_page = nil, page = nil) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/flickr/interestingness.rb', line 24

def getList(date=nil,extras=nil,per_page=nil,page=nil)
	args = {}
	if date
		args['date'] = date if date.is_a?(String)
		args['date'] = date.to_s if date.is_a?(Date)
		args['date'] = @flickr.mysql_date(date) if
		date.is_a?(Time)
	end
	extras = extras.join(',') if extras.class == Array
	args['extras'] = extras if extras
	args['per_page'] = per_page if per_page
	args['page'] = page if page
	res = @flickr.call_method('flickr.interestingness.getList',args)
	return Flickr::PhotoSet.from_xml(res.root,@flickr)
end