Class: LJ::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/lj/request.rb

Class Method Summary collapse

Instance Method Summary collapse

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 , options)
  @client = XMLRPC::Client.new( "www.livejournal.com", "/interface/xmlrpc")
  @function = function
  @options = options
end

Class Method Details

.perform(function, options = {}) ⇒ Object



12
13
14
# File 'lib/lj/request.rb', line 12

def self.perform(function,options = {})
  new(function,options).send
end

Instance Method Details

#sendObject



17
18
19
# File 'lib/lj/request.rb', line 17

def send()
  @client.call("LJ.XMLRPC.#{@function}", @options)
end