Class: WhitLi::Client
- Inherits:
-
Object
- Object
- WhitLi::Client
- Defined in:
- lib/whit_li/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
- #compare(fb_id_1, fb_id_2, context_id, schema = "fb") ⇒ Object
- #get(fb_id, key_id, schema = "fb") ⇒ Object
- #import_generic(request_body) ⇒ Object
- #import_token(fb_id, token) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
- #populate(fb_id) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
8 9 10 |
# File 'lib/whit_li/client.rb', line 8 def initialize api_key @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/whit_li/client.rb', line 6 def api_key @api_key end |
Instance Method Details
#compare(fb_id_1, fb_id_2, context_id, schema = "fb") ⇒ Object
28 29 30 |
# File 'lib/whit_li/client.rb', line 28 def compare fb_id_1, fb_id_2, context_id, schema = "fb" api_call "key/compare", "get", { :uid1 => fb_id_1, :uid2 => fb_id_2, :context_id => context_id, :schema => schema } end |
#get(fb_id, key_id, schema = "fb") ⇒ Object
24 25 26 |
# File 'lib/whit_li/client.rb', line 24 def get fb_id, key_id, schema = "fb" api_call "key/get", "get", { :uid => fb_id, :key_id => key_id, :schema => schema } end |
#import_generic(request_body) ⇒ Object
20 21 22 |
# File 'lib/whit_li/client.rb', line 20 def import_generic request_body api_call "user/importGeneric", "put", { :RequestBody => request_body } end |
#import_token(fb_id, token) ⇒ Object
12 13 14 |
# File 'lib/whit_li/client.rb', line 12 def import_token fb_id, token api_call "user/importToken", "post", { :uid => fb_id, :oauth_token => token } end |
#populate(fb_id) ⇒ Object
16 17 18 |
# File 'lib/whit_li/client.rb', line 16 def populate fb_id api_call "user/populate", "get", { :uid => fb_id } end |