Page MenuHomeSealhub

node_modules_prometheus-resource_prometheus-resource.js.html
No OneTemporary

node_modules_prometheus-resource_prometheus-resource.js.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: node_modules/prometheus-resource/prometheus-resource.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: node_modules/prometheus-resource/prometheus-resource.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* Represents a particular resource in database. Constructed by database entry.
* @class
* @param {object} database_entry
*/
function Resource(database_entry){
this.database_entry = database_entry;
}
Resource.prototype = new function(){
/**
* Returns an object representing the resource, ready to be output for the public, e.g. as JSON
* @alias Resource#getData
* @return {object}
*/
this.getData = function(){
var response = this.database_entry.body;
response.id = this.database_entry.prometheus_id;
return response;
}
/**
* Encodes Resource's data into JSON
* @alias Resource#toString
* @return {string} contains the json-encoded data
*/
this.toString = function(){
return JSON.stringify(this.getData);
}
}
module.exports = Resource;</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-database-accessor.html">database-accessor</a></li><li><a href="module-field-type-manager.html">field-type-manager</a></li><li><a href="module-resource-type-manager.html">resource-type-manager</a></li></ul><h3>Classes</h3><ul><li><a href="AssociationInterface.html">AssociationInterface</a></li><li><a href="field-type-manager-Association.html">Association</a></li><li><a href="FieldType.html">FieldType</a></li><li><a href="Resource.html">Resource</a></li><li><a href="ResourceManager.html">ResourceManager</a></li><li><a href="ResourceType.html">ResourceType</a></li><li><a href="ResourceTypeField.html">ResourceTypeField</a></li></ul><h3>Global</h3><ul><li><a href="global.html#construct_resource_type">construct_resource_type</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha11</a> on Mon Dec 08 2014 13:12:25 GMT+0100 (CET)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>

File Metadata

Mime Type
text/html
Expires
Wed, Aug 13, 18:08 (4 m, 53 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
872139
Default Alt Text
node_modules_prometheus-resource_prometheus-resource.js.html (2 KB)

Event Timeline