forgeboxsdk

Class ForgeBox

lucee.Component
    extended by forgeboxsdk.ForgeBox

Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com ---

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
    Property Summary
    type property default serializable required
    any endpointURL
          The ForgeBox Endpoint URL.

    • access = public
    • returntype = any
    true false
    any version
          The ForgeBox API version to use.

    • access = public
    • returntype = any
    1 true false
    Constructor Summary
    init([any endpointURL='https://www.forgebox.io'], [any version='v1'])
          Constructor.
    Method Summary
    any getAPIURL()
         Gets the API URL according to properties: ex: https://www.
    string getEndpointURL()
    struct getEntries([any orderBy='[runtime expression]'], [numeric maxrows='0'], [numeric startRow='1'], [any typeslug=''], [any searchTerm=''])
         Get entries.
    struct getEntry(any slug)
         Get a single entry data.
    struct getLatestVersion(any slug)
         Get an entry's latest version.
    struct getType(any slug)
         Get a type representation.
    array getTypes()
         Get the entry types as array of structs.
    string getVersion()
    boolean isSlugAvailable(any slug)
         Check if a slug is available.
    private struct makeRequest([string method='GET'], string resource, [any body=''], [struct headers='[runtime expression]'], [struct parameters='[runtime expression]'], [numeric timeout='15'])
         Make a ForgeBox REST Call.
    string ping()
         Pings the API to see if its alive.
    any setEndpointURL(any endpointURL)
    any setVersion(any version)
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init([any endpointURL='https://www.forgebox.io'], [any version='v1'])

    Constructor

    Parameters:
    endpointURL - Override the Forgebox Endpoint URL
    version - Override the version to use, defaults to latest: v1

    Property Detail

    endpointURL

    property any endpointURL

    The ForgeBox Endpoint URL

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    version

    property any version = [1]

    The ForgeBox API version to use

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    getAPIURL

    public any getAPIURL()

    Gets the API URL according to properties: ex: https://www.forgebox.io/api/v1


    getEndpointURL

    public string getEndpointURL()


    getEntries

    public struct getEntries([any orderBy='[runtime expression]'], [numeric maxrows='0'], [numeric startRow='1'], [any typeslug=''], [any searchTerm=''])

    Get entries

    Parameters:
    orderBy - The sort ordering, look at this.ORDER
    maxrows - Used for pagination
    startRow - Used for pagination
    typeslug - Filter by type
    searchTerm - Search by string

    getEntry

    public struct getEntry(any slug)

    Get a single entry data

    Parameters:
    slug - The slug to retrieve

    getLatestVersion

    public struct getLatestVersion(any slug)

    Get an entry's latest version

    Parameters:
    slug - The slug to retrieve

    getType

    public struct getType(any slug)

    Get a type representation

    Parameters:
    slug

    getTypes

    public array getTypes()

    Get the entry types as array of structs


    getVersion

    public string getVersion()


    isSlugAvailable

    public boolean isSlugAvailable(any slug)

    Check if a slug is available

    Parameters:
    slug

    makeRequest

    private struct makeRequest([string method='GET'], string resource, [any body=''], [struct headers='[runtime expression]'], [struct parameters='[runtime expression]'], [numeric timeout='15'])

    Make a ForgeBox REST Call

    Parameters:
    method - The HTTP method call
    resource - The resource to call
    body - The body contents of the request
    headers - Request headers
    parameters
    timeout - Request Timeout

    ping

    public string ping()

    Pings the API to see if its alive


    setEndpointURL

    public any setEndpointURL(any endpointURL)

    Parameters:
    endpointURL

    setVersion

    public any setVersion(any version)

    Parameters:
    version