Git Product home page Git Product logo

random-org-api-nodejs's Introduction

Random.org nodejs api file

!! Requires axios !!
!! Before using it read random.org docs !!

Usage

Initialization

const rnd = new randomOrg(*Your API KEY*)

Authentication

rnd.setAuth(*Your login*, *Your password*)

Example

rnd.generateIntegers(1, 2, 3).then(res => console.log(res)).catch(err => console.log(err))

Functions
Basic
  • 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)
Signed
  • 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)
Delegation
  • 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)
Draw service
  • 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
Giveaway system
  • beginGiveaway(description, entries, entriesDigest, rounds, delegationKey = null) Requires Authentication
  • continueGiveaway(giveawayKey, delegationKey = null) Requires Authentication
  • getGiveaway(giveawayKey)
  • listGiveaways(delegationKey = null) Requires Authentication

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.