lib/postini/automated_batch_service.rb
# Return a list of users, possibly filtered and sorted. Refer to
# the Postini Automated Batch Service Manual for an explanation of
# each field.
#
# Possible options are:
#
# :aliases => boolean
# :childorgs => boolean
# :start => integer
# :end => integer
# :fields => array (strings)
# :orgtagqs => string
# :primaryqs => string
# :targetOrg => string
# :type_of_user => string
#
# The call returns a giant hash, keys are the addresses returned
# by the operation, and the values are hashes of key-value pairs
# are returned by the remote service.
Return a list of users, possibly filtered and sorted. Refer to
the Postini Automated Batch Service Manual for an explanation of
each field.

Possible options are.



The call returns a giant hash, keys are the addresses returned
by the operation, and the values are hashes of key-value pairs
are returned by the remote service.
Return a list of users possibly filtered and sorted . Refer to the Postini Automated Batch Service Manual for an explanation of each field . Possible options are . The call returns a giant hash keys are the addresses returned by the operation and the values are hashes of key - value pairs are returned by the remote service .
def list_users( query_string = 'ALL', options = {} )
      valid_options = {}
      [ :start, :end, :orgtagqs, :primaryqs, :targetOrg, :type_of_user ].each do |k|
        valid_options[k] = options[k] if options.has_key?(k)
      end
      [ :aliases, :childorgs ].each do |k|
        if options.has_key?(k)
          valid_options[k] = ( options[k] == true ? '1' : '0' )
        end
      end
      valid_options[:fields] = options[:fields].join('|') if options.has_key?(:fields)
      response = invoke("aut:listusers") do |message|
        build_auth!( message )
        message.add('queryString', query_string)
        message.add('queryParams') do |q|
          valid_options.each do |k,v|
            q.add( k.to_s, v )
          end
        end
      end
      parse_list_users_results( response.document.xpath('//tns:listusersResponse', tns).first )
    end
def list_users ( query_string = 'ALL' , options = { } ) valid_options = { } [ :start , :end , :orgtagqs , :primaryqs , :targetOrg , :type_of_user ] . each do | k | valid_options [ k ] = options [ k ] if options . has_key? ( k ) end [ :aliases , :childorgs ] . each do | k | if options . has_key? ( k ) valid_options [ k ] = ( options [ k ] == true ? '1' : '0' ) end end valid_options [ :fields ] = options [ :fields ] . join ( '|' ) if options . has_key? ( :fields ) response = invoke ( "aut:listusers" ) do | message | build_auth! ( message ) message . add ( 'queryString' , query_string ) message . add ( 'queryParams' ) do | q | valid_options . each do | k , v | q . add ( k . to_s , v ) end end end parse_list_users_results ( response . document . xpath ( '//tns:listusersResponse' , tns ) . first ) end
Return a list of users, possibly filtered and sorted.
Return a list of users possibly filtered and sorted .
# vanilla copies # boolean copies
query_string
<not_specific>
options
<not_specific>