Class: ThreeSixty::Core::Account
- Inherits:
-
Object
- Object
- ThreeSixty::Core::Account
- Includes:
- Client
- 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.
Methods included from Client
Constructor Details
#initialize(client) ⇒ Account
Returns a new instance of Account.
10 11 12 |
# File 'lib/three-sixty/core/account.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#client_login(username, password) ⇒ Object
14 15 16 |
# File 'lib/three-sixty/core/account.rb', line 14 def client_login(username, password) client_request(@client, resource_url("clientLogin"), username: username, passwd: password) end |
#get_all_objects(campaign_ids) ⇒ Object
26 27 28 |
# File 'lib/three-sixty/core/account.rb', line 26 def get_all_objects(campaign_ids) client_request(@client, resource_url("getAllObjects"), idList: campaign_ids) end |
#get_campaign_id_list ⇒ Object
18 19 20 |
# File 'lib/three-sixty/core/account.rb', line 18 def get_campaign_id_list client_request(@client, resource_url("getCampaignIdList")) end |
#get_exclude_ip ⇒ Object
34 35 36 |
# File 'lib/three-sixty/core/account.rb', line 34 def get_exclude_ip client_request(@client, resource_url("getExcludeIp")) end |
#get_file_state(file_id) ⇒ Object
30 31 32 |
# File 'lib/three-sixty/core/account.rb', line 30 def get_file_state(file_id) client_request(@client, resource_url("getFileState"), fileId: file_id) end |
#get_info ⇒ Object
22 23 24 |
# File 'lib/three-sixty/core/account.rb', line 22 def get_info client_request(@client, resource_url("getInfo")) end |