Class: PPC::Operation::Keyword

Inherits:
Object
  • Object
show all
Includes:
PPC::Operation
Defined in:
lib/ppc/operation/keyword.rb

Instance Attribute Summary

Attributes included from PPC::Operation

#id

Instance Method Summary collapse

Methods included from PPC::Operation

#call, #download, #get_obj, #initialize, #qihu_refresh_token

Instance Method Details

#activateObject

Todo: Implement Activate method in Sogou API



16
17
18
# File 'lib/ppc/operation/keyword.rb', line 16

def activate()
  call( 'keyword' ).activate( @auth, @id )
end

#delete(ids = nil) ⇒ Object



28
29
30
31
# File 'lib/ppc/operation/keyword.rb', line 28

def delete( ids = nil )
  ids ||= @id
  call( 'keyword' ).delete( @auth, ids )
end

#infoObject



6
7
8
# File 'lib/ppc/operation/keyword.rb', line 6

def info()
  call( 'keyword' ).get( @auth, @id )
end

#qualityObject



24
25
26
# File 'lib/ppc/operation/keyword.rb', line 24

def quality()
  call( 'keyword' ).quality( @auth, @id )
end

#statusObject



20
21
22
# File 'lib/ppc/operation/keyword.rb', line 20

def status()
  call( 'keyword' ).status( @auth, @id )
end

#update(type) ⇒ Object



10
11
12
13
# File 'lib/ppc/operation/keyword.rb', line 10

def update( type )
  type.merge(id: @id) if type.is_a? Hash
  call( 'keyword' ).update( @auth, type )
end