Socket
Socket
Sign inDemoInstall

@sheilim/shimli-sdk

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sheilim/shimli-sdk - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

10

index.js
const axios = require('axios');
let config = {}
function connectShimli(url, json){

@@ -24,3 +24,3 @@ return new Promise((resolve, reject) => {

error: true,
txt: error
message: error
})

@@ -31,5 +31,5 @@ });

module.export = {
config: {},
sendMessage: (type, body, to, instance, caption = null, lat = null, lng = null) => {
module.exports = {
config: config,
sendMessage: (type, body, to, instance, caption = null, filename = null,lat = null, lng = null) => {
return new Promise(async (resolve, reject) => {

@@ -36,0 +36,0 @@ if(!config.token){

{
"name": "@sheilim/shimli-sdk",
"version": "1.0.0",
"version": "1.0.1",
"description": "SDK for Shimli",

@@ -5,0 +5,0 @@ "main": "index.js",

# shimli-sdk
Use of the Shimli api to send and read messages from the channels available in Shimli (WhatsApp, SMS, Telegram, Facebook Messanger and Instagram)
Link: <https://www.shimli.app>
# Installation
`npm i @sheilim/shimli-sdk --save`
## How is it used?
```
const shimli = require('@sheilim/shimli-sdk);
(function(){
shimli.config['token'] = "YOUR_TOKEN";
const result = shimli.sendMessage("chat", "Hi!! 👋", "14243962506", "ID_INSTANCE");
if(result.error)
console.log(result.message);
else
console.log(result);
})();
```
## Options
* *type* - _string_ I could be chat, image, video, audio, location, document, sticker, gif
* *body* - _string_ Message text or url of the media file to send
* *to* - _string_ WhatsApp number to which the message will be sent
* *instance* - _string_ Id of the instance connected to Shimli
* *caption* - _string_ (optional) Image or video caption
* *filename* - _string_ (optional) Name of the document to send
* *lat* - _string_ Required if it is of type location
* *lng* - _string_ Required if it is of type location
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc