Skip to content

Commit

Permalink
add audio type
Browse files Browse the repository at this point in the history
  • Loading branch information
dragazo committed Apr 9, 2024
1 parent 8f416f7 commit 262af5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/input-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/procedures/global-biodiversity/global-biodiversity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 262af5c

Please sign in to comment.