public Iterable < BoxItem . Info > getChildren ( String sort , SortDirection direction , final String ... fields ) { QueryStringBuilder builder = new QueryStringBuilder ( ) . appendParam ( "sort" , sort ) . appendParam ( "direction" , direction . toString ( ) ) ; if ( fields . length > 0 ) { builder . appendParam ( "fields" , fields ) . toString ( ) ; } final String query = builder . toString ( ) ; return new Iterable < BoxItem . Info > ( ) { @ Override public Iterator < BoxItem . Info > iterator ( ) { URL url = GET_ITEMS_URL . buildWithQuery ( getAPI ( ) . getBaseURL ( ) , query , getID ( ) ) ; return new BoxItemIterator ( getAPI ( ) , url ) ; } } ; }
Returns an iterable containing the items in this folder sorted by name and direction .