Comparing version 1.0.1 to 1.0.2
52
index.js
@@ -9,28 +9,28 @@ const fetch = require("node-fetch"); | ||
module.exports = { | ||
getGroups(params) { | ||
return fetch(data.urls.getGroups, { | ||
method: "POST", | ||
credentials: "same-origin", | ||
body: JSON.stringify(params), | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
}).then(async (response) => { | ||
response = await response.json(); | ||
return response; | ||
}); | ||
}, | ||
getStickers(params) { | ||
return fetch(data.urls.getStickers, { | ||
method: "POST", | ||
credentials: "same-origin", | ||
body: JSON.stringify(params), | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
}).then(async (response) => { | ||
response = await response.json(); | ||
return response; | ||
}); | ||
}, | ||
getGroups(params) { | ||
return fetch(data.urls.getGroups, { | ||
method: "POST", | ||
credentials: "same-origin", | ||
body: JSON.stringify(params), | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
}).then(async (response) => { | ||
response = await response.json(); | ||
return response.response; | ||
}); | ||
}, | ||
getStickers(params) { | ||
return fetch(data.urls.getStickers, { | ||
method: "POST", | ||
credentials: "same-origin", | ||
body: JSON.stringify(params), | ||
headers: { | ||
"Content-Type": "application/json", | ||
}, | ||
}).then(async (response) => { | ||
response = await response.json(); | ||
return response.response; | ||
}); | ||
}, | ||
}; |
{ | ||
"name": "api-devup", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "This library is intended for interaction with the service dev-up.ru", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,1 +40,14 @@ <p align="center"> | ||
``` | ||
```js | ||
const { getGroups, getStickers } = require("api-devup"); | ||
stickers({ | ||
key: process.env.KEY, | ||
user_id: process.env.USER_ID, | ||
}); | ||
async function stickers(params) { | ||
console.log(await getStickers(params)); | ||
} | ||
``` |
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
2741
53