public final class HtmlApi
extends java.lang.Object
final JEditorPane html; try { html = HtmlApi.call("what flights are overhead?", new DefaultCommonParameters().setAppId("DEMO")); } catch (SimpleAPIException e) { // error handling }
CommonParameters
,
DefaultCommonParameters
Modifier and Type | Method and Description |
---|---|
static javax.swing.JEditorPane |
call(java.lang.String input,
CommonParameters parameters)
Calls the Wolfram|Alpha HTML API for the given input and parameters.
|
public static javax.swing.JEditorPane call(java.lang.String input, CommonParameters parameters) throws SimpleApiException
JEditorPane
containing an image of each pod.
A JEditorPane
should normally be used from the event dispatch thread.
However, this method need not be -- and, because it involves external communication,
should not be -- invoked from the event dispatch thread.
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.