Skip to content

Commit

Permalink
Add API reference for deriveOptions and getDerived method
Browse files Browse the repository at this point in the history
  • Loading branch information
mohyour committed Apr 28, 2023
1 parent 40144ca commit bc8cedd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ Creates and destroys [`RestChannel`]{@link RestChannel} and [`RealtimeChannel`]{
|| `String` ||| The channel name. |
|| `ChannelOptions` ||| A [`ChannelOptions`]{@link ChannelOptions} object. |
||| `ChannelType` || A [`RestChannel`]{@link RestChannel} or [`RealtimeChannel`]{@link RealtimeChannel} object. |
| getDerived(String, DeriveOptions) -> ChannelType ||| RTS5, RTS5a, RTS5a1 | Creates a new derived [`RealtimeChannel`]{@link RealtimeChannel} object, with the provided [`DeriveOptions`]{@link DeriveOptions}, or returns the existing derived channel object. |
|| `String` ||| The channel name. |
|| `DeriveOptions` ||| A [`DeriveOptions`]{@link DeriveOptions} object. |
||| `ChannelType` || A [`RealtimeChannel`]{@link RealtimeChannel} object. |
| getDerived(String, DeriveOptions, ChannelOptions) -> ChannelType ||| RTS5, RTS5a, RTS5a2 | Creates a new derived [`RealtimeChannel`]{@link RealtimeChannel} object, with the provided [`DeriveOptions`]{@link DeriveOptions} and [`ChannelOptions`]{@link ChannelOptions}, or returns the existing derived channel object. |
|| `String` ||| The channel name. |
|| `DeriveOptions` ||| A [`DeriveOptions`]{@link DeriveOptions} object. |
|| `ChannelOptions` ||| A [`ChannelOptions`]{@link ChannelOptions} object. |
||| `ChannelType` || A [`RealtimeChannel`]{@link RealtimeChannel} object. |
| iterate() -> `Iterator<ChannelType>` ||| RSN2, RTS2 | Iterates through the existing channels. |
||| `ChannelType` || Each iteration returns a [`RestChannel`]{@link RestChannel} or [`RealtimeChannel`]{@link RealtimeChannel} object. |
| release(String) ||| RSN4, RTS4 | Releases a [`RestChannel`]{@link RestChannel} or [`RealtimeChannel`]{@link RealtimeChannel} object, deleting it, and enabling it to be garbage collected. It also removes any listeners associated with the channel. To release a channel, the [`ChannelState`]{@link ChannelState} must be `INITIALIZED`, `DETACHED`, or `FAILED`. |
Expand Down Expand Up @@ -459,6 +468,15 @@ Passes additional properties to a [`RestChannel`]{@link RestChannel} or [`Realti
| params?: `Dict<String, String>` ||| TB2c | [Channel Parameters](https://ably.com/docs/realtime/channels/channel-parameters/overview) that configure the behavior of the channel. |
| modes?: [ChannelMode] ||| TB2d | An array of [`ChannelMode`]{@link ChannelMode} objects. |


## class DeriveOptions

Passes additional properties to a [`RealtimeChannel`]{@link RealtimeChannel} object, such as filter, to create a new derived/synthetic channel.

| Method / Property | Parameter | Returns | Spec | Description |
|---|---|---|---|----|
| filter: `String` ||| RTS5a | JMESPath string expression of filter property to be used to create a Subscription filter derived channel |

## class ChannelDetails

Contains the details of a [`RestChannel`]{@link RestChannel} or [`RealtimeChannel`]{@link RealtimeChannel} object such as its ID and [`ChannelStatus`]{@link ChannelStatus}.
Expand Down
1 change: 1 addition & 0 deletions implemented.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| class BatchSpec |||
| class ChannelStateChange |||
| class ChannelOptions |||
| class DeriveOptions |||
| class ChannelDetails |||
| class ChannelStatus |||
| class ChannelOccupancy |||
Expand Down

0 comments on commit bc8cedd

Please sign in to comment.