Class

DigitalGob

DigitalGob(apiKey)

DigitalGob Class Represents a client for interacting with the Dominican's Developer API Platform.
Constructor

# new DigitalGob(apiKey)

Create an instance of DGCPApi service.
Parameters:
Name Type Description
apiKey string The API key for authentication.

View Source services/gob.do/digital.js, line 12

Extends

  • FetchService

Methods

# getApiById(id) → {Promise}

Get API by ID.
Parameters:
Name Type Description
id string The ID of the API.

View Source services/gob.do/digital.js, line 57

A promise that resolves to the API data.
Promise
Example
// Example: Retrieve API by ID from https://developer.digital.gob.do
async function getAPI() {
    try {
      const id = "ff9ce928-e16e-4ea9-9ce9-28e16e1ea96e";
      const apiInfo = await aletheiaSDK.opendata.gob('digital').getApisById(id);
      console.log('Develper API:', apiInfo);
    } catch (error) {
      console.error('Error retrieving developer api:', error);
    }
}

# getApis() → {Promise}

Get API list.

View Source services/gob.do/digital.js, line 36

A promise that resolves to the total of API on the platform.
Promise
Example
// Example: Retrieve APIs info from https://developer.digital.gob.do
async function getAPIs() {
    try {
      const apisList = await aletheiaSDK.opendata.gob('digital').getApis();
      console.log('Develper APIs:', apisList);
    } catch (error) {
      console.error('Error retrieving developer apis:', error);
    }
}