Class: ThreeSixty::Keyword

Inherits:
Core::Keyword show all
Defined in:
lib/three-sixty/keyword.rb

Constant Summary

Constants inherited from Core::Keyword

Core::Keyword::SERVICE_URL

Instance Method Summary collapse

Methods inherited from Core::Keyword

#get_changed_id_list, #get_id_list_by_group_id, #get_info_by_id, #get_info_by_id_list, #get_status_by_id_list, #initialize

Methods included from Core::Client

#client_request

Constructor Details

This class inherits a constructor from ThreeSixty::Core::Keyword

Instance Method Details

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



19
20
21
22
23
24
25
26
# File 'lib/three-sixty/keyword.rb', line 19

def download_ad_group_all_keyword_statuses(ad_group_id, opts = {})
  keyword_ids = download_ad_group_keyword_ids(ad_group_id)
  id_list = []
  keyword_ids.each_slice(500) do |ids|
    id_list += get_status_by_id_list(ids)["keywordList"]
  end
  id_list
end

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



10
11
12
13
14
15
16
17
# File 'lib/three-sixty/keyword.rb', line 10

def download_ad_group_all_keywords(ad_group_id, opts = {})
  keyword_ids = download_ad_group_keyword_ids(ad_group_id)
  id_list = []
  keyword_ids.each_slice(500) do |ids|
    id_list += get_info_by_id_list(ids)["keywordList"]
  end
  id_list
end

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



6
7
8
# File 'lib/three-sixty/keyword.rb', line 6

def download_ad_group_keyword_ids(ad_group_id, opts = {})
  get_id_list_by_group_id(ad_group_id, opts)["keywordIdList"]
end

#download_changed_keyword_ids(from_time) ⇒ Object



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

def download_changed_keyword_ids(from_time)
  get_changed_id_list(from_time)["keywordIdList"]
end