lincd-quora-ads
Version:
An API wrapper for Quora's Ads API.
57 lines • 2.79 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.qads = exports.exampleProperty = exports.QuoraAPI = exports._self = exports.ns = exports.loadData = void 0;
const JSONLD_1 = require("lincd-jsonld/lib/utils/JSONLD");
const NameSpace_1 = require("lincd/lib/utils/NameSpace");
const package_1 = require("../package");
//import all the exports of this file as one variable called _this (we need this at the end)
const _this = __importStar(require("./qads"));
/**
* Load the data of this ontology into memory, thus adding the properties of the entities of this ontology to the local graph.
*/
var loadData = () => {
return Promise.resolve().then(() => __importStar(require("../data/qads.json"))).then((data) => JSONLD_1.JSONLD.parse(data));
};
exports.loadData = loadData;
/**
* The namespace of this ontology, which can be used to create NamedNodes with URI's not listed in this file
*/
exports.ns = (0, NameSpace_1.createNameSpace)("http://www.lincd.org/quora-ads#");
/**
* The NamedNode of the ontology itself
*/
exports._self = (0, exports.ns)("");
//A list of all the entities (Classes & Properties) of this ontology, each exported as a NamedNode
exports.QuoraAPI = (0, exports.ns)("QuoraAPI");
exports.exampleProperty = (0, exports.ns)("exampleProperty");
//An extra grouping object so all the entities can be accessed from the prefix/name
exports.qads = {
QuoraAPI: exports.QuoraAPI,
exampleProperty: exports.exampleProperty,
};
//Registers this ontology to LINCD.JS, so that data loading can be automated amongst other things
(0, package_1.linkedOntology)(_this, exports.ns, "qads", exports.loadData, "../data/qads.json");
//# sourceMappingURL=qads.js.map