public BitsoFunding [ ] getFundings ( String [ ] fundingssIds , String ... queryParameters ) throws BitsoAPIException , BitsoPayloadException , BitsoServerException { String request = "/api/v3/fundings" ; if ( ( fundingssIds != null && ( queryParameters != null && queryParameters . length > 0 ) ) ) { return null ; } if ( fundingssIds != null ) { String fundingssIdsParameters = processQueryParameters ( "-" , fundingssIds ) ; request += ( ( fundingssIdsParameters != null ) ? "/" + fundingssIdsParameters : "" ) ; } if ( queryParameters != null && queryParameters . length > 0 ) { String parsedQueryParametes = processQueryParameters ( "&" , queryParameters ) ; request += ( ( parsedQueryParametes != null ) ? "?" + parsedQueryParametes : "" ) ; } String getResponse = sendBitsoGet ( request ) ; JSONArray payloadJSON = ( JSONArray ) getJSONPayload ( getResponse ) ; int totalElements = payloadJSON . length ( ) ; BitsoFunding [ ] fundings = new BitsoFunding [ totalElements ] ; for ( int i = 0 ; i < totalElements ; i ++ ) { fundings [ i ] = new BitsoFunding ( payloadJSON . getJSONObject ( i ) ) ; } return fundings ; }
The request needs fundingssIds or queryParameters not both . In case both parameters are provided null will be returned