Class: PPC::API::Baidu::Account
- Inherits:
-
PPC::API::Baidu
- Object
- PPC::API::Baidu
- PPC::API::Baidu::Account
- Defined in:
- lib/ppc/api/baidu/account.rb
Constant Summary collapse
- Service =
'Account'
Class Method Summary collapse
Methods inherited from PPC::API::Baidu
debug_off, debug_on, process, request, request_uri, 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
26 27 28 29 |
# File 'lib/ppc/api/baidu/account.rb', line 26 def self.info( auth ) response = request(auth,Service,'getAccountInfo' ) return process( response, 'accountInfoType' ){ |x|reverse_type(x)[0] } end |
.update(auth, param = {}) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ppc/api/baidu/account.rb', line 31 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) return process( response, 'accountInfoType' ){ |x|reverse_type(x)[0] } end |