Class: ThreeSixty::Core::Keyword

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

Direct Known Subclasses

Keyword

Constant Summary collapse

SERVICE_URL =
'keyword'

Instance Method Summary collapse

Methods included from Client

#client_request

Constructor Details

#initialize(client) ⇒ Keyword

Returns a new instance of Keyword.



10
11
12
# File 'lib/three-sixty/core/keyword.rb', line 10

def initialize(client)
  @client = client
end

Instance Method Details

#get_changed_id_list(from_time) ⇒ Object



31
32
33
# File 'lib/three-sixty/core/keyword.rb', line 31

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

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



14
15
16
17
# File 'lib/three-sixty/core/keyword.rb', line 14

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

#get_info_by_id(keyword_id) ⇒ Object



19
20
21
# File 'lib/three-sixty/core/keyword.rb', line 19

def get_info_by_id(keyword_id)
  client_request(@client, resource_url("getInfoById"), id: keyword_id)
end

#get_info_by_id_list(keyword_ids) ⇒ Object



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

def get_info_by_id_list(keyword_ids)
  client_request(@client, resource_url("getInfoByIdList"), idList: keyword_ids)
end

#get_status_by_id_list(keyword_ids) ⇒ Object



23
24
25
# File 'lib/three-sixty/core/keyword.rb', line 23

def get_status_by_id_list(keyword_ids)
  client_request(@client, resource_url("getStatusByIdList"), idList: keyword_ids)
end