public AlgoResponse pipe ( Object input ) throws APIException { if ( input instanceof String ) { return pipeRequest ( ( String ) input , ContentType . Text ) ; } else if ( input instanceof byte [ ] ) { return pipeBinaryRequest ( ( byte [ ] ) input ) ; } else { return pipeRequest ( gson . toJsonTree ( input ) . toString ( ) , ContentType . Json ) ; } }
Calls the Algorithmia API for a given input . Attempts to automatically serialize the input to JSON .