Class: Flickr::Test
Instance Method Summary collapse
-
#echo(options = {}) ⇒ Object
A testing method which echo’s all parameters back in the response.
-
#initialize(flickr) ⇒ Test
constructor
A new instance of Test.
-
#login ⇒ Object
A testing method which checks if the caller is logged in then returns their username.
-
#null ⇒ Object
Null test.
Constructor Details
#initialize(flickr) ⇒ Test
Returns a new instance of Test.
2 3 4 |
# File 'lib/flickr/test.rb', line 2 def initialize(flickr) @flickr = flickr end |
Instance Method Details
#echo(options = {}) ⇒ Object
A testing method which echo’s all parameters back in the response.
pass any number of options as a hash and it will be returned
17 18 19 20 21 |
# File 'lib/flickr/test.rb', line 17 def echo( = {}) rsp = @flickr.send_request('flickr.test.echo', ) end |
#login ⇒ Object
A testing method which checks if the caller is logged in then returns their username.
8 9 10 11 |
# File 'lib/flickr/test.rb', line 8 def login rsp = @flickr.send_request('flickr.test.login') rsp.user.username.to_s end |
#null ⇒ Object
Null test
Returns true unless there is an error
27 28 29 30 |
# File 'lib/flickr/test.rb', line 27 def null rsp = @flickr.send_request('flickr.test.null') true end |