Class: ThreeSixty::Core::Account
- Inherits:
-
Object
- Object
- ThreeSixty::Core::Account
- Defined in:
- lib/three-sixty/core/account.rb
Direct Known Subclasses
Constant Summary collapse
- SERVICE_URL =
'account'
Instance Method Summary collapse
- #client_login(username, password) ⇒ Object
- #get_all_objects(campaign_ids) ⇒ Object
- #get_campaign_id_list ⇒ Object
- #get_exclude_ip ⇒ Object
- #get_file_state(file_id) ⇒ Object
- #get_info ⇒ Object
-
#initialize(client) ⇒ Account
constructor
A new instance of Account.
Constructor Details
#initialize(client) ⇒ Account
Returns a new instance of Account.
7 8 9 |
# File 'lib/three-sixty/core/account.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#client_login(username, password) ⇒ Object
11 12 13 |
# File 'lib/three-sixty/core/account.rb', line 11 def client_login(username, password) @client.request(resource_url("clientLogin"), username: username, passwd: password) end |
#get_all_objects(campaign_ids) ⇒ Object
23 24 25 |
# File 'lib/three-sixty/core/account.rb', line 23 def get_all_objects(campaign_ids) @client.request(resource_url("getAllObjects"), idList: campaign_ids) end |
#get_campaign_id_list ⇒ Object
15 16 17 |
# File 'lib/three-sixty/core/account.rb', line 15 def get_campaign_id_list @client.request(resource_url("getCampaignIdList")) end |
#get_exclude_ip ⇒ Object
31 32 33 |
# File 'lib/three-sixty/core/account.rb', line 31 def get_exclude_ip @client.request(resource_url("getExcludeIp")) end |
#get_file_state(file_id) ⇒ Object
27 28 29 |
# File 'lib/three-sixty/core/account.rb', line 27 def get_file_state(file_id) @client.request(resource_url("getFileState"), fileId: file_id) end |
#get_info ⇒ Object
19 20 21 |
# File 'lib/three-sixty/core/account.rb', line 19 def get_info @client.request(resource_url("getInfo")) end |