Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
danger-coin-api
Advanced tools
Node.JS библиотека для взаимодействия с API Danger Coin
$ npm i danger-coin-api
const DangerCoin = require('danger-coin-api');
const api = new DangerCoin();
Узнаём информацию о юзере
(async () =>{
const result = await api.getUserInfo(268868084)
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
На выходе вы должны получить результат формата:
{
status: 'OK',
id: 268868084,
name: 'Алексей',
balance: 1
}
Изменение названия магазина
(async () =>{
const result = await api.ReNameMerchant(1, "token", "NewName")
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
На выходе вы должны получить результат формата:
{
status: 'OK',
event_result: {
newMerchantName: 'NewName'
}
}
Перевод (из магазина)
(async () =>{
const result = await api.CreateTransfer(1, "token", peerId, amount)
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
На выходе вы должны получить результат формата:
{
status: 'OK',
event_result: {
newMerchantName: 'NewName'
}
}
Информация о магазине
(async () =>{
const result = await api.GetMerchantInfo(1, "token")
if(result.status != `OK`) return console.log(`Ошибка ${result.error.id} - ${result.error.msg}`)
console.log(result)
})()
На выходе вы должны получить результат формата:
{
status: 'OK',
event_result: {
id: 1,
name: "Магазин #1",
key: "token",
balance: 100,
owner: 268868084,
lastdepId: null,
lastdepAmount: null
}
}
В скором времени, в апи добавится еще больше функций :3
1.0.7 (Patch)
1.0.6 (Release)
FAQs
Апи для данжер койна :3
The npm package danger-coin-api receives a total of 0 weekly downloads. As such, danger-coin-api popularity was classified as not popular.
We found that danger-coin-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.