-
Notifications
You must be signed in to change notification settings - Fork 43
[EDU-1590] Update JS API references to match latest ably-js v2 API #2648
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
de8f17d
to
b90fcdf
Compare
@m-hulbert There are couple of rendering issues I wasn't able to resolve, would like to get your help with them:
Sreenshots at the bottom. I think all of those issues are caused by the use of language tags, |
This includes next changes for the JS API: - update Messages docs - update ClientOptions docs - update Encryption docs - update Stats docs - update Request docs - update Connection docs - update Presence docs - update Authentication docs - update History docs - update Push Device docs - update PushAdmin docs - update PaginatedResult and HttpPaginatedResponse docs - add docs for batch publish and batch presence - various formatting, styling and bug fixes across the board
b90fcdf
to
f289501
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finishing this off @VeskeR
I pushed a fixup which sorts out the rendering issues you found. I've also been through everything else and it all seems to be showing the correct info.
Anything that is slightly awry is down to the current toolchain and format, which will be resolved in the not-too-distant-future. The more important thing is to get the updated info out.
|
||
Enter a presence channel and provide data that is associated with the current present member. If the channel is @initialized@ (i.e. no attempt to attach has yet been made for this channel), then calling @enter@ will implicitly attach the channel. | ||
Enter a presence channel with an optional data that is associated with the current present member. If the channel is @initialized@ (i.e. no attempt to attach has yet been made for this channel), then calling @enter@ will implicitly attach the channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enter a presence channel with an optional data that is associated with the current present member. If the channel is @initialized@ (i.e. no attempt to attach has yet been made for this channel), then calling @enter@ will implicitly attach the channel. | |
Enter a presence channel with optional data that is associated with the current presence member. If the channel is @initialized@ (i.e. no attempt to attach has yet been made for this channel), then calling @enter@ will implicitly attach the channel. |
blang[jsall,ruby,flutter]. | ||
|
||
h3(#device-details). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct for device details and local device to be underneath this blang? I think they exist in more SDKs than just Ruby, Flutter and JS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe they exists in dotnet, java, obj-c, swift as well, but if they haven't been added in API references before, I would suggest adding them in the separate PR (it's a bit out of scope here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good, thanks @VeskeR for adding all this, I spotted couple of places where we have java-style type definitions instead of js/ts
ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable history(Hash option) -> yields "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> | ||
java: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history("Param":#param[] option) | ||
default: history(Object option, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) | ||
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"PresenceMessage":#presence-message>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be?
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"PresenceMessage":#presence-message>> | |
jsall: history(params?: RestHistoryParams): Promise<"PaginatedResult":#paginated-result<"PresenceMessage":#presence-message>> |
ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable history(Hash option) -> yields "PaginatedResult":#paginated-result<"Message":#message> | ||
java: "PaginatedResult":#paginated-result<"Message":#message> history("Param":#param[] option) | ||
default: history(Object option, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) | ||
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"Message":#message>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"Message":#message>> | |
jsall: history(params?): Promise<"PaginatedResult":#paginated-result<"Message":#message>> |
java: "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":/docs/api/realtime-sdk/types#stats-type> stats("Param":#param[] options) | ||
swift,objc: stats(query: ARTStatsQuery?, callback: ("ARTPaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"ARTStats":/docs/api/realtime-sdk/types#stats>?, ARTErrorInfo?) -> Void) throws | ||
csharp: Task<"PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":/docs/api/realtime-sdk/types#status>> StatsAsync("StatsRequestParams":#statsdatarequest query) | ||
jsall: stats(Object params?): Promise<"PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":#stats-type>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsall: stats(Object params?): Promise<"PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":#stats-type>> | |
jsall: stats(params?): Promise<"PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":#stats-type>> |
blang[jsall]. | ||
|
||
bq(definition#publish-msg). | ||
jsall: publish(Object message, "PublishOptions":#publish-options options?): Promise<void> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsall: publish(Object message, "PublishOptions":#publish-options options?): Promise<void> | |
jsall: publish("Message":#message, "PublishOptions":#publish-options options?): Promise<void> |
bq(definition#publish-msg-array). | ||
default: publish(Object[] messages, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) | ||
jsall: publish(Object[] messages, "PublishOptions":#publish-options options?): Promise<Void> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsall: publish(Object[] messages, "PublishOptions":#publish-options options?): Promise<Void> | |
jsall: publish("Message":#message[], "PublishOptions":#publish-options options?): Promise<Void> |
javascript: Crypto.generateRandomKey(Number keyLength?): Promise<ArrayBuffer> | ||
nodejs: Crypto.generateRandomKey(Number keyLength?): Promise<Buffer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
javascript: Crypto.generateRandomKey(Number keyLength?): Promise<ArrayBuffer> | |
nodejs: Crypto.generateRandomKey(Number keyLength?): Promise<Buffer> | |
javascript: Crypto.generateRandomKey(keyLength?: number): Promise<ArrayBuffer> | |
nodejs: Crypto.generateRandomKey(keyLength?: number): Promise<Buffer> |
|
||
h6(#channel-history). | ||
default: history | ||
csharp,go: History | ||
|
||
bq(definition). | ||
default: history(Object option, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) | ||
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"Message":#message>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"Message":#message>> | |
jsall: history(params?): Promise<"PaginatedResult":#paginated-result<"Message":#message>> |
@@ -42,11 +36,12 @@ h6(#get). | |||
Get the current presence member set for this channel. In the REST client library this method directly queries "Ably's REST presence API":/docs/api/rest-api#presence | |||
|
|||
bq(definition). | |||
default: get(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) | |||
default: get(Object options, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) | |||
jsall: get(Object params?): Promise<"PresenceMessage[]":#presence-message> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsall: get(Object params?): Promise<"PresenceMessage[]":#presence-message> | |
jsall: get(params?): Promise<"PresenceMessage[]":#presence-message> |
|
||
bq(definition). | ||
default: history(Object options, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) | ||
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"PresenceMessage":#presence-message>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsall: history(Object params?): Promise<"PaginatedResult":#paginated-result<"PresenceMessage":#presence-message>> | |
jsall: history(params?): Promise<"PaginatedResult":#paginated-result<"PresenceMessage":#presence-message>> |
java: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":/docs/api/rest-sdk/types#stats-type> stats("Param":#param[] options) | ||
csharp: Task<"PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":/docs/api/rest-sdk/types#stats-type>> StatsAsync(@StatsRequestParams@ query) | ||
swift,objc: stats(query: ARTStatsQuery?, callback: ("ARTPaginatedResult":#/docs/realtime/types#paginated-result<"ARTStats":/docs/api/realtime-sdk/types#stats>?, ARTErrorInfo?) -> Void) throws | ||
jsall: stats(Object params?): Promise<"PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats-type>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsall: stats(Object params?): Promise<"PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats-type>> | |
jsall: stats(params?): Promise<"PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats-type>> |
Description
Based on the work done by @m-hulbert in 521c24f, this PR adds final changes in de8f17d to update all JS API docs to match latest ably-js v2.
Note:
Message.summary
,Annotation
message,RestAnnotations
andRealtimeAnnotations
are not included in this PR. Should be added once Feature/pub 1676 message annotations #2642 is completed and merged.Resolves EDU-1590
Checklist