!! Requires axios !!
!! Before using it read random.org docs !!
const rnd = new randomOrg(*Your API KEY*)
rnd.setAuth(*Your login*, *Your password*)
rnd.generateIntegers(1, 2, 3).then(res => console.log(res)).catch(err => console.log(err))
- generateIntegers(n, min, max, replacement = true, base = 10)
- generateIntegerSequences(n, length, min, max, replacement = true, base = 10)
- generateDecimalFractions(n, decimalPlaces, replacement = true)
- generateGaussians(n, mean, standardDeviation, significantDigits)
- generateStrings(n, length, characters, replacement = true)
- generateUUIDs(n)
- generateBlobs(n, size, format = "base64")
- getResult(serialNumber)
- verifySignature(random, signature)
- generateSignedIntegers(n, min, max, userData = null, replacement = true, base = 10)
- generateSignedIntegerSequences(n, length, min, max, userData = null, replacement = true, base = 10)
- generateSignedDecimalFractions(n, decimalPlaces, userData = null, replacement = true)
- generateSignedGaussians(n, mean, standardDeviation, significantDigits, userData = null)
- generateSignedStrings(n, length, characters, userData = null, replacement = true)
- generateSignedUUIDs(n, userData = null)
- generateSignedBlobs(n, size, userData = null, format = "base64")
- getResult(serialNumber)
- verifySignature(random, signature)
- addDelegation(serviceId, delegateId, notifyDelegate = true) Requires Authentication
- removeDelegation(delegationKey, notifyDelegate = true) Requires Authentication
- listDelegations() Requires Authentication
- setNotificationHandler(handlerUrl, handlerSecret) Requires Authentication
- delegationNotification(serviceId, delegatorId, delegateId, delegationKey, handlerSecret)
- holdDraw(title, recordType, entries, entriesDigest, winnerCount, entryType = "opaque", identicalEntriesPermitted = false, winnerStart = 1, winnerHandling = "remove", showEntries = true, showWinners = true, delegationKey = null) Requires Authentication
- getDraw(drawId, maxEntries = 3000000, delegationKey = null) Requires Authentication
- listDraws(delegationKey = null) Requires Authentication
- beginGiveaway(description, entries, entriesDigest, rounds, delegationKey = null) Requires Authentication
- continueGiveaway(giveawayKey, delegationKey = null) Requires Authentication
- getGiveaway(giveawayKey)
- listGiveaways(delegationKey = null) Requires Authentication