ably / ably-php

PHP client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
49 stars 10 forks source link

Add support to get channel lifecycle status #155

Closed deanna-lad closed 2 years ago

deanna-lad commented 2 years ago

Add support to get channel lifecycle status

Channel lifecycle status is described at Channel status / REST / [Docs]

It is currently possible to retrieve channel lifecycle status in ably-go by using REST.Request and marshalling the result into a slice of empty interface.

Example:

result, _ := restClient.Request("get", "/channels/test").Pages(context.Background())

result.Next(ctx)

var items []interface{}
if err := result.Items(&items); err != nil {
    fmt.Println(err)
}

fmt.Printf("%+v\n", items)
// [map[channelId:test name:test status:map[isActive:true occupancy:map[metrics:map[connections:1 presenceConnections:1 presenceMembers:1 presenceSubscribers:1 publishers:1 subscribers:1]]]]]

Out of Scope Realtime subscription to Channel Lifecycle Events. This ticket is only for supporting REST client ‘Get’.

┆Issue is synchronized with this Jira Story by Unito