Skip to content

Commit

Permalink
fix(api): change JSDocs mediaType param to reflect code (#72)
Browse files Browse the repository at this point in the history
* Option object key name mediaType -> mediaTypes
* MediaType is an object, not String
  • Loading branch information
PaulHax authored Aug 10, 2023
1 parent 4cff356 commit 6d6ae85
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1338,14 +1338,20 @@ class DICOMwebClient {
);
}

/**
* Element in mediaTypes parameter
* @typedef {Object} MediaType
* @param {String} [MediaType.mediaType] - ie 'image/jpeg', 'image/png'...
*/

/**
* Retrieves an individual, server-side rendered DICOM Instance.
*
* @param {Object} options
* @param {String} options.studyInstanceUID - Study Instance UID
* @param {String} options.seriesInstanceUID - Series Instance UID
* @param {String} options.sopInstanceUID - SOP Instance UID
* @param {String[]} [options.mediaType] - Acceptable HTTP media types
* @param {MediaType[]} [options.mediaTypes] - Acceptable HTTP media types
* @param {Object} [options.queryParams] - HTTP query parameters
* @returns {Promise<ArrayBuffer>} Rendered DICOM Instance
*/
Expand Down Expand Up @@ -1446,7 +1452,7 @@ class DICOMwebClient {
* @param {String} options.studyInstanceUID - Study Instance UID
* @param {String} options.seriesInstanceUID - Series Instance UID
* @param {String} options.sopInstanceUID - SOP Instance UID
* @param {String[]} [options.mediaType] - Acceptable HTTP media types
* @param {MediaType[]} [options.mediaTypes] - Acceptable HTTP media types
* @param {Object} [options.queryParams] - HTTP query parameters
* @returns {ArrayBuffer} Thumbnail
*/
Expand Down Expand Up @@ -1522,7 +1528,7 @@ class DICOMwebClient {
* @param {String} options.seriesInstanceUID - Series Instance UID
* @param {String} options.sopInstanceUID - SOP Instance UID
* @param {String} options.frameNumbers - One-based indices of Frame Items
* @param {String[]} [options.mediaType] - Acceptable HTTP media types
* @param {MediaType[]} [options.mediaTypes] - Acceptable HTTP media types
* @param {Object} [options.queryParams] - HTTP query parameters
* @returns {ArrayBuffer[]} Rendered Frame Items as byte arrays
*/
Expand Down

0 comments on commit 6d6ae85

Please sign in to comment.