Image

Image

Route that converts an image url, passed inside the request param, to an image

Constructor

new Image(conf, methodopt, pathopt, descriptionopt)

Parameters:
Name Type Attributes Default Description
conf Config
method string <optional>
'GET'
path string <optional>
'/image/{profile}/{url}'
description string <optional>
'Profile image conversion'
Mixes In:
Source:

Extends

Methods

buildOperation(request, reply) → {Promise.<FlamingoOperation>}

Function to build the flamingo operation based on the incoming request + reply function. Each extending class should call super.buildOperation to get a minimal working flamingo operation.
Parameters:
Name Type Description
request Request
reply function
Inherited From:
Source:
See:
Returns:
Type
Promise.<FlamingoOperation>

handle(operation)

Function that is called for each request. To send the response, call `operation.reply()`.
Parameters:
Name Type Description
operation FlamingoOperation
Inherited From:
Source:
See:

handleError(request, reply, error, operationopt) → {*}

Function to log and reply errors
Parameters:
Name Type Attributes Description
request Request
reply function function that replies to the request
error Error
operation FlamingoOperation <optional>
Inherited From:
Source:
Returns:
reply return value
Type
*

hapiConfig(defaults)

Function to build the hapi route config object
Parameters:
Name Type Description
defaults Object
Inherited From:
Source:
See: