Skip to content
Open
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
57 changes: 11 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ $ ably-interactive
* [`ably channels occupancy subscribe CHANNEL`](#ably-channels-occupancy-subscribe-channel)
* [`ably channels presence`](#ably-channels-presence)
* [`ably channels presence enter CHANNEL`](#ably-channels-presence-enter-channel)
* [`ably channels presence get-all CHANNEL`](#ably-channels-presence-get-all-channel)
* [`ably channels presence get CHANNEL`](#ably-channels-presence-get-channel)
* [`ably channels presence subscribe CHANNEL`](#ably-channels-presence-subscribe-channel)
* [`ably channels presence update CHANNEL`](#ably-channels-presence-update-channel)
* [`ably channels publish CHANNEL MESSAGE`](#ably-channels-publish-channel-message)
* [`ably channels subscribe CHANNELS`](#ably-channels-subscribe-channels)
* [`ably channels update CHANNEL SERIAL MESSAGE`](#ably-channels-update-channel-serial-message)
Expand Down Expand Up @@ -1896,7 +1895,7 @@ _See code: [src/commands/channels/presence.ts](https://github.com/ably/ably-cli/

## `ably channels presence enter CHANNEL`

Enter presence on a channel and listen for presence events
Enter presence on a channel and remains present until terminated. Provide clientId and data to update existing presence member.

```
USAGE
Expand All @@ -1918,7 +1917,7 @@ FLAGS
--show-others Show other presence events while present (default: false)

DESCRIPTION
Enter presence on a channel and listen for presence events
Enter presence on a channel and remains present until terminated. Provide clientId and data to update existing presence member.

EXAMPLES
$ ably channels presence enter my-channel --client-id "client123"
Expand All @@ -1938,13 +1937,13 @@ EXAMPLES

_See code: [src/commands/channels/presence/enter.ts](https://github.com/ably/ably-cli/blob/v0.17.0/src/commands/channels/presence/enter.ts)_

## `ably channels presence get-all CHANNEL`
## `ably channels presence get CHANNEL`

Get all current presence members on a channel

```
```text
USAGE
$ ably channels presence get-all CHANNEL [-v] [--json | --pretty-json] [--limit <value>]
$ ably channels presence get CHANNEL [-v] [--json | --pretty-json] [--limit <value>]

ARGUMENTS
CHANNEL Channel name to get presence members for
Expand All @@ -1959,16 +1958,16 @@ DESCRIPTION
Get all current presence members on a channel

EXAMPLES
$ ably channels presence get-all my-channel
$ ably channels presence get my-channel

$ ably channels presence get-all my-channel --limit 50
$ ably channels presence get my-channel --limit 50

$ ably channels presence get-all my-channel --json
$ ably channels presence get my-channel --json

$ ably channels presence get-all my-channel --pretty-json
$ ably channels presence get my-channel --pretty-json
```

_See code: [src/commands/channels/presence/get-all.ts](https://github.com/ably/ably-cli/blob/v0.17.0/src/commands/channels/presence/get-all.ts)_
_See code: [src/commands/channels/presence/get.ts](https://github.com/ably/ably-cli/blob/v0.17.0/src/commands/channels/presence/get.ts)_

## `ably channels presence subscribe CHANNEL`

Expand Down Expand Up @@ -2008,40 +2007,6 @@ EXAMPLES

_See code: [src/commands/channels/presence/subscribe.ts](https://github.com/ably/ably-cli/blob/v0.17.0/src/commands/channels/presence/subscribe.ts)_

## `ably channels presence update CHANNEL`

Update presence data on a channel

```
USAGE
$ ably channels presence update CHANNEL --data <value> [-v] [--json | --pretty-json] [--client-id <value>] [-D
<value>]

ARGUMENTS
CHANNEL Channel to update presence on

FLAGS
-D, --duration=<value> Automatically exit after N seconds
-v, --verbose Output verbose logs
--client-id=<value> Overrides any default client ID when using API authentication. Use "none" to explicitly set
no client ID. Not applicable when using token authentication.
--data=<value> (required) JSON data to associate with the presence update
--json Output in JSON format
--pretty-json Output in colorized JSON format

DESCRIPTION
Update presence data on a channel

EXAMPLES
$ ably channels presence update my-channel --data '{"status":"away"}'

$ ably channels presence update my-channel --data '{"status":"busy"}' --json

$ ably channels presence update my-channel --data '{"status":"online"}' --duration 60
```

_See code: [src/commands/channels/presence/update.ts](https://github.com/ably/ably-cli/blob/v0.17.0/src/commands/channels/presence/update.ts)_

## `ably channels publish CHANNEL MESSAGE`

Publish a message to an Ably channel
Expand Down
2 changes: 1 addition & 1 deletion src/commands/channels/presence/enter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class ChannelsPresenceEnter extends AblyBaseCommand {
};

static override description =
"Enter presence on a channel and listen for presence events";
"Enter presence on a channel and remains present until terminated. Provide clientId and data to update existing presence member.";

static override examples = [
'$ ably channels presence enter my-channel --client-id "client123"',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
formatPaginationLog,
} from "../../../utils/pagination.js";

export default class ChannelsPresenceGetAll extends AblyBaseCommand {
export default class ChannelsPresenceGet extends AblyBaseCommand {
static override args = {
channel: Args.string({
description: "Channel name to get presence members for",
Expand All @@ -31,10 +31,10 @@ export default class ChannelsPresenceGetAll extends AblyBaseCommand {
static override description = "Get all current presence members on a channel";

static override examples = [
"$ ably channels presence get-all my-channel",
"$ ably channels presence get-all my-channel --limit 50",
"$ ably channels presence get-all my-channel --json",
"$ ably channels presence get-all my-channel --pretty-json",
"$ ably channels presence get my-channel",
"$ ably channels presence get my-channel --limit 50",
"$ ably channels presence get my-channel --json",
"$ ably channels presence get my-channel --pretty-json",
];

static override flags = {
Expand All @@ -47,7 +47,7 @@ export default class ChannelsPresenceGetAll extends AblyBaseCommand {
};

async run(): Promise<void> {
const { args, flags } = await this.parse(ChannelsPresenceGetAll);
const { args, flags } = await this.parse(ChannelsPresenceGet);

try {
const client = await this.createAblyRestClient(flags);
Expand Down Expand Up @@ -154,7 +154,7 @@ export default class ChannelsPresenceGetAll extends AblyBaseCommand {
}
}
} catch (error) {
this.fail(error, flags, "presenceGetAll", {
this.fail(error, flags, "presenceGet", {
channel: args.channel,
});
}
Expand Down
163 changes: 0 additions & 163 deletions src/commands/channels/presence/update.ts

This file was deleted.

Loading
Loading