Skip to content
This repository was archived by the owner on Feb 22, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions src/sdk-reference/collection-mapping/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,4 @@ Once a field mapping has been set, it cannot be removed without reconstructing t

| Property name | Type | Description | get/set |
|--------------|--------|-----------------------------------|---------|
| ``headers`` | JSON Object | Common headers for all sent documents. | get/set |
| ``mapping`` | object | Easy-to-understand list of mappings per field | get/set |

**Note:** the ``headers`` property is inherited from the provided [Collection]({{ site_base_path }}sdk-reference/collection/) object and can be overrided
57 changes: 0 additions & 57 deletions src/sdk-reference/collection-mapping/set-headers.md

This file was deleted.

11 changes: 4 additions & 7 deletions src/sdk-reference/collection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ subheader-title: Constructor
# Collection

```js
let dataCollection = new Collection(kuzzle, "my-collection", "my-index")
const dataCollection = new Collection(kuzzle, "my-collection", "my-index")
```

```java
Collection myCollection = new Collection(kuzzle, "my-collection", "my-index");
Collection myCollection = new Collection(kuzzle, "my-collection", "my-index");
```

```php
Expand Down Expand Up @@ -53,10 +53,7 @@ A data collection is a set of data managed by Kuzzle. It acts like a data table

| Property name | Type | Description | get/set |
|--------------|--------|-----------------------------------|---------|
| ``kuzzle`` | object | linked kuzzle instance | get |
| ``index`` | object | Name of the index containing the data collection | get |
| ``collection`` | string | The name of the data collection handled by this instance | get |
| ``headers`` | object | Headers for all sent documents. | get/set |

| ``index`` | object | Name of the index containing the data collection | get |
| ``kuzzle`` | object | linked kuzzle instance | get |

**Note:** the ``headers`` property is inherited from the main ``Kuzzle`` object and can be overrided
69 changes: 0 additions & 69 deletions src/sdk-reference/collection/set-headers.md

This file was deleted.

6 changes: 3 additions & 3 deletions src/sdk-reference/document/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ Kuzzle handles documents, either as realtime messages or as stored documents. Do
|--------------|--------|-----------------------------------|---------|
| ``collection`` | string | The data collection associated to this document | get |
| ``content`` | JSON Object | The content of the document | get/set |
| ``headers`` | JSON Object | Common headers for all sent documents. | get/set |
| ``id`` | string | Unique document identifier | get/set |
| ``meta`` | JSON Object | Document [metadata]({{ site_base_path }}guide/essentials/document-metadata/) | get/set |
| ``version`` | integer | Current document version | get |

**Notes:**

* setting a new value to the ``content`` property is equivalent to calling ``setContent(data, false)``
* setting a new value to the ``id`` property will force this value for this document
* the ``headers`` property is inherited from the provided ``Collection`` object and can be overrided
* setting a new value to the ``meta`` property is equivalent to calling ``setMeta(data, false)``
* setting a new value to the ``id`` property will create a new document after `save` is called
57 changes: 0 additions & 57 deletions src/sdk-reference/document/set-headers.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/sdk-reference/document/set-meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $metadata = [
$document->setMeta($metadata);
```

Replaces or updates the current document metadata with provided ones.
Replaces or updates the current document [metadata]({{ site_base_path }}guide/essentials/document-metadata/) with the provided ones.
This is a helper function returning itself, allowing to easily chain calls.

<aside class="notice">
Expand Down
45 changes: 20 additions & 25 deletions src/sdk-reference/kuzzle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ order: 100
var kuzzle = new Kuzzle('localhost', {
defaultIndex: 'some index',
autoReconnect: true,
headers: {someheader: "value"},
port: 7512
});

Expand All @@ -36,7 +35,6 @@ Options options = new Options();

options.setDefaultIndex("some index")
.setAutoReconnect(true),
.setHeaders(new JSONObject().put("someheader", "value"))
.setPort(7512);

Kuzzle kuzzle = new Kuzzle("localhost", options, new ResponseListener<Void>() {
Expand Down Expand Up @@ -88,8 +86,6 @@ This is the main entry point to communicate with Kuzzle. Every other objects inh
| ``autoResubscribe`` | boolean | Automatically renew all subscriptions on a ``reconnected`` event | ``true`` |
| ``connect`` | string | Manually or automatically connect to the Kuzzle instance | ``auto`` |
| ``defaultIndex`` | string | Set the default index to use | |
| ``headers`` | JSON object | Common headers for all sent documents | |
| ``volatile`` | JSON object | Common volatile data, will be sent to all future requests | |
| ``offlineMode`` | string | Offline mode configuration | ``manual`` |
| ``protocol`` | string | (Javascript only) Network protocol to use to connect to Kuzzle (``websocket`` | ``socketio``) | ``websocket``|
| ``port`` | integer | Kuzzle network port | 7512 |
Expand All @@ -98,6 +94,7 @@ This is the main entry point to communicate with Kuzzle. Every other objects inh
| ``replayInterval`` | integer | Delay between each replayed requests, in milliseconds | ``10`` |
| ``reconnectionDelay`` | integer | number of milliseconds between reconnection attempts | ``1000`` |
| ``sslConnection`` | boolean | Switch Kuzzle connection to SSL mode | ``false`` |
| ``volatile`` | JSON object | Common volatile data, will be sent to all future requests | |

**Notes:**

Expand All @@ -107,26 +104,25 @@ This is the main entry point to communicate with Kuzzle. Every other objects inh

## Properties

| Property name | Type | Description |
|---------------|------|-------------|
| ``autoQueue`` | boolean | Automatically queue all requests during offline mode |
| ``autoReconnect`` | boolean | Automatically reconnect after a connection loss |
| ``autoReplay`` | boolean | Automatically replay queued requests on a ``reconnected`` event |
| ``autoResubscribe`` | boolean | Automatically renew all subscriptions on a ``reconnected`` event |
| ``defaultIndex`` | string | Kuzzle's default index to use |
| ``headers`` | JSON object | Common headers for all sent documents. |
| ``host`` | string | Target Kuzzle host name/address |
| ``jwt`` | string | Token used in requests for authentication. |
| ``volatile`` | JSON object | Common volatile data, will be sent to all future requests |
| ``offlineQueue`` | JSON object | Contains the queued requests during offline mode |
| ``offlineQueueLoader`` | function | Called before dequeuing requests after exiting offline mode, to add items at the beginning of the offline queue |
| ``port`` | integer | Kuzzle network port |
| ``queueFilter`` | function | Called during offline mode. Takes a request object as arguments and returns a boolean, indicating if a request can be queued |
| ``queueMaxSize`` | integer | Number of maximum requests kept during offline mode |
| ``queueTTL`` | integer | Time a queued request is kept during offline mode, in milliseconds |
| ``replayInterval`` | integer | Delay between each replayed requests |
| ``reconnectionDelay`` | integer | Number of milliseconds between reconnection attempts |
| ``sslConnection`` | boolean | Connect to Kuzzle using SSL |
| Property name | Type | Description | Writable? |
|---------------|------|-------------|:---------:|
| ``autoQueue`` | boolean | Automatically queue all requests during offline mode | Yes |
| ``autoReconnect`` | boolean | Automatically reconnect after a connection loss | No |
| ``autoReplay`` | boolean | Automatically replay queued requests on a ``reconnected`` event | Yes |
| ``autoResubscribe`` | boolean | Automatically renew all subscriptions on a ``reconnected`` event | No |
| ``defaultIndex`` | string | Kuzzle's default index to use | Yes |
| ``host`` | string | Target Kuzzle host name/address | No |
| ``jwt`` | string | Token used in requests for authentication. | Yes |
| ``offlineQueue`` | JSON object | Contains the queued requests during offline mode | No |
| ``offlineQueueLoader`` | function | Called before dequeuing requests after exiting offline mode, to add items at the beginning of the offline queue | Yes |
| ``port`` | integer | Kuzzle network port | No |
| ``queueFilter`` | function | Called during offline mode. Takes a request object as arguments and returns a boolean, indicating if a request can be queued | Yes |
| ``queueMaxSize`` | integer | Number of maximum requests kept during offline mode | Yes |
| ``queueTTL`` | integer | Time a queued request is kept during offline mode, in milliseconds | Yes |
| ``replayInterval`` | integer | Delay between each replayed requests | Yes |
| ``reconnectionDelay`` | integer | Number of milliseconds between reconnection attempts | No |
| ``sslConnection`` | boolean | Connect to Kuzzle using SSL | No |
| ``volatile`` | JSON object | Common volatile data, will be sent to all future requests | Yes |

**Notes:**

Expand All @@ -138,7 +134,6 @@ This is the main entry point to communicate with Kuzzle. Every other objects inh
* The offline buffer acts like a FIFO queue, meaning that if the ``queueMaxSize`` limit is reached, older requests are discarded to make room for new requests
* if ``queueMaxSize`` is set to ``0``, an unlimited number of requests is kept until the buffer is flushed
* the ``offlineQueueLoader`` must be set with a function, taking no argument, and returning an array of objects containing a `query` member with a Kuzzle query to be replayed, and an optional `cb` member with the corresponding callback to invoke with the query result
* updates to ``host``, ``port``, ``autoReconnect``, ``reconnectionDelay`` and ``sslConnection`` properties will only take effect on next ``connect`` call

---

Expand Down
53 changes: 0 additions & 53 deletions src/sdk-reference/kuzzle/set-headers.md

This file was deleted.

Loading