Class: FancyHands::V1::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/fancyhands/v1/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, secret, url = "https://www.fancyhands.com/api/v1/") ⇒ Client

Returns a new instance of Client.



18
19
20
21
# File 'lib/fancyhands/v1/client.rb', line 18

def initialize(key, secret, url="https://www.fancyhands.com/api/v1/")
  @request = Request.new(key, secret, url)
  @_standard = @_echo = @_custom = @_message = @_call = nil 
end

Instance Attribute Details

#requestObject

Returns the value of attribute request.



16
17
18
# File 'lib/fancyhands/v1/client.rb', line 16

def request
  @request
end

Instance Method Details

#CallObject

Lazy load Call



56
57
58
59
60
61
# File 'lib/fancyhands/v1/client.rb', line 56

def Call
  if !@_call
    @_call = Call.new(self)
  end
  @_call
end

#CustomObject

Lazy load custom



40
41
42
43
44
45
# File 'lib/fancyhands/v1/client.rb', line 40

def Custom
  if !@_custom
    @_custom = Custom.new(self)
  end
  @_custom
end

#EchoObject

Lazy load echo



32
33
34
35
36
37
# File 'lib/fancyhands/v1/client.rb', line 32

def Echo
  if !@_echo
    @_echo = Echo.new(self)
  end
  @_echo
end

#MessageObject

Lazy load message



48
49
50
51
52
53
# File 'lib/fancyhands/v1/client.rb', line 48

def Message
  if !@_message
    @_message = Message.new(self)
  end
  @_message
end

#StandardObject

Lazy load standard



24
25
26
27
28
29
# File 'lib/fancyhands/v1/client.rb', line 24

def Standard
  if !@_standard
    @_standard = Standard.new(self)
  end
  @_standard
end