node-cheeze-wizards-api (master) doxdox documentation

Cheeze Wizards API Node Wrapper

# ALCHEMY_API_URL()

Cheeze Wizards Alchemy API url

Returns

String

Returns Cheeze Wizards Alchemy API url https://cheezewizards.alchemyapi.io

# CheezeWizardsAPI(email, apiToken)

Cheeze Wizards API Client

Parameters

Name Types Description
email String Email used to get API token
apiToken String API token

Returns

Function

Returns an empty function

# CheezeWizardsAPI._get(url, params)

GET method for Cheeze Wizards API

Parameters

Name Types Description
url String GET request url
params Object GET request params

Returns

Promise

Returns a promise

# CheezeWizardsAPI.duel(duelId)

Method to get a duel by id Fallback to get all duels if you forget id

Parameters

Name Types Description
duelId Integer Duel Id

Returns

Promise

Returns a promise

# CheezeWizardsAPI.duels(params, params.startsAfter, params.startsBefore, params.endsAfter, params.endsBefore, params.wizardIds, params.excludeInProgress, params.excludeFinished)

Method to get duels by block, wizard, status, ... Fallback to get all wizards if you forget params

Parameters

Name Types Description
params Object Query parameters
params.startsAfter Integer Duels that start after this block number
params.startsBefore Integer Duels that start before this block number
params.endsAfter Integer Duels that end after this block number
params.endsBefore Integer Duels that end before this block number
params.wizardIds Array Duels involving these wizards (coma separated list of wizardIds)
params.excludeInProgress Boolean True for completed duels, false for all duels (default)
params.excludeFinished Boolean True for duels in progress, false for all duels (default)

Returns

Promise

Returns a promise

# CheezeWizardsAPI.wizard(wizardId)

Method to get a wizard by id Fallback to get all wizards if you forget id

Parameters

Name Types Description
wizardId Integer Wizard Id

Returns

Promise

Returns a promise

# CheezeWizardsAPI.wizards(params, params.owner, params.affinity, params.minPower, params.maxPower)

Method to get wizards by affinity, power, owner, ... Fallback to get all wizards if you forget params

Parameters

Name Types Description
params Object Query parameters
params.owner String Wizards owned by this address
params.affinity Integer Wizards with this affinity: 0 = NOTSET, 1 = NEUTRAL, 2 = FIRE, 3 = WIND, 4 = WATER
params.minPower Integer Wizards whose power is greater than or equal to minPower
params.maxPower Integer Wizards whose power is less than or equal to maxPower

Returns

Promise

Returns a promise

# DUELS_BASE_PATH()

Duels path

Returns

String

Returns '/duels/' path

# WIZARDS_BASE_PATH()

Wizards path

Returns

String

Returns '/wizards/' path