Class: MessageQuickly::Api::AccountLink
- Inherits:
-
Base
- Object
- Base
- MessageQuickly::Api::AccountLink
show all
- Defined in:
- lib/message_quickly/api/account_link.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
client, #initialize
Class Method Details
.page_scoped_id(account_linking_token) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/message_quickly/api/account_link.rb', line 5
def self.page_scoped_id(account_linking_token)
AccountLink.new.page_scoped_id(account_linking_token)
end
|
.unlink_account(page_scoped_id) ⇒ Object
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/message_quickly/api/account_link.rb', line 22
def self.unlink_account(page_scoped_id)
AccountLink.new.unlink_account(page_scoped_id)
end
|
Instance Method Details
#page_scoped_id(account_linking_token) ⇒ Object
17
18
19
20
|
# File 'lib/message_quickly/api/account_link.rb', line 17
def page_scoped_id(account_linking_token)
json = @client.get("me", { fields: 'recipient', account_linking_token: account_linking_token })
json['recipient']
end
|
#unlink_account(page_scoped_id) ⇒ Object
33
34
35
36
|
# File 'lib/message_quickly/api/account_link.rb', line 33
def unlink_account(page_scoped_id)
json = @client.post("me/unlink_accounts", { psid: page_scoped_id })
json['result'] == "unlink account success"
end
|