Constructor
new OpenSearchDescription(values)
Create an OpenSearchDescription object
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
values |
object | The object containing the parsed description
Properties
|
- Source:
Methods
(static) deserialize(values) → {OpenSearchDescription}
Deserialize an OpenSearch description from an object.
Parameters:
Name | Type | Description |
---|---|---|
values |
object | The serialized description |
- Source:
Returns:
The deserialized description
(static) fromXml(xml) → {OpenSearchDescription}
Parse an OpenSearch Description XML Document.
Parameters:
Name | Type | Description |
---|---|---|
xml |
string | The XML String to parse. |
- Source:
Returns:
The parsed description document
getUrl(parametersopt, typeopt, methodopt) → {OpenSearchUrl|null}
Get the OpenSearchUrl for the given parameters, mime type and HTTP
method. Return the first matching URL or null.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
parameters |
object |
<optional> |
null | An object containing search parameters |
type |
string |
<optional> |
null | The mime-type for the URL |
method |
string |
<optional> |
'GET' | The preferred HTTP method of the URL |
- Source:
Returns:
- Type
- OpenSearchUrl | null
getUrls(parametersopt, typeopt, methodopt) → {Array.<OpenSearchUrl>}
Get an array of OpenSearchUrl for the given parameters, mime type and HTTP
method.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
parameters |
object |
<optional> |
null | An object containing search parameters |
type |
string | Array |
<optional> |
null | The mime-type for the URL |
method |
string | Array |
<optional> |
null | The preferred HTTP method of the URL |
- Source:
Returns:
- Type
- Array.<OpenSearchUrl>
serialize() → {object}
Serialize the OpenSearch description to a simple object.
- Source:
Returns:
The serialized description
- Type
- object