public final class ImageApi
extends java.lang.Object
final Image image; try { image = ImageApi.call("what flights are overhead?", new DefaultImageParameters().setAppId("DEMO")); } catch (SimpleAPIException e) { // error handling }
ImageParameters
,
DefaultImageParameters
Modifier and Type | Method and Description |
---|---|
static java.awt.Image |
call(java.lang.String input,
ImageParameters parameters)
Calls the Wolfram|Alpha image API for the given input and parameters.
|
public static java.awt.Image call(java.lang.String input, ImageParameters parameters) throws SimpleApiException
input
- the input, which must not be null
or empty.parameters
- the parameters.SimpleApiException
- if an error occurs during the request.ApiConnectionException
- if an error occurs while connecting or during the connection
to the Wolfram|Alpha server.NoApiResultException
- if Wolfram|Alpha could not produce a result.