new DataSources(baseURL, appID, appKey)
Parameters:
Name |
Type |
Description |
baseURL |
string
|
URL for the Open PHACTS API |
appID |
string
|
Application ID for the application being used. Created by https://dev.openphacts.org |
appKey |
string
|
Application Key for the application ID. |
- Author:
-
- License:
- Source:
Methods
getSources(callback)
Fetch a list of data sources used in the Open PHACTS linked data cache.
Parameters:
Name |
Type |
Description |
callback |
requestCallback
|
Function that will be called with success, status, and JSON response values. |
- Source:
Example
var datasources = new DataSources("https://beta.openphacts.org/2.1", appID, appKey);
var callback = function(success, status, response) {
var subsets = response.primaryTopic.subset;
for (i=0; subsets.length; i++) {
console.log("Subset: " + subsets[i].title);
}
};
datasources.getSources(callback);