chore: mark version v1.6.0

This commit is contained in:
Pedro Lopez
2020-05-24 00:57:54 -04:00
parent a80fcfa740
commit c032ea4387
33 changed files with 580 additions and 205 deletions

View File

@@ -2,9 +2,9 @@
<html>
<head>
<meta name="generator" content="JSDoc 3.6.3">
<meta name="generator" content="JSDoc 3.6.4">
<meta charset="utf-8">
<title>whatsapp-web.js 1.5.1 &raquo; Source: structures/MessageMedia.js</title>
<title>whatsapp-web.js 1.6.0 &raquo; Source: structures/MessageMedia.js</title>
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
@@ -15,7 +15,7 @@
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
<div id="jsdoc-navbar-container">
<div id="jsdoc-navbar-content">
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>5.<wbr>1</a>
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>6.<wbr>0</a>
</div>
</div>
</nav>
@@ -31,6 +31,10 @@
<article>
<pre class="prettyprint linenums"><code>&#x27;use strict&#x27;;
const fs &#x3D; require(&#x27;fs&#x27;);
const path &#x3D; require(&#x27;path&#x27;);
const mime &#x3D; require(&#x27;mime&#x27;);
/**
* Media attached to a message
* @param {string} mimetype MIME type of the attachment
@@ -57,6 +61,19 @@ class MessageMedia {
*/
this.filename &#x3D; filename;
}
/**
* Creates a MessageMedia instance from a local file path
* @param {string} filePath
* @returns {MessageMedia}
*/
static fromFilePath(filePath) {
const b64data &#x3D; fs.readFileSync(filePath, {encoding: &#x27;base64&#x27;});
const mimetype &#x3D; mime.getType(filePath);
const filename &#x3D; path.basename(filePath);
return new MessageMedia(mimetype, b64data, filename);
}
}
module.exports &#x3D; MessageMedia;</code></pre>
@@ -69,7 +86,7 @@ module.exports &#x3D; MessageMedia;</code></pre>
<footer id="jsdoc-footer" class="jsdoc-footer">
<div id="jsdoc-footer-container">
<p>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.3 on April 14, 2020.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.4 on May 24, 2020.
</p>
</div>
</footer>