Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add since #292

Merged
merged 2 commits into from
May 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/sdk-reference/js/6/extend-sdk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ order: 410

# Extend the SDK with a custom SDK controller

{{{since "6.1.1"}}}

It is possible to extend the SDK's API by adding new controllers.

These controllers correspond to [custom controllers created in a plugin]({{ site_base_path }}plugins/1/essentials/controllers). Thus, it is possible to use the actions of a core plugin in the SDK in the same way as the other actions of the Kuzzle API.
Expand All @@ -23,7 +25,7 @@ After defining your new controller based on `BaseController`, you can add it to

The constructor of a custom SDK controller will be called by passing the SDK instance to it. It must call the parent constructor with this instance of the SDK and its name as defined in the API.

For instance, if there is a plugin named `nyc-open-data-taxi`, extending Kuzzle's API with the following controller:
For instance, if there is a plugin named `nyc-open-data-plugin`, extending Kuzzle's API with the following controller:

```javascript
this.controllers = {
Expand Down