Class: PPC::Operation::Group
Instance Attribute Summary
#id
Instance Method Summary
collapse
#method_missing
#method_missing
#method_missing
#call, #download, #initialize, #method_missing, #qihu_refresh_token
Instance Method Details
#add_creative(creatives) ⇒ Object
44
45
46
|
# File 'lib/ppc/operation/group.rb', line 44
def add_creative( creatives )
call( "creative" ).add( @auth, creatives.map{|creative| creative.merge(group_id: @id)} )
end
|
#add_keyword(keywords) ⇒ Object
Overwrite add method to provide more function
40
41
42
|
# File 'lib/ppc/operation/group.rb', line 40
def add_keyword( keywords )
call( "keyword" ).add( @auth, keywords.map{|keyword| keyword.merge(group_id: @id)} )
end
|
#creative_ids ⇒ Object
18
19
20
|
# File 'lib/ppc/operation/group.rb', line 18
def creative_ids
call( "creative" ).ids( @auth, [@id].flatten )
end
|
#creatives ⇒ Object
14
15
16
|
# File 'lib/ppc/operation/group.rb', line 14
def creatives
call( "creative" ).all( @auth, [@id].flatten )
end
|
#keyword_ids ⇒ Object
10
11
12
|
# File 'lib/ppc/operation/group.rb', line 10
def keyword_ids
call( "keyword" ).ids( @auth, [@id].flatten )
end
|
#keywords ⇒ Object
6
7
8
|
# File 'lib/ppc/operation/group.rb', line 6
def keywords
call( "keyword" ).all( @auth, [@id].flatten )
end
|
#search_keyword(keyword) ⇒ Object
48
49
50
|
# File 'lib/ppc/operation/group.rb', line 48
def search_keyword( keyword )
call( "keyword" ).search( @auth, {group_id: @id, keyword: keyword})
end
|
#sublink_ids ⇒ Object
26
27
28
|
# File 'lib/ppc/operation/group.rb', line 26
def sublink_ids
call( "sublink" ).ids( @auth, [@id].flatten )
end
|
#sublinks ⇒ Object
22
23
24
|
# File 'lib/ppc/operation/group.rb', line 22
def sublinks
call( "sublink" ).all( @auth, [@id].flatten )
end
|