Class: Facer::Linker
- Inherits:
-
Object
- Object
- Facer::Linker
- Defined in:
- lib/linker.rb
Overview
This class hold the main linkage to face.com acting as a gateway to subclasses
Constant Summary collapse
- FaceComURI =
The main uri to face.com api.
"http://api.face.com/"
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#faces ⇒ Object
readonly
Returns the value of attribute faces.
Instance Method Summary collapse
-
#call(bclass, method, params = {}, files = nil) ⇒ Object
Call the service appending security informations to every request.
-
#initialize(applicationName, key, secret) ⇒ Linker
constructor
Initialize the linker with security informations.
Constructor Details
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
14 15 16 |
# File 'lib/linker.rb', line 14 def account @account end |
#faces ⇒ Object (readonly)
Returns the value of attribute faces.
15 16 17 |
# File 'lib/linker.rb', line 15 def faces @faces end |
Instance Method Details
#call(bclass, method, params = {}, files = nil) ⇒ Object
Call the service appending security informations to every request
24 25 26 27 28 29 30 |
# File 'lib/linker.rb', line 24 def call(bclass,method,params = {},files = nil) params ||={} params["api_key"]=@account.apiKey params["api_secret"]=@account.apiSecret resp=callAPI(bclass,method,params,files) return resp end |