How to use the @cumulus/cmrjs/utils.getUrl function in @cumulus/cmrjs

To help you get started, we’ve selected a few @cumulus/cmrjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nasa / cumulus / packages / integration-tests / cmr.js View on Github external
async function getOnlineResources({ cmrMetadataFormat, cmrConceptId, cmrLink }) {
  if (cmrMetadataFormat === 'echo10') {
    return getOnlineResourcesECHO10(cmrLink);
  }
  if (isUMMGMetadataFormat(cmrMetadataFormat)) {
    return getOnlineResourcesUMMG(`${getUrl('search')}granules.umm_json?concept_id=${cmrConceptId}`);
  }
  throw new Error(`Invalid cmrMetadataFormat passed to getOnlineResources: ${cmrMetadataFormat}}`);
}