Constructor
new FileTypes(data)
Creates a new FileTypes object from an API-compatible JSON response.
Parameters:
Name | Type | Description |
---|---|---|
data |
FileTypesAPI | A capabilities response compatible to the API specification for |
- Source:
Members
data :FileTypesAPI
Type:
- Source:
Methods
(protected) _findType(type, io) → {FileType|null}
Get a file type object from the list of input or output file formats.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Identifier of the file type |
io |
string | Either |
- Source:
Returns:
- Type
- FileType | null
getInputType(type) → {FileType|null}
Returns a single input file format for a given identifier.
Returns null if no input file format was found for the given identifier.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Case-insensitive file format identifier |
- Source:
Returns:
- Type
- FileType | null
getInputTypes() → {object.<string, FileType>}
Returns the input file formats.
- Source:
Returns:
- Type
- object.<string, FileType>
getOutputType(type) → {FileType|null}
Returns a single output file format for a given identifier.
Returns null if no output file format was found for the given identifier.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | Case-insensitive file format identifier |
- Source:
Returns:
- Type
- FileType | null
getOutputTypes() → {object.<string, FileType>}
Returns the output file formats.
- Source:
Returns:
- Type
- object.<string, FileType>
toJSON() → {FileTypesAPI}
Returns the file types response as a JSON serializable representation of the data that is API compliant.
- Source:
Returns:
- Type
- FileTypesAPI