Class: LJ::Request
- Inherits:
-
Object
- Object
- LJ::Request
- Defined in:
- lib/lj/request.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(function, options) ⇒ Request
constructor
A new instance of Request.
- #send ⇒ Object
Constructor Details
#initialize(function, options) ⇒ Request
Returns a new instance of Request.
6 7 8 9 10 |
# File 'lib/lj/request.rb', line 6 def initialize( function , ) @client = XMLRPC::Client.new( "www.livejournal.com", "/interface/xmlrpc") @function = function @options = end |
Class Method Details
.perform(function, options = {}) ⇒ Object
12 13 14 |
# File 'lib/lj/request.rb', line 12 def self.perform(function, = {}) new(function,).send end |
Instance Method Details
#send ⇒ Object
17 18 19 |
# File 'lib/lj/request.rb', line 17 def send() @client.call("LJ.XMLRPC.#{@function}", @options) end |