lucee.Component
commandbox.system.util.ForgeBox
ForgeBox API REST Wrapper
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
any
|
APIURL
|
true
|
false
|
|
any
|
CommandBoxlogger
|
true
|
false
|
|
any
|
configService
|
true
|
false
|
|
any
|
endpointName
|
true
|
false
|
|
any
|
endpointURL
|
true
|
false
|
|
any
|
progressableDownloader
|
true
|
false
|
|
any
|
progressBar
|
true
|
false
|
|
| Constructor Summary | |
|---|---|
|
init()
Constructor. |
|
| Method Summary | |
|---|---|
string
|
getAPIURL()
|
any
|
getCachedTypes([boolean force='false'], [string APIToken=''])
Get an array of entry types, locally first else goes and retrieves them. |
string
|
getCommandBoxlogger()
|
string
|
getConfigService()
|
string
|
getEndpointName()
|
string
|
getEndpointURL()
|
any
|
getEntries([string orderBy='[runtime expression]'], [numeric maxrows='0'], [numeric startRow='1'], [string typeSlug=''], [string searchTerm=''], [string APIToken=''])
Get entries. |
struct
|
getEntry(string slug='', [string APIToken=''])
Get an entry from forgebox by slug. |
string
|
getProgressableDownloader()
|
string
|
getProgressBar()
|
any
|
getStorageLocation(string slug, string version, string APIToken)
|
any
|
getTypes([string APIToken=''])
Get an array of entry types. |
boolean
|
isSlugAvailable(string slug='', [string APIToken=''])
Verifies if a slug is available. |
any
|
login(string username, string password)
Authenticates a user in ForgeBox. |
private struct
|
makeRequest([string method='GET'], [string resource=''], [any body=''], [struct headers='[runtime expression]'], [struct parameters='[runtime expression]'], [numeric timeout='20'], [struct formFields='[runtime expression]'], [struct files='[runtime expression]'], [boolean multipart='false'])
Invoke a ForgeBox REST Call. |
any
|
publish(string slug, boolean private, string version, string boxJSON, string isStable='true', [string description=''], [string descriptionFormat='text'], [string installInstructions=''], [string installInstructionsFormat='text'], [string changeLog=''], [string changeLogFormat='text'], string APIToken, [string zipPath=''], [boolean forceUpload='false'])
Publishes a package in ForgeBox. |
any
|
recordDownload(string slug, [string version], [string APIToken=''])
Tracks a download. |
any
|
recordInstall(string slug, [string version=''], [string APIToken=''])
Tracks an install. |
any
|
register(string username, string password, string email, string fName, string lName, [string APIToken=''])
Registers a new user in ForgeBox. |
any
|
setAPIURL(any APIURL)
|
any
|
setCommandBoxlogger(any CommandBoxlogger)
|
any
|
setConfigService(any configService)
|
any
|
setEndpointName(any endpointName)
|
any
|
setEndpointURL(any endpointURL)
|
any
|
setProgressableDownloader(any progressableDownloader)
|
any
|
setProgressBar(any progressBar)
|
any
|
slugSearch(string searchTerm, [string typeSlug=''], [string APIToken=''])
Autocomplete for slugs. |
any
|
unpublish(string slug, [string version=''], string APIToken)
Unpublishes a package. |
any
|
whoami(string APIToken)
Look up user based on API Token. |
| Methods inherited from class lucee.Component |
|---|
| None |
| Constructor Detail |
|---|
Constructor
| Property Detail |
|---|
access - publicrequired - falsereturntype - anyserializable - trueaccess - publicrequired - falsereturntype - anyinject - logbox:logger:{this}serializable - trueaccess - publicrequired - falsereturntype - anyinject - configServiceserializable - trueaccess - publicrequired - falsereturntype - anyserializable - trueaccess - publicrequired - falsereturntype - anyserializable - trueaccess - publicrequired - falsereturntype - anyinject - ProgressableDownloaderserializable - trueaccess - publicrequired - falsereturntype - anyinject - ProgressBarserializable - true| Method Detail |
|---|
Get an array of entry types, locally first else goes and retrieves them
forceAPITokenGet entries
orderBy - The type to order by, look at this.ORDERBYmaxrows - Max rows to returnstartRow - StartRowtypeSlug - The type slug to filter onsearchTerm - String to search onAPITokenGet an entry from forgebox by slug
slug - The entry slug to retreiveAPITokenslugversionAPITokenGet an array of entry types
APITokenVerifies if a slug is available
slug - The entry slug to verifyAPITokenAuthenticates a user in ForgeBox
usernamepasswordInvoke a ForgeBox REST Call
method - The HTTP method to invokeresource - The resource to hit in the forgebox service.body - The body content of the request if passed.headers - An struct of HTTP headers to sendparameters - An struct of HTTP URL parameters to send in the requesttimeout - The default call timeoutformFields - A struct of form fields to sendfiles - A struct of files to sendmultipart - Whether the request needs to be multipart/form-dataPublishes a package in ForgeBox
slugprivateversionboxJSONisStabledescriptiondescriptionFormatinstallInstructionsinstallInstructionsFormatchangeLogchangeLogFormatAPITokenzipPathforceUploadTracks a download
slugversionAPITokenTracks an install
slugversionAPITokenRegisters a new user in ForgeBox
usernamepasswordemailfNamelNameAPITokenAPIURLCommandBoxloggerconfigServiceendpointNameendpointURLprogressableDownloaderprogressBarAutocomplete for slugs
searchTermtypeSlugAPITokenUnpublishes a package
slugversionAPITokenLook up user based on API Token
APIToken