Skip to content

Commit

Permalink
Reorder call list in API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
devinivy committed Dec 4, 2017
1 parent f354c3a commit 4989257
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,40 +47,20 @@ Here's the complete rundown of how files and directories are mapped to API calls
- **`path.js`** - export `relativeTo`.
- **`path/index.js`** - export `relativeTo`.

#### Globally bound context
> [`server.bind(context)`](https://github.com/hapijs/hapi/blob/master/API.md#server.bind())
- **`bind.js`** - export `context`.
- **`bind/index.js`** - export `context`.

#### Plugin registrations
> [`await server.register(plugins, [options])`](https://github.com/hapijs/hapi/blob/master/API.md#server.register())
- **`plugins.js`** - export an array of objects `{ plugins, options }`.
- **`plugins/index.js`** - export an array of objects.
- **`plugins/plugin-name.js`** - export an object. If a plugin isn't specified in `plugins` it will be `require()`d using the filename.

#### Dependencies
> [`server.dependency(dependencies, [after])`](https://github.com/hapijs/hapi/blob/master/API.md#server.dependency())
- **`dependencies.js`** - export an array of objects `{ dependencies, after }`.
- **`dependencies/index.js`** - export an array of objects.
- **`dependencies/plugin-name.js`** - export an object. `dependencies` will be derived from the filename if it is not already specified.

#### Provisioning caches
> [`await server.cache.provision(options)`](https://github.com/hapijs/hapi/blob/master/API.md#server.cache.provision())
- **`caches.js`** - export an array of `options`.
- **`caches/index.js`** - export an array of `options`.
- **`caches/some-cache-name.js`** - export `options`. The cache's `options.name` will be assigned `'cache-name'` from the filename if a name isn't already specified.

#### Server methods
> [`server.method(name, method, [options])`](https://github.com/hapijs/hapi/blob/master/API.md#server.method())
- **`methods.js`** - export an array of objects `{ name, method, options }`.
- **`methods/index.js`** - export an array of objects.
- **`methods/method-name.js`** - export an object. The `name` will be assigned `'methodName'` camel-cased from the filename if it isn't already specified.

#### View manager (for [vision](https://github.com/hapijs/vision))
> [`server.views(options)`](https://github.com/hapijs/vision/blob/master/API.md#serverviewsoptions)
Expand All @@ -95,40 +75,13 @@ Here's the complete rundown of how files and directories are mapped to API calls
- **`decorations/decoration-name.js`** - export an object. The `property` will be assigned `'decorationName'` camel-cased from the filename if it isn't already specified.
- **`decorations/[type].decoration-name.js`** - export an object. The `type` will additionally be inferred from the filename if it isn't already specified.

#### Server/request extensions
> [`server.ext(events)`](https://github.com/hapijs/hapi/blob/master/API.md#server.ext())
- **`extensions.js`** - export an array of `events`.
- **`extensions/index.js`** - export an array of `events`.
- **`extensions/[event-type].js`** - export `events`. The `type` (of each item if there are multiple) will be assigned `[event-type]` camel-cased from the filename if it isn't already specified. E.g. `onPreHandler`-type events can be placed in `extensions/on-pre-handler.js`.

#### Exposed properties
> [`server.expose(key, value)`](https://github.com/hapijs/hapi/blob/master/API.md#server.expose())
- **`expose.js`** - export an array of objects `{ key, value }`.
- **`expose/index.js`** - export an array of objects.
- **`expose/property-name.js`** - export an object. The `key` will be assigned `'propertyName'` camel-cased from the filename if it isn't already specified.

#### Authentication schemes
> [`server.auth.scheme(name, scheme)`](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.scheme())
- **`auth/schemes.js`** - export an array of objects `{ name, scheme }`.
- **`auth/schemes/index.js`** - export an array of objects.
- **`auth/schemes/scheme-name.js`** - export an object. The `name` will be assigned `'scheme-name'` from the filename if it isn't already specified.

#### Authentication strategies
> [`server.auth.strategy(name, scheme, [options])`](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.strategy())
- **`auth/strategies.js`** - export an array of objects `{ name, scheme, mode, options }`.
- **`auth/strategies/index.js`** - export an array of objects.
- **`auth/strategies/strategy-name.js`** - export an object. The `name` will be assigned `'strategy-name'` from the filename if it isn't already specified.

#### Default auth strategy
> [`server.auth.default(options)`](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.default())
- **`auth/default.js`** - export `options`.
- **`auth/default/index.js`** - export `options`.

#### Cookies
> [`server.state(name, [options])`](https://github.com/hapijs/hapi/blob/master/API.md#server.state())
Expand All @@ -152,6 +105,53 @@ Here's the complete rundown of how files and directories are mapped to API calls
- **`services/index.js`** - export an array of `ServiceClass`es.
- **`models/service-name.js`** - export `ServiceClass`.

#### Globally bound context
> [`server.bind(context)`](https://github.com/hapijs/hapi/blob/master/API.md#server.bind())
- **`bind.js`** - export `context`.
- **`bind/index.js`** - export `context`.

#### Dependencies
> [`server.dependency(dependencies, [after])`](https://github.com/hapijs/hapi/blob/master/API.md#server.dependency())
- **`dependencies.js`** - export an array of objects `{ dependencies, after }`.
- **`dependencies/index.js`** - export an array of objects.
- **`dependencies/plugin-name.js`** - export an object. `dependencies` will be derived from the filename if it is not already specified.

#### Server methods
> [`server.method(name, method, [options])`](https://github.com/hapijs/hapi/blob/master/API.md#server.method())
- **`methods.js`** - export an array of objects `{ name, method, options }`.
- **`methods/index.js`** - export an array of objects.
- **`methods/method-name.js`** - export an object. The `name` will be assigned `'methodName'` camel-cased from the filename if it isn't already specified.

#### Server/request extensions
> [`server.ext(events)`](https://github.com/hapijs/hapi/blob/master/API.md#server.ext())
- **`extensions.js`** - export an array of `events`.
- **`extensions/index.js`** - export an array of `events`.
- **`extensions/[event-type].js`** - export `events`. The `type` (of each item if there are multiple) will be assigned `[event-type]` camel-cased from the filename if it isn't already specified. E.g. `onPreHandler`-type events can be placed in `extensions/on-pre-handler.js`.

#### Authentication schemes
> [`server.auth.scheme(name, scheme)`](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.scheme())
- **`auth/schemes.js`** - export an array of objects `{ name, scheme }`.
- **`auth/schemes/index.js`** - export an array of objects.
- **`auth/schemes/scheme-name.js`** - export an object. The `name` will be assigned `'scheme-name'` from the filename if it isn't already specified.

#### Authentication strategies
> [`server.auth.strategy(name, scheme, [options])`](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.strategy())
- **`auth/strategies.js`** - export an array of objects `{ name, scheme, mode, options }`.
- **`auth/strategies/index.js`** - export an array of objects.
- **`auth/strategies/strategy-name.js`** - export an object. The `name` will be assigned `'strategy-name'` from the filename if it isn't already specified.

#### Default auth strategy
> [`server.auth.default(options)`](https://github.com/hapijs/hapi/blob/master/API.md#server.auth.default())
- **`auth/default.js`** - export `options`.
- **`auth/default/index.js`** - export `options`.

#### Routes
> [`server.route(options)`](https://github.com/hapijs/hapi/blob/master/API.md#server.route())
Expand Down

0 comments on commit 4989257

Please sign in to comment.