Options
All
  • Public
  • Public/Protected
  • All
Menu

An instance of a RDS API server. A basic building block to interact with a RDS API. Includes methods to query server-level information.

example
const covidServer = new RdsServer('https://covid19.richdataservices.com/rds');
covidServer
 .getInfo()
 .then((res: HttpResponse<ServerInformation>) =>
   { console.log('Server info:', res.parsedBody); }
 );

Hierarchy

  • RdsServer

Index

Constructors

constructor

  • Create a new instance of a RDS API Server.

    Parameters

    • url: string

      The full URL to the RDS API, i.e. https://covid19.richdataservices.com/rds

    Returns RdsServer

Properties

Readonly apiUrl

apiUrl: string

The base url to the RDS API, i.e. https://covid19.richdataservices.com/rds

Readonly parsedUrl

parsedUrl: ParsedUrl

The url parsed out into its partials

Accessors

serverUrl

  • get serverUrl(): string

Methods

getCatalog

  • getCatalog(catalogId: string, resolve?: boolean): RdsCatalog
  • Create and get an instance of a RDS Catalog that exists on this RdsServer. This is a convenience method, these two code snippets are equivalent:

    const catalog = new RdsServer('https://covid19.richdataservices.com/rds')
                     .getCatalog('int');

    and

    const server = new RdsServer('https://covid19.richdataservices.com/rds');
    const catalog = new RdsCatalog(server, 'int');

    Parameters

    • catalogId: string

      the ID of the specific catalog

    • Default value resolve: boolean = false

      whether to automatically start resolving all the catalog's own properties, defaults to false

    Returns RdsCatalog

    a new RdsCatalog

getChangelog

  • Get changelog. Shows the change log of RDS providing version information about additions, changes, deprecations, fixed bugs, removals, and security enhancements.

    Returns Promise<HttpResponse<RdsVersion[]>>

    an array of information about each version and the changes between them.

getInfo

getRootCatalog

  • Get the root catalog of the system. This will hold a list of all the catalogs and data products that are available on this server. This would ideally be used to power an entry point into an application. The catalog provides a starting point for users to view what is available to them and drill down into a catalog or data product of their interest. The catalogs and products may have descriptive metadata on them that is useful to display.

    Returns Promise<HttpResponse<Catalog>>

    the root catalog of the RDS server

Static fromUrlParts

  • fromUrlParts(protocol?: string, domain: string, path?: string, port?: string | undefined): RdsServer
  • Factory method for instantiating an RdsServer from the individual url parts.

    example
    const server = RdsServer.fromUrlParts('https://','covid19.richdataservices.com', '/rds');

    Parameters

    • Default value protocol: string = "https"

      The protocol used on the site the RDS API is hosted, defaults to 'https'

    • domain: string

      The domain under which the RDS API is hosted, i.e. 'covid19.richdataservices.com'

    • Default value path: string = "/rds"

      The path where the RDS API is hosted, defaults to '/rds'

    • Optional port: string | undefined

      Optional port where the RDS API is hosted, or undefined if not applicable

    Returns RdsServer

    a new RdsServer

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Protected property
  • Protected method
  • Private property
  • Static method

Generated using TypeDoc