From 262af5cd034ebefe2d1218cd9054664749af815a Mon Sep 17 00:00:00 2001 From: Devin Jean Date: Tue, 9 Apr 2024 15:26:05 -0500 Subject: [PATCH] add audio type --- src/input-types.js | 7 ++++++- src/procedures/global-biodiversity/global-biodiversity.js | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/input-types.js b/src/input-types.js index 0bcbc8aa..a676003d 100644 --- a/src/input-types.js +++ b/src/input-types.js @@ -472,12 +472,17 @@ defineType({ }); // in the future, this should have a useful parser of some kind -// not an issue for now since only 1 RPC takes images as input defineType({ name: "Image", description: "Any image", baseType: "Any", }); +// in the future, this should have a useful parser of some kind +defineType({ + name: "Audio", + description: "Any audio clip", + baseType: "Any", +}); defineType({ name: "BoundedNumber", diff --git a/src/procedures/global-biodiversity/global-biodiversity.js b/src/procedures/global-biodiversity/global-biodiversity.js index fa92a1dd..08628129 100644 --- a/src/procedures/global-biodiversity/global-biodiversity.js +++ b/src/procedures/global-biodiversity/global-biodiversity.js @@ -211,6 +211,9 @@ GBIF.getImage = async function (url) { /** * Get a sound from a sound URL returned by :func:`GlobalBiodiversity.getMediaURLs`. + * + * @param {String} url URL of the sound to load + * @returns {Audio} the downloaded image */ GBIF.getSound = async function (url) { const data = await this._requestData({ baseUrl: url });