Class: PPC::API::Sogou::Account
- Inherits:
-
PPC::API::Sogou
- Object
- PPC::API::Sogou
- PPC::API::Sogou::Account
- Defined in:
- lib/ppc/api/sogou/account.rb
Constant Summary collapse
- Service =
'Account'
Class Method Summary collapse
Methods inherited from PPC::API::Sogou
debug_print, process, request, reverse_type
Methods included from PPC::API
#debug_off, #debug_on, #is_no_quota, #make_type, #process, #request, #request_http_body, #request_http_header, #request_uri, #reverse_type
Class Method Details
.info(auth) ⇒ Object
21 22 23 24 |
# File 'lib/ppc/api/sogou/account.rb', line 21 def self.info(auth) response = request(auth,Service,'getAccountInfo' ) process( response, 'accountInfoType' ){ |x|reverse_type(x)[0] } end |
.update(auth, param = {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ppc/api/sogou/account.rb', line 26 def self.update(auth, param = {}) """ update account info @ params : account_info_type @return : account info_type """ # for account service, there is not bulk operation infoType = make_type( param )[0] body = { accountInfoType: infoType } response = request(auth,Service,'updateAccountInfo', body) process( response, 'accountInfoType' ){ |x|reverse_type(x)[0] } end |