def _api_queue_default(output, value, kwargs):
 sort = kwargs.get('sort')
 direction = kwargs.get('dir', '')
 start = int_conv(kwargs.get('start'))
 limit = int_conv(kwargs.get('limit'))
 trans = kwargs.get('trans')
 search = kwargs.get('search')
 if (output in ('xml', 'json')):
  if (sort and (sort != 'index')):
   reverse = (direction.lower() == 'desc')
   sort_queue(sort, reverse)
  (info, pnfo_list, bytespersec) = build_queue(start=start, limit=limit, output=output, trans=trans, search=search)
  info['categories'] = info.pop('cat_list')
  info['scripts'] = info.pop('script_list')
  return report(output, keyword='queue', data=remove_callable(info))
 elif (output == 'rss'):
  return rss_qstatus()
 else:
  return report(output, _MSG_NOT_IMPLEMENTED)

def _api_queue_default ( output , value , kwargs ) : sort = kwargs . get ( 'sort' ) direction = kwargs . get ( 'dir' , '' ) start = int_conv ( kwargs . get ( 'start' ) ) limit = int_conv ( kwargs . get ( 'limit' ) ) trans = kwargs . get ( 'trans' ) search = kwargs . get ( 'search' ) if ( output in ( 'xml' , 'json' ) ) : if ( sort and ( sort != 'index' ) ) : reverse = ( direction . lower ( ) == 'desc' ) sort_queue ( sort , reverse ) ( info , pnfo_list , bytespersec ) = build_queue ( start = start , limit = limit , output = output , trans = trans , search = search ) info [ 'categories' ] = info . pop ( 'cat_list' ) info [ 'scripts' ] = info . pop ( 'script_list' ) return report ( output , keyword = 'queue' , data = remove_callable ( info ) ) elif ( output == 'rss' ) : return rss_qstatus ( ) else : return report ( output , _MSG_NOT_IMPLEMENTED )
api: accepts output .