def _api_switch(name, output, kwargs):
 value = kwargs.get('value')
 value2 = kwargs.get('value2')
 if (value and value2):
  (pos, prio) = NzbQueue.do.switch(value, value2)
  if (output not in ('xml', 'json')):
   return report(output, data=(pos, prio))
  else:
   return report(output, keyword='result', data={'position': pos, 'priority': prio})
 else:
  return report(output, _MSG_NO_VALUE2)

def _api_switch ( name , output , kwargs ) : value = kwargs . get ( 'value' ) value2 = kwargs . get ( 'value2' ) if ( value and value2 ) : ( pos , prio ) = NzbQueue . do . switch ( value , value2 ) if ( output not in ( 'xml' , 'json' ) ) : return report ( output , data = ( pos , prio ) ) else : return report ( output , keyword = 'result' , data = { 'position' : pos , 'priority' : prio } ) else : return report ( output , _MSG_NO_VALUE2 )
api: accepts output .