apigratis-sdk-nodejs
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "apigratis-sdk-nodejs", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A ideia desse SDK é otimizar o tempo de código dos usuários auxiliando na integração com a plataforma", | ||
@@ -5,0 +5,0 @@ "homepage": "https://apigratis.com.br", |
const axios = require("axios"); | ||
const SERVER = "https://cluster-01.apigratis.com/api/v1"; | ||
class WhatsApp { | ||
static async request(data) { | ||
@@ -11,7 +14,5 @@ | ||
const SERVER = "https://cluster-01.apigratis.com/api/v1/whatsapp/"; | ||
const config = { | ||
method: "POST", | ||
url: `${SERVER}${action || ""}`, | ||
url: `${SERVER}/whatsapp/${action || ""}`, | ||
headers: { | ||
@@ -32,6 +33,9 @@ "Agent": "APIBRASIL/SDK-JS", | ||
} catch (error) { | ||
return { | ||
status: "error", | ||
message: error | ||
error: error, | ||
message: error.message, | ||
}; | ||
} | ||
@@ -38,0 +42,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
445412
5027