Skip to content

SaladLink/SaladWrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SaladWrap

A lightweight wrapper for the Salad.io API

Logo

size

Quick Links

Installation

Install saladwrap.js with npm

  npm install saladwrap.js

Install saladwrap.js with yarn

  yarn add saladwrap.js

Code Example

const { SaladWrapper } = require('saladwrap.js');
const prompt = require("prompt-sync")({ sigint: true });

(async () => {

const sw = new SaladWrapper();

await sw.connect(prompt('Please enter your email: ').toString());

await sw.verify(prompt("Enter passcode from email: ").toString());

console.log('Profile:', await sw.profile());
console.log('Balance:', await sw.balance())

})();

Console output

Profile: {
  email: 'Your Email',
  extensions: { minecraftUsername: 'M3zo' },
  id: 'Your account id,
  lastSeenApplicationVersion: '2021-09-24',
  username: 'Mezo',
  viewedReferralOnboarding: true
}
Balance: {
  currentBalance: 1.3076578183531435,
  lifetimeBalance: 1161.6255108303897
}

Maintainers

About

A JavaScript wrapper for the Salad.io API!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published