Class: ThreeSixty::Core::Creative

Inherits:
Object
  • Object
show all
Defined in:
lib/three-sixty/core/creative.rb

Direct Known Subclasses

ThreeSixty::Creative

Constant Summary collapse

SERVICE_URL =
'creative'

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Creative

Returns a new instance of Creative.



7
8
9
# File 'lib/three-sixty/core/creative.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#get_changed_id_list(from_time) ⇒ Object



28
29
30
# File 'lib/three-sixty/core/creative.rb', line 28

def get_changed_id_list(from_time)
  @client.request(resource_url("getChangedIdList"), fromTime: from_time)
end

#get_id_list_by_group_id(ad_group_id, opts = {}) ⇒ Object



11
12
13
14
# File 'lib/three-sixty/core/creative.rb', line 11

def get_id_list_by_group_id(ad_group_id, opts = {})
  opts.merge!(groupId: ad_group_id)
  @client.request(resource_url("getIdListByGroupId"), opts)
end

#get_info_by_id(creative_id) ⇒ Object



16
17
18
# File 'lib/three-sixty/core/creative.rb', line 16

def get_info_by_id(creative_id)
  @client.request(resource_url("getInfoById"), id: creative_id)
end

#get_info_by_id_list(creative_ids) ⇒ Object



20
21
22
# File 'lib/three-sixty/core/creative.rb', line 20

def get_info_by_id_list(creative_ids)
  @client.request(resource_url("getInfoByIdList"), idList: creative_ids)
end

#get_status_by_id_list(creative_ids) ⇒ Object



24
25
26
# File 'lib/three-sixty/core/creative.rb', line 24

def get_status_by_id_list(creative_ids)
  @client.request(resource_url("getStatusByIdList"), idList: creative_ids)
end