Create a new RdsCatalog which provides methods to interact with catalog-related endpoints on the RDS API.
the RDS API server on which this catalog exists
the ID of this specific catalog
whether to automatically start resolving all the catalog's own properties, defaults to false
the ID of this specific catalog
the RDS API server on which this catalog exists
The url to the RDS API
The url for catalog related API endpoints
Create and get an instance of a RDS Data Product that exists on this RdsCatalog. This is a convenience method, these two code snippets are equivalent:
const dataProduct = new RdsServer('https://covid19.richdataservices.com/rds')
.getCatalog('int')
.getDataProduct('jhu_country');
and
const server = new RdsServer('https://covid19.richdataservices.com/rds');
const catalog = new RdsCatalog(server, 'int');
const dataProduct = new RdsDataProduct(catalog, 'jhu_country');
the ID of the specific data product
whether to automatically start resolving all the data product's own properties, defaults to false
a new RdsDataProduct
Get catalog metadata. This will retrieve the metadata for all of the data products that are in the specified catalog. For each data product there will be a record layout with its variables along with any classifications that are referenced by the variables.
metadata about the specified catalog
whether this resource is resolved
whether this resource is resolving
Register a listener that will emit when this resource has been resolved sucessfully.
the listener for when this resource has been resolved
Resolve this catalog. This allows a more specific view of a catalog and its data products, it is a subset of the root catalog and holds no additional information to what can be found in the broader get catalog endpoint.
a promise that completes once the catalog is resolved
Setter for resolved
.
whether this resource is resolved
Setter for resolving
.
whether the resource is resolving
Generated using TypeDoc
An instance of a RDS Catalog. A basic building block to interact with a RDS API. Includes methods to query catalog related information.
const covidServer = new RdsServer('https://covid19.richdataservices.com/rds'); const covidCatalog = new RdsCatalog(covidServer, 'int'); covidCatalog .getMetadata() .then( res => console.log('Catalog metadata:', res.parsedBody), error => console.error('Oh no!', error) );