Skip to content

Commit

Permalink
Small docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaloo committed Mar 22, 2018
1 parent 7872ffe commit 88def43
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ Returns **[Function][42]**

## Context

An object that's available in all action handlers and routers as `req.hull`.
It's a set of parameters and modules to work in the context of current organization and connector instance.

### helpers

This is a set of additional helper functions being exposed at `req.hull.helpers`. They allow to perform common operation in the context of current request. They are similar o `req.hull.client.utils`, but operate at higher level, ensure good practises and should be used in the first place before falling back to raw utils.
Expand Down Expand Up @@ -129,7 +132,7 @@ This is a method to request an extract of user base to be sent back to the Conne
- `options` **[Object][37]** (optional, default `{}`)
- `options.segment` **[Object][37]** (optional, default `null`)
- `options.format` **[Object][37]** (optional, default `json`)
- `options.path` **[Object][37]** (optional, default `batch`)
- `options.path` **[Object][37]** (optional, default `/batch`)
- `options.fields` **[Object][37]** (optional, default `[]`)
- `options.additionalQuery` **[Object][37]** (optional, default `{}`)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ To get more details on how those helpers methods work please see [API REFERENCE]

# Context Object

[Hull.Connector](#hullconnector) apply multiple middlewares to the request handler, including [Hull.Middleware](#hullmiddleware). The result is a **Context Object** that's available in all action handlers and routers as `req.hull`. It's a set of parameters and modules to work in the context of current organization and connector instance. This Context is divided into a base set by `Hull.Middleware` (if you use it standalone) and an extended set applied when using `Hull.Connector` and helpers method descibed above.
[Hull.Connector](#hullconnector) apply multiple middlewares to the request handler, including [Hull.Middleware](#hullmiddleware). The result is a **Context Object** that's available in all action handlers and routers as `req.hull`. It's a set of parameters and modules to work in the context of current organization and connector instance. This Context is divided into a base set by `Hull.Middleware` (if you use it standalone) and an extended set applied when using `Hull.Connector` and helpers method described above.

Here is the base structure of the Context Object (we also provide Flow type for this object [here](./src/types/hull-req-context.js)).

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/request-extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const _ = require("lodash");
* @param {Object} [options={}]
* @param {Object} [options.segment=null]
* @param {Object} [options.format=json]
* @param {Object} [options.path=batch]
* @param {Object} [options.path=/batch]
* @param {Object} [options.fields=[]]
* @param {Object} [options.additionalQuery={}]
* @return {Promise}
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export type {
*/

/**
* An object that's available in all action handlers and routers as `req.hull`.
* It's a set of parameters and modules to work in the context of current organization and connector instance.
*
* @namespace Context
* @public
*/
Expand Down

0 comments on commit 88def43

Please sign in to comment.