Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Set the following keys in the object passed to the Block.extend() method to define the Block:

nametrueBlock name. This name should be used when specifying blocks in your API endpoint definition. Assign the name value to either the before or after property in the API definition object to use it.
descriptiontrueHuman useful description to display in the documentation.
executetrueThe function containing the logic for your block. All of your runnable code goes in the execute function. This function is passed a requestresponse, and next object to be used within your block. Once you are done with your block code, always call next() to continue on to the next step in the request flow.
documentedfalseDetermines whether to generate API documentation (true) or not (false). The default value is true.