Skip to content

Commit

Permalink
Merge pull request #25 from Secreto31126/jsdoc-fix
Browse files Browse the repository at this point in the history
Small fix
  • Loading branch information
Secreto31126 authored Jul 12, 2022
2 parents 0c6a0a2 + 42c2051 commit 5f30487
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ const { Request } = api;
*
* @property {String} token The API token
* @property {String} v The API version to use
* @property {Boolean} parsed Whether to return a pre-processed response from the API or the raw fetch response. Intended for deep level debugging.
* @property {Boolean} parsed If truthy, API operations will return the fetch promise instead. Intended for low level debugging.
*/
class WhatsAppAPI {
/**
* Initiate the Whatsapp API app
*
* @param {String} token The API token, given at setup. It can be either a temporal token or a permanent one.
* @param {String} v The version of the API, defaults to v14.0
* @param {Boolean} parsed Whether to return a pre-processed response from the API or the raw fetch response. Intended for deep level debugging.
* @param {Boolean} parsed Whether to return a pre-processed response from the API or the raw fetch response. Intended for low level debugging.
* @throws {Error} If token is not specified
*/
constructor(token, v = "v14.0", parsed = true) {
Expand Down Expand Up @@ -65,7 +65,7 @@ class WhatsAppAPI {
* @param {String} to The user's phone number
* @param {(Text|Audio|Document|Image|Sticker|Video|Location|Contacts|Interactive|Template)} object A Whatsapp component, built using the corresponding module for each type of message.
* @param {String} [context] The message ID of the message to reply to
* @returns {Promise} The fetch promise
* @returns {Promise} The server response
* @throws {Error} If phoneID is not specified
* @throws {Error} If to is not specified
* @throws {Error} If object is not specified
Expand Down Expand Up @@ -97,7 +97,7 @@ class WhatsAppAPI {
*
* @param {String} phoneID The bot's phone ID
* @param {String} messageId The message ID
* @returns {Promise} The fetch promise
* @returns {Promise} The server response
* @throws {Error} If phoneID is not specified
* @throws {Error} If messageId is not specified
*/
Expand All @@ -114,7 +114,7 @@ class WhatsAppAPI {
* @param {String} phoneID The bot's phone ID
* @param {String} message The quick message on the QR code
* @param {String} format The format of the QR code (png or svn)
* @returns {Promise} The fetch promise
* @returns {Promise} The server response
* @throws {Error} If phoneID is not specified
* @throws {Error} If message is not specified
* @throws {Error} If format is not either 'png' or 'svn'
Expand All @@ -132,7 +132,7 @@ class WhatsAppAPI {
*
* @param {String} phoneID The bot's phone ID
* @param {String} [id] The QR's id to find. If not specified, all QRs will be returned
* @returns {Promise} The fetch promise
* @returns {Promise} The server response
* @throws {Error} If phoneID is not specified
*/
retrieveQR(phoneID, id) {
Expand All @@ -147,7 +147,7 @@ class WhatsAppAPI {
* @param {String} phoneID The bot's phone ID
* @param {String} id The QR's id to edit
* @param {String} message The new quick message for the QR code
* @returns {Promise} The fetch promise
* @returns {Promise} The server response
* @throws {Error} If phoneID is not specified
* @throws {Error} If id is not specified
* @throws {Error} If message is not specified
Expand All @@ -165,7 +165,7 @@ class WhatsAppAPI {
*
* @param {String} phoneID The bot's phone ID
* @param {String} id The QR's id to delete
* @returns {Promise} The fetch promise
* @returns {Promise} The server response
* @throws {Error} If phoneID is not specified
* @throws {Error} If id is not specified
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whatsapp-api-js",
"version": "0.6.0",
"version": "0.6.1",
"author": "Secreto31126",
"description": "A Whatsapp Official API helper for Node.js",
"license": "MIT",
Expand Down

0 comments on commit 5f30487

Please sign in to comment.