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



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/flickr/interestingness.rb', line 4

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