Methods summary
public
|
#
__construct( string $secret = NULL )
Constructor, make a new instance and initialize with Secret API key
Constructor, make a new instance and initialize with Secret API key
Parameters
- $secret
string $secret Secret API key
Throws
|
public
array|null
|
#
fetch( array $indata )
Fetches a formed API request
Fetches a formed API request
Parameters
- $indata
array $indata [key=>string, value=>string] Used for building http query
Returns
array|null parsed response
Throws
|
public
boolean
|
#
refreshInfo( )
Issues 'info' request, stores response in data store This command will force
update stale cached data
Issues 'info' request, stores response in data store This command will force
update stale cached data
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
refreshPackages( )
Issues 'packages' request, stores response in data store This command will
force update stale cached data
Issues 'packages' request, stores response in data store This command will
force update stale cached data
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
refreshPayments( )
Issues 'payments' request, stores response in data store This command will
force update stale cached data
Issues 'payments' request, stores response in data store This command will
force update stale cached data
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
refreshCommands( )
Issues 'commands' request, stores response in data store This command will
force update stale cached data
Issues 'commands' request, stores response in data store This command will
force update stale cached data
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
refreshChecker( )
Issues 'checker' request, stores response in data store This command will
force update stale cached data
Issues 'checker' request, stores response in data store This command will
force update stale cached data
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
ensureInfo( )
Issues 'info' request if it's not already in the data store This command is
not required, data is automatically fetched as needed
Issues 'info' request if it's not already in the data store This command is
not required, data is automatically fetched as needed
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
ensurePackages( )
Issues 'packages' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Issues 'packages' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
ensurePayments( )
Issues 'payments' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Issues 'payments' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
ensureCommands( )
Issues 'commands' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Issues 'commands' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Returns
boolean TRUE if data successfully added response to data store
|
public
boolean
|
#
ensureChecker( )
Issues 'checker' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Issues 'checker' request if it's not already in the data store This command
is not required, data is automatically fetched as needed
Returns
boolean TRUE if data successfully added response to data store
|
public
float|null
|
#
getLatestVersion( )
Get latest Bukkit plugin version
Get latest Bukkit plugin version
Returns
float|null version number
|
public
string|null
|
#
getLatestDownload( )
Get link to latest Bukkit plugin download
Get link to latest Bukkit plugin download
Returns
string|null download url
|
public
integer|null
|
#
getServerId( )
Get server identification number
Get server identification number
Returns
integer|null server id
|
public
string|null
|
#
getServerCurrency( )
Get default donation currency
Get default donation currency
Returns
string|null currency name
|
public
string|null
|
#
getServerName( )
Get Bukkit server name
Returns
string|null server name
|
public
string|null
|
#
getServerStore( )
Get link to server's Buycraft store
Get link to server's Buycraft store
Returns
string|null store url
|
public
integer|null
|
#
getPackageCount( )
Get quantity of available packages
Get quantity of available packages
Returns
integer|null package count
|
public
integer|null
|
#
getPackageId( integer $num = -1 )
Get remote package id
Parameters
- $num
integer $num local package number
Returns
integer|null package id
|
public
integer|null
|
#
getPackageOrder( integer $num = -1 )
Get package display order
Get package display order
Parameters
- $num
integer $num local package number
Returns
integer|null order
|
public
string|null
|
#
getPackageName( integer $num = -1 )
Get package name
Parameters
- $num
integer $num local package number
Returns
string|null name
|
public
string|null
|
#
getPackageDescription( integer $num = -1 )
Get package description
Parameters
- $num
integer $num local package number
Returns
string|null description
|
public
string|null
|
#
getPackagePrice( integer $num = -1 )
Get package price
Parameters
- $num
integer $num local package number
Returns
string|null price
|
public
integer|null
|
#
getPaymentCount( )
Get total quantity of payments
Get total quantity of payments
Returns
integer|null payment count
|
public
integer|null
|
#
getPaymentTime( integer $num = -1 )
Get time of payment
Parameters
- $num
integer $num local payment number
Returns
integer|null time in seconds since epoch
|
public
array|null
|
#
getPaymentPackages( integer $num = -1 )
Get packages included in payment
Get packages included in payment
Parameters
- $num
integer $num local payment number
Returns
array|null [int=>$key, int=>$value] remote id number of packages
|
public
string|null
|
#
getPaymentPlayerName( integer $num = -1 )
Get name of player
Parameters
- $num
integer $num local payment number
Returns
string|null in-game nickname of player
|
public
string|null
|
#
getPaymentPrice( integer $num = -1 )
Get payment price
Parameters
- $num
integer $num local payment number
Returns
string|null amount of money, to 2 decimal places
|
public
string|null
|
#
getPaymentCurrency( integer $num = -1 )
Get currency used in transaction
Get currency used in transaction
Parameters
- $num
integer $num local payment number
Returns
string|null currency name
|
public
integer|null
|
#
getCommandCount( )
Get quantity of commands waiting to be issued on server
Get quantity of commands waiting to be issued on server
Returns
integer|null number of commands
|
public
string|null
|
#
getCommandPlayerName( integer $num = -1 )
Get in-game player name of command target
Get in-game player name of command target
Parameters
- $num
integer $num local command number
Returns
string|null player name
|
public
array|null
|
#
getCommandList( integer $num = -1 )
Get list of commands to be executed
Get list of commands to be executed
Parameters
- $num
integer $num local command number
Returns
array|null [int=>$key, string=>$value]
|
public
boolean|null
|
#
getCommandRequireOnline( integer $num = -1 )
Get require online status
Get require online status
Parameters
- $num
integer $num local command number
Returns
boolean|null TRUE if player must in-game before command is executed
|
public
integer|null
|
#
getClaimableCount( )
Get quantity of commands waiting to be issued on server
Get quantity of commands waiting to be issued on server
Returns
integer|null number of commands
|
public
string|null
|
#
getClaimablePlayerName( integer $num = -1 )
Get in-game player name of command target
Get in-game player name of command target
Parameters
- $num
integer $num local command number
Returns
string|null player name
|
public
array|null
|
#
getClaimableCommandList( integer $num = -1 )
Get list of commands to be executed
Get list of commands to be executed
Parameters
- $num
integer $num local command number
Returns
array|null [int=>$key, string=>$value]
|
public
boolean|null
|
#
getClaimableRequireOnline( integer $num = -1 )
Get require online status
Get require online status
Parameters
- $num
integer $num local command number
Returns
boolean|null TRUE if player must in-game before command is executed
|
public
integer|null
|
#
getExpiryCount( )
Get quantity of commands waiting to be issued on server because a package has
expired
Get quantity of commands waiting to be issued on server because a package has
expired
Returns
integer|null number of commands
|
public
string|null
|
#
getExpiryPlayerName( integer $num = -1 )
Get in-game player name of command target
Get in-game player name of command target
Parameters
- $num
integer $num local command number
Returns
string|null player name
|
public
array|null
|
#
getExpiryCommandList( integer $num = -1 )
Get list of commands to be executed
Get list of commands to be executed
Parameters
- $num
integer $num local command number
Returns
array|null [int=>$key, string=>$value]
|
public
boolean|null
|
#
getExpiryRequireOnline( integer $num = -1 )
Get require online status
Get require online status
Parameters
- $num
integer $num local command number
Returns
boolean|null TRUE if player must in-game before command is executed
|
public
array|null
|
#
getPackagesById( integer $id = -1 )
Get local package numbers from a remote package id
Get local package numbers from a remote package id
Parameters
- $id
integer $id remote package id
Returns
array|null [int=>$key, int=>$num] local package numbers
|
public
array|null
|
#
getPaymentsSince( integer $time = -1 )
Get local payment numbers newer than specified time
Get local payment numbers newer than specified time
Parameters
- $time
integer $time time in seconds since epoch
Returns
array|null [int=>$key, int=>$num] local payment numbers
|
public
array|null
|
#
getRecentPayments( integer $amount = -1 )
Get specified newest payment numbers
Get specified newest payment numbers
Parameters
- $amount
integer $amount quantity of payments
Returns
array|null [int=>$key, int=>$num] local payment numbers
|
public
array|null
|
#
getPaymentsByPlayerName( string $playerName = NULL )
Get local payment numbers created by specified player name
(case-insensitive)
Get local payment numbers created by specified player name
(case-insensitive)
Parameters
- $playerName
string $playerName in-game player name
Returns
array|null [int=>$key, int=>$num] local payment numbers
|
public
array|null
|
#
getPaymentsByPackageId( integer $id = -1 )
Get local payment numbers which involved specified remote package id
Get local payment numbers which involved specified remote package id
Parameters
- $id
integer $id remote package id
Returns
array|null [int=>$key, int=>$num] local payment numbers
|
public
string|null
|
#
getBuyLink( integer $id = -1, string $name = NULL )
Get a link to add a package to users cart
Get a link to add a package to users cart
Parameters
- $id
integer $id remote package id number
- $name
string $name OPTIONAL in-game name of player making payment
Returns
string|null URL to add package to buycraft.net cart
|
public
string|null
|
#
getBuyLinkDirect( integer $id = -1, string $name = NULL, string $gateway = NULL )
Get a link to directly make a payment
Get a link to directly make a payment
Parameters
- $id
integer $id remote package id number
- $name
string $name in-game name of player making payment
- $gateway
string $gateway payment gateway
Returns
string|null URL to buy package directly from gateway
|