nuke-api
v1.0.0
Published
A Node.js module for interacting with Nuke API
Readme
npm
npm install nuke-apigit config --global user.email "[email protected]" git config --global user.name "fdciabdul"
Yarn
yarn add nuke-apiUsage
import NukeAPI from 'nuke-api';
const api = new NukeAPI({ baseUrl: 'https://custom-url.com', useProxy: true });
const token = 'your-access-token';
const depositId = 'your-deposit-id';
const netAmount = 100;
// Fetch deposit transactions
api.getDeposit(token).then(deposits => {
console.log('Deposits:', deposits);
});
// Accept a deposit transaction
api.acceptDeposit(token, depositId, netAmount).then(response => {
console.log('Accept Deposit Response:', response);
});
// Reject a deposit transaction
api.rejectDeposit(token, depositId, 'Your custom user note').then(response => {
console.log('Reject Deposit Response:', response);
});
// Login to the Nuke panel
api.loginToPanel('your-username', 'your-password').then(response => {
console.log('Login Response:', response);
});Configuration
Create a .env file in the root of your project and add your proxy URL if you are using one:
PROXY_URL=socks5://yourproxyurl:portRunning Tests
You can run the tests using npm or Yarn.
npm
npm testYarn
yarn test