Class: Flickr::Test

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

#echo(args) ⇒ Object

This has to be a Hash



5
6
7
# File 'lib/flickr/test.rb', line 5

def echo(args)
	return @flickr.call_method('flickr.test.echo',args)
end

#loginObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/flickr/test.rb', line 9

def 
	res = @flickr.call_method('flickr.test.login')
	nsid = res.elements['/user'].attributes['id']
	name = res.elements['/user/username'].text
	p = @flickr.person_cache_lookup(nsid) ||
		Flickr::Person.new(@flickr,nsid,name)
	p.name = name
	@flickr.person_cache_store(p)
	return p
end