You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/api/realtime-sdk/channels.mdx
+58-2Lines changed: 58 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -824,7 +824,7 @@ Failure to retrieve the message history will trigger the `errback` callbacks of
824
824
825
825
</If>
826
826
827
-
<Iflang="javascript,nodejs,java">
827
+
<Iflang="javascript,nodejs,java,python">
828
828
829
829
#### getMessage
830
830
@@ -836,6 +836,10 @@ Failure to retrieve the message history will trigger the `errback` callbacks of
836
836
`Message getMessage(String serial)`
837
837
</If>
838
838
839
+
<Iflang="python">
840
+
`Message get_message(serial_or_message)`
841
+
</If>
842
+
839
843
Retrieves the latest version of a specific message by its serial identifier. Requires the **history**[capability](/docs/auth/capabilities).
840
844
841
845
See [updating and deleting messages: retrieving the latest version](/docs/messages/updates-deletes#get) for more information.
@@ -862,6 +866,18 @@ Returns a promise which, upon success, will be fulfilled with a [`Message`](/doc
862
866
Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message.
863
867
</If>
864
868
869
+
<Iflang="python">
870
+
| Parameter | Description | Type |
871
+
|-----------|-------------|------|
872
+
| serial_or_message | Either the serial identifier string of the message to retrieve, or a `Message` object containing a populated `serial` field |`str` or `Message`|
873
+
874
+
##### Returns
875
+
876
+
Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message.
877
+
878
+
On failure, raises an [`AblyException`](/docs/api/realtime-sdk/types#ably-exception).
879
+
</If>
880
+
865
881
#### updateMessage
866
882
867
883
<Iflang="javascript,nodejs">
@@ -872,6 +888,10 @@ Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the l
Publishes an update to an existing message with shallow mixin semantics. Non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
876
896
877
897
See [updating and deleting messages: updates](/docs/messages/updates-deletes#update) for more information.
@@ -895,6 +915,14 @@ Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteR
895
915
Invokes the provided `Callback<UpdateDeleteResult>` with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message on success, or with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object describing the error on failure.
896
916
</If>
897
917
918
+
<Iflang="python">
919
+
##### Returns
920
+
921
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
922
+
923
+
On failure, raises an [`AblyException`](/docs/api/realtime-sdk/types#ably-exception).
924
+
</If>
925
+
898
926
#### deleteMessage
899
927
900
928
<Iflang="javascript,nodejs">
@@ -905,6 +933,10 @@ Invokes the provided `Callback<UpdateDeleteResult>` with an [`UpdateDeleteResult
Marks a message as deleted by publishing an update with an action of `MESSAGE_DELETE`. This does not remove the message from the server, and the full message history remains accessible. Uses shallow mixin semantics: non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-delete-own** or **message-delete-any**[capability](/docs/auth/capabilities).
909
941
910
942
See [updating and deleting messages: deletes](/docs/messages/updates-deletes#delete) for more information.
@@ -928,6 +960,14 @@ Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteR
928
960
Invokes the provided `Callback<UpdateDeleteResult>` with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message on success, or with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object describing the error on failure.
929
961
</If>
930
962
963
+
<Iflang="python">
964
+
##### Returns
965
+
966
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
967
+
968
+
On failure, raises an [`AblyException`](/docs/api/realtime-sdk/types#ably-exception).
969
+
</If>
970
+
931
971
#### appendMessage
932
972
933
973
<Iflang="javascript,nodejs">
@@ -938,6 +978,10 @@ Invokes the provided `Callback<UpdateDeleteResult>` with an [`UpdateDeleteResult
Appends data to an existing message. The supplied `data` field is appended to the previous message's data, while all other fields (`name`, `extras`) replace the previous values if provided. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
942
986
943
987
See [updating and deleting messages: appends](/docs/messages/updates-deletes#append) for more information.
@@ -961,6 +1005,14 @@ Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteR
961
1005
Invokes the provided `Callback<UpdateDeleteResult>` with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message on success, or with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object describing the error on failure.
962
1006
</If>
963
1007
1008
+
<Iflang="python">
1009
+
##### Returns
1010
+
1011
+
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
1012
+
1013
+
On failure, raises an [`AblyException`](/docs/api/realtime-sdk/types#ably-exception).
1014
+
</If>
1015
+
964
1016
#### getMessageVersions
965
1017
966
1018
<Iflang="javascript,nodejs">
@@ -971,6 +1023,10 @@ Invokes the provided `Callback<UpdateDeleteResult>` with an [`UpdateDeleteResult
Retrieves all historical versions of a specific message, ordered by version. This includes the original message and all subsequent updates or delete operations. Requires the **history**[capability](/docs/auth/capabilities).
975
1031
976
1032
See [updating and deleting messages: message versions](/docs/messages/updates-deletes#versions) for more information.
@@ -988,7 +1044,7 @@ See [updating and deleting messages: message versions](/docs/messages/updates-de
988
1044
Returns a promise which, upon success, will be fulfilled with a [`PaginatedResult`](#paginated-result) object containing an array of [`Message`](/docs/api/realtime-sdk/messages) objects representing all versions of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
989
1045
</If>
990
1046
991
-
<Iflang="java">
1047
+
<Iflang="java,python">
992
1048
##### Returns
993
1049
994
1050
On success, the returned [`PaginatedResult`](#paginated-result) encapsulates an array of [`Message`](#message) objects corresponding to the current page of results. [`PaginatedResult`](#paginated-result) supports pagination using [`next`](#paginated-result) and [`first`](#paginated-result) methods.
Copy file name to clipboardExpand all lines: src/pages/docs/api/rest-sdk/channels.mdx
+37-5Lines changed: 37 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -465,7 +465,7 @@ On failure to retrieve message history, the `error` contains an [`ErrorInfo`](#e
465
465
466
466
</If>
467
467
468
-
<Iflang="javascript,nodejs">
468
+
<Iflang="javascript,nodejs,java,python">
469
469
470
470
#### getMessage <aid="get-message" />
471
471
@@ -477,6 +477,10 @@ On failure to retrieve message history, the `error` contains an [`ErrorInfo`](#e
477
477
`Message getMessage(String serial)`
478
478
</If>
479
479
480
+
<Iflang="python">
481
+
`Message get_message(serial_or_message)`
482
+
</If>
483
+
480
484
Retrieves the latest version of a specific message by its serial identifier. Requires the **history**[capability](/docs/auth/capabilities).
481
485
482
486
See [updating and deleting messages: retrieving the latest version](/docs/messages/updates-deletes#get) for more information.
@@ -503,6 +507,18 @@ Returns a promise which, upon success, will be fulfilled with a [`Message`](/doc
503
507
Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message.
504
508
</If>
505
509
510
+
<Iflang="python">
511
+
| Parameter | Description | Type |
512
+
|-----------|-------------|------|
513
+
| serial_or_message | Either the serial identifier string of the message to retrieve, or a `Message` object containing a populated `serial` field |`str` or `Message`|
514
+
515
+
##### Returns
516
+
517
+
Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the latest version of the message.
518
+
519
+
On failure, raises an [`AblyException`](/docs/api/realtime-sdk/types#ably-exception).
520
+
</If>
521
+
506
522
#### updateMessage <aid="update-message" />
507
523
508
524
<Iflang="javascript,nodejs">
@@ -513,6 +529,10 @@ Returns a [`Message`](/docs/api/realtime-sdk/messages) object representing the l
Publishes an update to an existing message with shallow mixin semantics. Non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
517
537
518
538
See [updating and deleting messages: updates](/docs/messages/updates-deletes#update) for more information.
@@ -531,7 +551,7 @@ See [updating and deleting messages: updates](/docs/messages/updates-deletes#upd
531
551
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
532
552
</If>
533
553
534
-
<Iflang="java">
554
+
<Iflang="java, python">
535
555
##### Returns
536
556
537
557
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
@@ -547,6 +567,10 @@ Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-res
Marks a message as deleted by publishing an update with an action of `MESSAGE_DELETE`. This does not remove the message from the server, and the full message history remains accessible. Uses shallow mixin semantics: non-null `name`, `data`, and `extras` fields in the provided message will replace the corresponding fields in the existing message, while null fields will be left unchanged. Requires the **message-delete-own** or **message-delete-any**[capability](/docs/auth/capabilities).
551
575
552
576
See [updating and deleting messages: deletes](/docs/messages/updates-deletes#delete) for more information.
@@ -565,7 +589,7 @@ See [updating and deleting messages: deletes](/docs/messages/updates-deletes#del
565
589
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
566
590
</If>
567
591
568
-
<Iflang="java">
592
+
<Iflang="java,python">
569
593
##### Returns
570
594
571
595
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
@@ -581,6 +605,10 @@ Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-res
Appends data to an existing message. The supplied `data` field is appended to the previous message's data, while all other fields (`name`, `extras`) replace the previous values if provided. Requires the **message-update-own** or **message-update-any**[capability](/docs/auth/capabilities).
585
613
586
614
For publishing a high rate of appends, you typically want to use a realtime client, not a REST client, in order to have message order preservation. See [append ordering](/docs/messages/updates-deletes#append-ordering).
@@ -601,7 +629,7 @@ See [updating and deleting messages: appends](/docs/messages/updates-deletes#app
601
629
Returns a promise which, upon success, will be fulfilled with an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
602
630
</If>
603
631
604
-
<Iflang="java">
632
+
<Iflang="java,python">
605
633
##### Returns
606
634
607
635
Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-result) object containing the new version of the message.
@@ -617,6 +645,10 @@ Returns an [`UpdateDeleteResult`](/docs/api/realtime-sdk/types#update-delete-res
Retrieves all historical versions of a specific message, ordered by version. This includes the original message and all subsequent updates or delete operations. Requires the **history**[capability](/docs/auth/capabilities).
621
653
622
654
See [updating and deleting messages: versions](/docs/messages/updates-deletes#versions) for more information.
@@ -634,7 +666,7 @@ See [updating and deleting messages: versions](/docs/messages/updates-deletes#ve
634
666
Returns a promise which, upon success, will be fulfilled with a [`PaginatedResult`](#paginated-result) object containing an array of [`Message`](/docs/api/realtime-sdk/messages) objects representing all versions of the message. Upon failure, the promise will be rejected with an [`ErrorInfo`](/docs/api/realtime-sdk/types#error-info) object which explains the error.
635
667
</If>
636
668
637
-
<Iflang="java">
669
+
<Iflang="java,python">
638
670
##### Returns
639
671
640
672
On success, the returned [`PaginatedResult`](#paginated-result) encapsulates an array of [`Message`](#message) objects corresponding to the current page of results. [`PaginatedResult`](#paginated-result) supports pagination using [`next`](#paginated-result) and [`first`](#paginated-result) methods.
0 commit comments