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.



21
22
23
24
# File 'lib/fancyhands/v1/client.rb', line 21

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

Instance Attribute Details

#requestObject

Returns the value of attribute request.



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

def request
  @request
end

Instance Method Details

#CustomObject

Lazy load custom



43
44
45
46
47
48
# File 'lib/fancyhands/v1/client.rb', line 43

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

#EchoObject

Lazy load echo



35
36
37
38
39
40
# File 'lib/fancyhands/v1/client.rb', line 35

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

#HistoryObject

Lazy load History



83
84
85
86
87
88
# File 'lib/fancyhands/v1/client.rb', line 83

def History
  if !@_history
    @_history = History.new(self)
  end
  @_history
end

#IncomingObject

Lazy load Incoming



67
68
69
70
71
72
# File 'lib/fancyhands/v1/client.rb', line 67

def Incoming
  if !@_incoming
    @_incoming = Incoming.new(self)
  end
  @_incoming
end

#MessageObject

Lazy load message



51
52
53
54
55
56
# File 'lib/fancyhands/v1/client.rb', line 51

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

#NumberObject

Lazy load Number



75
76
77
78
79
80
# File 'lib/fancyhands/v1/client.rb', line 75

def Number
  if !@_number
    @_number = Number.new(self)
  end
  @_number
end

#OutgoingObject

Lazy load Outgoing



59
60
61
62
63
64
# File 'lib/fancyhands/v1/client.rb', line 59

def Outgoing
  if !@_outgoing
    @_outgoing = Outgoing.new(self)
  end
  @_outgoing
end

#StandardObject

Lazy load standard



27
28
29
30
31
32
# File 'lib/fancyhands/v1/client.rb', line 27

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