node-clima
Version:
Simple wrapper for OpenWeatherMap API
76 lines (57 loc) • 1.82 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: clima.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: clima.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function checkOptions(option, type) {
if (typeof option !== type) {
throw new Error(`invalid ${option} passed to constructor.`);
}
}
/**
* Create a new Clima instances
* @class
* @param {String} apiKey - Contains your API KEY
* @param {Object} client - Contains a instance client
*
*/
class Clima {
constructor(apiKey, client) {
this.url = 'http://api.openweathermap.org/data/2.5/weather?';
checkOptions(apiKey, 'string');
checkOptions(client, 'object');
this.client = client;
this.apiKey = apiKey;
}
}
exports.Clima = Clima;
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Clima.html">Clima</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Sun Dec 08 2019 23:48:38 GMT+0100 (GMT+01:00)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>