diff --git a/content/account/app/index.textile b/content/account/app/index.textile index 60c2a07c5e..c2b70e9fab 100644 --- a/content/account/app/index.textile +++ b/content/account/app/index.textile @@ -54,7 +54,7 @@ Create, manage, and configure "API keys":/account/dashboard/api by setting capab h3. Integrations -"Integrate":/general/integrations Ably with external services, enabling data to flow between Ably channels and third-party platforms: +"Integrate":/docs/general/integrations Ably with external services, enabling data to flow between Ably channels and third-party platforms: * Ably events can trigger webhook requests to external services, or external services can send data to Ably using incoming webhooks. * Ably enables continuous streaming of events to external services like Amazon Kinesis or Kafka, or can receive inbound streams from external services. diff --git a/content/account/app/queues.textile b/content/account/app/queues.textile index 86c242b8d5..006048766a 100644 --- a/content/account/app/queues.textile +++ b/content/account/app/queues.textile @@ -4,7 +4,7 @@ meta_description: Manage and configure Ably queues, monitor realtime data, and o meta_keywords: “Ably Queues, realtime data, AMQP, STOMP, queue management, TTL, queue settings" --- -Ably queues provide a way to consume realtime data using the "AMQP":/general/queues#consume-amqp or "STOMP":/general/queues#consume-stomp protocols. Find out more about using "Ably queues":/general/queues#what. +Ably queues provide a way to consume realtime data using the "AMQP":/docs/general/queues#consume-amqp or "STOMP":/docs/general/queues#consume-stomp protocols. Find out more about using "Ably queues":/docs/general/queues#what. h2. Manage your Ably queues @@ -26,6 +26,6 @@ When provisioning a new queue, you'll need to specify several things: h3(#setup). Set up queue rules -Once you have provisioned a physical queue, you need to set up one or more queue rules to republish messages, presence events or channel events from pub/sub channels into a queue. Queue rules can either be used to publish to internal queues (hosted by Ably) or external external streams or queues (such as Amazon Kinesis and RabbitMQ). Publishing to external streams or queues is part of our "Ably Firehose servers":/general/firehose. +Once you have provisioned a physical queue, you need to set up one or more queue rules to republish messages, presence events or channel events from pub/sub channels into a queue. Queue rules can either be used to publish to internal queues (hosted by Ably) or external external streams or queues (such as Amazon Kinesis and RabbitMQ). Publishing to external streams or queues is part of our "Ably Firehose servers":/docs/general/firehose. -Ably queue rules are setup in the *Integrations* tab found within your app *dashboard*. Find out more about setting up "queue rules":/general/queues#setup. +Ably queue rules are setup in the *Integrations* tab found within your app *dashboard*. Find out more about setting up "queue rules":/docs/general/queues#setup. diff --git a/content/account/control-api.textile b/content/account/control-api.textile index 1021e6b38f..1357711dd0 100644 --- a/content/account/control-api.textile +++ b/content/account/control-api.textile @@ -3,12 +3,12 @@ title: Programmatic management with Control API meta_description: "The Control API is a REST API that enables you to manage your Ably account programmatically. This is the Control API user guide." meta_keywords: "Ably, applications, apps, Control API, account management, control, REST API, OpenAPI Specification, OAS3." redirect_from: - - /control-api - - /control-api/curl-examples - - /control-api/testing-with-postman + - /docs/control-api + - /docs/control-api/curl-examples + - /docs/control-api/testing-with-postman --- -Ably Control API is a REST API that enables you to manage your Ably account programmatically. The Control API also enables you to build web apps and command-line tools, to create and manage your Ably realtime infrastructure. Details of the API can be found in the "Control API Reference":/api/control-api. +Ably Control API is a REST API that enables you to manage your Ably account programmatically. The Control API also enables you to build web apps and command-line tools, to create and manage your Ably realtime infrastructure. Details of the API can be found in the "Control API Reference":/docs/api/control-api. Using the Control API you can automate the provisioning, management, and testing of your Ably realtime infrastructure. You can dynamically create Ably apps, configure them, and delete them if necessary. You can implement multi-tenancy solutions for your customers, and create configuration-driven environments that can easily be replicated under programmatic control. Once these environments are created you can also test them using Control API. @@ -18,8 +18,8 @@ With the Control API you can create and manage: * API keys for an Ably app * "Account and app statistics":/metadata-stats/stats * "Namespaces":/channels#namespaces (for channel rules) -* "Queues":/general/queues -* "Integration rules":/general/integrations +* "Queues":/docs/general/queues +* "Integration rules":/docs/general/integrations Repetitive operations such as creating, updating or deleting Ably apps, enumerating queues, creation of rules, and other tasks that would be time-consuming to carry out manually, can be automated using the Control API. @@ -29,7 +29,7 @@ The following diagram illustrates an example use case: Provision and Test -In this use case, Control API is used to provision a sample app for review and testing purposes. Once provisioned, the "realtime":/api/realtime-sdk or "REST API":/api/rest-api can be used to test the app as needed. Once fully tested, the Control API can be used to replicate the app for users as required, using the known-good configuration. +In this use case, Control API is used to provision a sample app for review and testing purposes. Once provisioned, the "realtime":/docs/api/realtime-sdk or "REST API":/docs/api/rest-api can be used to test the app as needed. Once fully tested, the Control API can be used to replicate the app for users as required, using the known-good configuration. In order to use the Control API you must first create an access token in the "Ably dashboard":https://ably.com/accounts/any. You can then use the Control API to manage many account functions without having to interact with the dashboard. @@ -123,7 +123,7 @@ Sample response: h2(#ids). Account ID and app ID -Operations that affect your entire account, such as "listing the apps":/api/control-api/#operation/listApps associated with that account, require an account ID. Those that affect individual apps, such as "creating an API key":/api/control-api/#tag/keys/paths/~1apps~1{app_id}~1keys/post, require an app ID. +Operations that affect your entire account, such as "listing the apps":/docs/api/control-api/#operation/listApps associated with that account, require an account ID. Those that affect individual apps, such as "creating an API key":/docs/api/control-api/#tag/keys/paths/~1apps~1{app_id}~1keys/post, require an app ID. h3(#account-id). How to find your account ID @@ -178,7 +178,7 @@ curl --location --request POST 'https://control.ably.net/v1/accounts/${ACCOUNT_I }' ``` -See the "API reference":/api/control-api#tag/accounts/paths/~1accounts~1{account_id}~1stats/get for information on the request body. +See the "API reference":/docs/api/control-api#tag/accounts/paths/~1accounts~1{account_id}~1stats/get for information on the request body. Sample response, with @entries@ trimmed for readability: @@ -243,7 +243,7 @@ curl --location --request POST 'https://control.ably.net/v1/accounts/${ACCOUNT_I }' ``` -See the "API reference":/api/control-api/#tag/apps/paths/~1accounts~1{account_id}~1apps/post for information on the request body. +See the "API reference":/docs/api/control-api/#tag/apps/paths/~1accounts~1{account_id}~1apps/post for information on the request body. Sample response: @@ -302,7 +302,7 @@ curl --location --request POST 'https://control.ably.net/v1/apps/${APP_ID}/stats }' ``` -See the "API reference":/api/control-api#tag/apps/paths/~1apps~1{app_id}~1stats/get for information on the request body. +See the "API reference":/docs/api/control-api#tag/apps/paths/~1apps~1{app_id}~1stats/get for information on the request body. Sample response, with @entries@ trimmed for readability: @@ -325,7 +325,7 @@ Sample response, with @entries@ trimmed for readability: h3(#examples-queues). Queues -You can use the Control API to manage "Ably queues":/general/queues. The main operations are: +You can use the Control API to manage "Ably queues":/docs/general/queues. The main operations are: * List all Ably queues * Create a queue @@ -394,7 +394,7 @@ curl --location --request POST 'https://control.ably.net/v1/apps/${APP_ID}/queue }' ``` -See the "API reference":/api/control-api/#tag/queues/paths/~1apps~1{app_id}~1queues/post for information on the request body. +See the "API reference":/docs/api/control-api/#tag/queues/paths/~1apps~1{app_id}~1queues/post for information on the request body. Sample response: @@ -577,7 +577,7 @@ In this case there is only a status code returned (200), or an error code. h3(#examples-rules). Rules -You can use the Control API to manage Ably "integration rules":/general/integrations. The main operations are: +You can use the Control API to manage Ably "integration rules":/docs/general/integrations. The main operations are: * List all rules for an app * List details of a specific rule using rule ID @@ -642,7 +642,7 @@ The rule details are returned for the specified rule. h4(#examples-rules-create). Create a rule -The following example creates a rule with the following "configuration":/general/webhooks#configure: +The following example creates a rule with the following "configuration":/docs/general/webhooks#configure: |_. Parameter |_. Value |_. Description | | @ruleType@ | http | The type of rule, in this case a webhook rule | @@ -653,7 +653,7 @@ The following example creates a rule with the following "configuration":/general | @format@ | json | Format of encoding for the rule, in this case JSON | | @name@ | User-Agent | Optional header or headers, including custom headers that might be required. In this case a user agent header is specified (this needs to be set for some providers) | | @value@ | user-agent-name | The value of the header | -| @enveloped@ | true | Wrap packet in "metadata":/general/webhooks#envelope | +| @enveloped@ | true | Wrap packet in "metadata":/docs/general/webhooks#envelope | The corresponding request is: @@ -827,4 +827,4 @@ Now that you have obtained the token and IDs, you can learn how to send a reques Response -You can now try out other requests. You need to set the necessary parameters and authentication token as required by that specific request. Consult the "API Reference":/api/control-api for further information. +You can now try out other requests. You need to set the necessary parameters and authentication token as required by that specific request. Consult the "API Reference":/docs/api/control-api for further information. diff --git a/content/api/index.textile b/content/api/index.textile index cb0f50c765..8a59c0e71a 100644 --- a/content/api/index.textile +++ b/content/api/index.textile @@ -17,17 +17,17 @@ This section of the documentation contains the API references for Ably. The following API references are available: -* "Client library Realtime SDK":/api/realtime-sdk -* "Client library REST SDK":/api/rest-sdk -* "REST API":/api/rest-api -* "SSE API":/api/sse -* "Control API":/api/control-api +* "Client library Realtime SDK":/docs/api/realtime-sdk +* "Client library REST SDK":/docs/api/rest-sdk +* "REST API":/docs/api/rest-api +* "SSE API":/docs/api/sse +* "Control API":/docs/api/control-api h2(#sdks). Client library SDKs Depending on availability, an Ably client library SDK may support both a realtime interface and a REST interface. Some SDKs only provide a REST interface. You can check availability on the "SDK page":https://ably.com/download. -The "realtime interface":/api/realtime-sdk allows your client to both publish and subscribe to a channel, but the REST interface only allows you to publish to a channel. The "REST interface":/api/rest-sdk can also be used for non-recurring operations such as obtaining statistics, or checking status. The REST interface has less resource impact, as it is much simpler than the realtime interface. +The "realtime interface":/docs/api/realtime-sdk allows your client to both publish and subscribe to a channel, but the REST interface only allows you to publish to a channel. The "REST interface":/docs/api/rest-sdk can also be used for non-recurring operations such as obtaining statistics, or checking status. The REST interface has less resource impact, as it is much simpler than the realtime interface. Typically the REST interface is used on the server, as the server's main task is to authenticate clients, but does not usually need to subscribe to a channel to obtain realtime events. @@ -47,15 +47,15 @@ The SDKs that have API references generated from source code are: h2(#rest-api). REST API -A raw "REST API":/api/rest-api is also provided - you don't need to install any SDK to use this. This is used where an Ably client library SDK is not available for your chosen platform, or you do not wish to use a client library SDK due to resource constraints. +A raw "REST API":/docs/api/rest-api is also provided - you don't need to install any SDK to use this. This is used where an Ably client library SDK is not available for your chosen platform, or you do not wish to use a client library SDK due to resource constraints. h2(#sse-api). SSE API -The "Ably Server-Sent Events API":/api/sse, and raw HTTP streaming API, provide a way to get a realtime stream of events from Ably in circumstances where using a full Ably Realtime client library, or even an MQTT library, is impractical due to resource constraints. HTTP streaming can be used where an SSE client is not supported. +The "Ably Server-Sent Events API":/docs/api/sse, and raw HTTP streaming API, provide a way to get a realtime stream of events from Ably in circumstances where using a full Ably Realtime client library, or even an MQTT library, is impractical due to resource constraints. HTTP streaming can be used where an SSE client is not supported. h2(#control-api). Control API -"Ably Control API":/api/control-api is a REST API that enables you to manage your Ably account programmatically. The Control API also enables you to build web apps and command-line tools, to create and manage your Ably realtime infrastructure. +"Ably Control API":/docs/api/control-api is a REST API that enables you to manage your Ably account programmatically. The Control API also enables you to build web apps and command-line tools, to create and manage your Ably realtime infrastructure. h2(#spaces). Spaces SDK diff --git a/content/api/realtime-sdk.textile b/content/api/realtime-sdk.textile index 2fc44758f2..4188d7f7c8 100644 --- a/content/api/realtime-sdk.textile +++ b/content/api/realtime-sdk.textile @@ -33,9 +33,9 @@ jump_to: - stats#stats-type - HttpPaginatedResponse#http-paginated-response redirect_from: - - /api/versions/v1.1/realtime-sdk - - /api/versions/v1.0/realtime-sdk - - /api/versions/v0.8/realtime-sdk + - /docs/api/versions/v1.1/realtime-sdk + - /docs/api/versions/v1.0/realtime-sdk + - /docs/api/versions/v0.8/realtime-sdk --- inline-toc. @@ -102,11 +102,11 @@ The Realtime library needs to have credentials to be able to authenticate with t h4. Basic Authentication -You can pass a full-length API key in as "@ClientOptions#key@@ClientOptions#Key@":#client-options (or just straight into the constructor instead of a @ClientOptions@ instance), as obtained from the "application dashboard":https://ably.com/dashboard. Use this option if you wish to use "Basic authentication":/auth/basic, or if you want to be able to "request Ably Tokens":/auth/token without needing to defer to a separate entity to sign "Ably TokenRequests":/api/realtime-sdk/authentication#token-request. Note that initializing the library with a @key@@Key@ does not necessarily mean that the library will use Basic auth; it is also able to create and sign Ably "TokenRequests":/api/realtime-sdk/authentication#token-request, and can use token authentication for itself if it needs to or if "@ClientOptions#useTokenAuth@":#client-options is enabled. +You can pass a full-length API key in as "@ClientOptions#key@@ClientOptions#Key@":#client-options (or just straight into the constructor instead of a @ClientOptions@ instance), as obtained from the "application dashboard":https://ably.com/dashboard. Use this option if you wish to use "Basic authentication":/auth/basic, or if you want to be able to "request Ably Tokens":/auth/token without needing to defer to a separate entity to sign "Ably TokenRequests":/docs/api/realtime-sdk/authentication#token-request. Note that initializing the library with a @key@@Key@ does not necessarily mean that the library will use Basic auth; it is also able to create and sign Ably "TokenRequests":/docs/api/realtime-sdk/authentication#token-request, and can use token authentication for itself if it needs to or if "@ClientOptions#useTokenAuth@":#client-options is enabled. h4. Token Authentication -The "@ClientOptions#token@":#client-options option takes a @token@ string or "@tokenDetails@":/api/realtime-sdk/types#token-details object, which may have been obtained from some other instance that requested the Ably Token. This option is rarely used in production since tokens are short-lived, so generally you would not start with a token without the means to refresh it. The "@authUrl@ and @authCallback@@AuthUrl@ and @AuthCallback@@:auth_url@ and @:auth_callback@ options":#client-options allow the library to request new Ably-compatible tokens or Ably TokenRequests as it needs to; using these options allows the library to be instantiated without a @key@ or @token@@Key@ or @Token@, and an initial token will be obtained automatically when required. +The "@ClientOptions#token@":#client-options option takes a @token@ string or "@tokenDetails@":/docs/api/realtime-sdk/types#token-details object, which may have been obtained from some other instance that requested the Ably Token. This option is rarely used in production since tokens are short-lived, so generally you would not start with a token without the means to refresh it. The "@authUrl@ and @authCallback@@AuthUrl@ and @AuthCallback@@:auth_url@ and @:auth_callback@ options":#client-options allow the library to request new Ably-compatible tokens or Ably TokenRequests as it needs to; using these options allows the library to be instantiated without a @key@ or @token@@Key@ or @Token@, and an initial token will be obtained automatically when required. Read more on "authentication":/auth. @@ -123,7 +123,7 @@ h6(#auth). default: auth csharp: Auth -A reference to the "@Auth@":/api/realtime-sdk/authentication authentication object configured for this client library. +A reference to the "@Auth@":/docs/api/realtime-sdk/authentication authentication object configured for this client library. h6(#push). default: push @@ -135,25 +135,25 @@ A reference to the "@Push@":/push object in this client library. h6(#device). default: device -A reference to the "@LocalDevice@@ARTLocalDevice@":/api/realtime-sdk/push#local-device object. +A reference to the "@LocalDevice@@ARTLocalDevice@":/docs/api/realtime-sdk/push#local-device object. h6(#channels). default: channels csharp: Channels -"@Channels@":/api/realtime-sdk/channels#channels-object is a reference to the "@Channel@":/channels collection instance for this library indexed by the channel name. You can use the "@Get@":/api/realtime-sdk/channels#get method of this to get a @Channel@ instance. See "channels":/channels and "messages":/channels/messages for more information. +"@Channels@":/docs/api/realtime-sdk/channels#channels-object is a reference to the "@Channel@":/channels collection instance for this library indexed by the channel name. You can use the "@Get@":/docs/api/realtime-sdk/channels#get method of this to get a @Channel@ instance. See "channels":/channels and "messages":/channels/messages for more information. h6(#connection). default: connection csharp: Connection -A reference to the "@Connection@":/api/realtime-sdk/connection object for this library instance. +A reference to the "@Connection@":/docs/api/realtime-sdk/connection object for this library instance. blang[ruby]. h6(#rest-client). rest_client - A reference to the "REST Client":/api/rest-sdk configured with the same "@ClientOptions@":#client-options. The Realtime library is a super-set of the REST library, however accessing methods in the REST library, unlike the Realtime library, are blocking operations. + A reference to the "REST Client":/docs/api/rest-sdk configured with the same "@ClientOptions@":#client-options. The Realtime library is a super-set of the REST library, however accessing methods in the REST library, unlike the Realtime library, are blocking operations. h2(#methods). default: AblyRealtime Methods @@ -168,20 +168,20 @@ h6(#connect). bq(definition). default: connect() - ruby: "Deferrable":/api/realtime-sdk/types#deferrable connect -> yields "@Connection@":/api/realtime-sdk/connection + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable connect -> yields "@Connection@":/docs/api/realtime-sdk/connection java: void connect() csharp: void Connect() -Explicitly calling @connect@ is unnecessary unless the "@ClientOptions@":#client-options @autoConnect@@auto_connect@@AuthConnect@ is disabled. This method calls "@connection.connect()@@connection.connect@@connection.Connect()@":/api/realtime-sdk/connection#connect and causes the connection to open, entering the @connecting@ state. +Explicitly calling @connect@ is unnecessary unless the "@ClientOptions@":#client-options @autoConnect@@auto_connect@@AuthConnect@ is disabled. This method calls "@connection.connect()@@connection.connect@@connection.Connect()@":/docs/api/realtime-sdk/connection#connect and causes the connection to open, entering the @connecting@ state. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On successfully connecting to Ably, the registered success callbacks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/api/realtime-sdk/connection object. + On successfully connecting to Ably, the registered success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/docs/api/realtime-sdk/connection object. - Failure to connect will trigger the errback callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to connect will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. h6(#close). default: close @@ -189,33 +189,33 @@ h6(#close). bq(definition). default: close() - ruby: "Deferrable":/api/realtime-sdk/types#deferrable close -> yields "@Connection@":/api/realtime-sdk/connection + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable close -> yields "@Connection@":/docs/api/realtime-sdk/connection java: void close() csharp: void Close() -This calls "@connection.close()@@connection.close@@connection.Close()@":/api/realtime-sdk/connection#close and causes the connection to close, entering the @closing@ state. Once @closed@, the library will not attempt to re-establish the connection without an explicit call to "@connect()@@connect@@Connect()@":/api/realtime-sdk/connection#connect. +This calls "@connection.close()@@connection.close@@connection.Close()@":/docs/api/realtime-sdk/connection#close and causes the connection to close, entering the @closing@ state. Once @closed@, the library will not attempt to re-establish the connection without an explicit call to "@connect()@@connect@@Connect()@":/docs/api/realtime-sdk/connection#connect. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On successfully closing the connection, the registered success callbacks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/api/realtime-sdk/connection object. + On successfully closing the connection, the registered success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/docs/api/realtime-sdk/connection object. - Failure to close the connection will trigger the errback callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to close the connection will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. h6(#stats). default: stats csharp: Stats bq(definition). - default: stats(Object options, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":#stats> results)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable stats(Hash options) -> yields "PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":#stats> - java: "PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":#stats> stats("Param":#param[] options) - swift,objc: stats(query: ARTStatsQuery?, callback: ("ARTPaginatedResult":/api/realtime-sdk/types#paginated-result<"ARTStats":/api/realtime-sdk/types#stats>?, ARTErrorInfo?) -> Void) throws - csharp: Task<"PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":/api/realtime-sdk/types#stats>> StatsAsync(StatsRequestParams query) + default: stats(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":#stats> results)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable stats(Hash options) -> yields "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":#stats> + java: "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":#stats> 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#stats>> StatsAsync(StatsRequestParams query) -This call queries the "REST @/stats@ API":/api/rest-api#stats and retrieves your application's usage statistics. A "PaginatedResult":/api/realtime-sdk/types#paginated-result is returned, containing an array of "Stats":#stats for the first page of results. "PaginatedResult":/api/realtime-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. +This call queries the "REST @/stats@ API":/docs/api/rest-api#stats and retrieves your application's usage statistics. A "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result is returned, containing an array of "Stats":#stats for the first page of results. "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. See "statistics":/metadata-stats/stats for more information. @@ -226,20 +226,20 @@ h6(#time). csharp: Time bq(definition). - default: time(callback("ErrorInfo":/api/realtime-sdk/types#error-info err, Number time)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable time -> yields Time + default: time(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, Number time)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable time -> yields Time java: long time() csharp: Task TimeAsync() objc,swift: time(callback: (NSDate?, NSError?) -> Void) -Obtains the time from the Ably service as a @Time@ objecta @DateTimeOffset@ objectmilliseconds since epoch. (Clients that do not have access to a sufficiently well maintained time source and wish to issue Ably "TokenRequests":/api/realtime-sdk/authentication#token-request with a more accurate timestamp should use the @queryTime@ "clientOptions":#client-options instead of this method). +Obtains the time from the Ably service as a @Time@ objecta @DateTimeOffset@ objectmilliseconds since epoch. (Clients that do not have access to a sufficiently well maintained time source and wish to issue Ably "TokenRequests":/docs/api/realtime-sdk/authentication#token-request with a more accurate timestamp should use the @queryTime@ "clientOptions":#client-options instead of this method). blang[jsall,objc,swift]. h4. Callback result On success, @time@ is a number containing the number of milliseconds since the epoch. - On failure to retrieve the Ably server time, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to retrieve the Ably server time, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[java]. h4. Returns @@ -261,11 +261,11 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On success, the registered success callbacks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method yields a @Time@ object. + On success, the registered success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yields a @Time@ object. - Failure to retrieve the Ably server time will trigger the errback callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to retrieve the Ably server time will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. <%= partial partial_version('rest/_request') %> diff --git a/content/api/realtime-sdk/authentication.textile b/content/api/realtime-sdk/authentication.textile index b38e0d9b80..9640b1536a 100644 --- a/content/api/realtime-sdk/authentication.textile +++ b/content/api/realtime-sdk/authentication.textile @@ -25,9 +25,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/authentication - - /api/versions/v1.0/realtime-sdk/authentication - - /api/versions/v0.8/realtime-sdk/authentication + - /docs/api/versions/v1.1/realtime-sdk/authentication + - /docs/api/versions/v1.0/realtime-sdk/authentication + - /docs/api/versions/v0.8/realtime-sdk/authentication --- blang[javascript,nodejs]. @@ -62,7 +62,7 @@ inline-toc. - TokenRequest#token-request - Ably JWT#ably-jwt -The Auth object is available as the "@auth@ field":/api/realtime-sdk#auth"@Auth@ property":/api/realtime-sdk#auth"@auth@ property":/api/realtime-sdk#auth"@auth@ attribute":/api/realtime-sdk#auth of an "Ably Realtime client instance":/api/realtime-sdk#constructor. +The Auth object is available as the "@auth@ field":/docs/api/realtime-sdk#auth"@Auth@ property":/docs/api/realtime-sdk#auth"@auth@ property":/docs/api/realtime-sdk#auth"@auth@ attribute":/docs/api/realtime-sdk#auth of an "Ably Realtime client instance":/docs/api/realtime-sdk#constructor. h2(#properties). default: Auth Properties @@ -93,8 +93,8 @@ h6(#authorize). authorize bq(definition). - default: authorize("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable authorize("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) -> yields "TokenDetails":#token-details + default: authorize("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable authorize("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) -> yields "TokenDetails":#token-details java: "TokenDetails":#token-details authorize("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) csharp: "Task:#token-details AuthorizeAsync("TokenParams:#token-params?, "AuthOptions":#auth-options?) swift,objc: authorize(tokenParams: "ARTTokenParams":#token-params?, authOptions: "ARTAuthOptions":#auth-options?, callback: ("ARTTokenDetails":#token-details?, NSError?) -> Void) @@ -118,7 +118,7 @@ blang[objc,swift]. On success, the callback will be called with the new "@TokenDetails@":#token-details object only once the realtime connection has been successfully upgraded to use the new token. - On failure to obtain an token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state, and the callback will be called with @err@ containing an @NSError@ object with the error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain an token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state, and the callback will be called with @err@ containing an @NSError@ object with the error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. The @authorize@ callback can therefore be used to only trigger an event once the new token has taken effect. This can be useful if, for example, you want to do attach to a new channel following a new channel capability being applied to the connection. @@ -127,7 +127,7 @@ blang[jsall]. On success, the callback will be called with the new "@TokenDetails@":#token-details only once the realtime connection has been successfully upgraded to use the new token. - On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state, and the callback will be called with @err@ containing an "@ErrorInfo@":/api/realtime-sdk/types#error-info object with the error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state, and the callback will be called with @err@ containing an "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info object with the error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. The @authorize@ callback can be used to trigger an event once the new token has taken effect. This can be useful if, for example, you want to do attach to a new channel following a new channel capability being applied to the connection. @@ -136,7 +136,7 @@ blang[java]. On success, a new "@TokenDetails@":#token-details is returned only once the realtime connection has been successfully upgraded to use the new "Ably Token":#token-details. - On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state and an "@AblyException@":#ably-exception will be raised with the error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state and an "@AblyException@":#ably-exception will be raised with the error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. The synchronous @authorize@ method can therefore be used to run subsequent code only once the new token has taken effect. This can be useful if, for example, you want to do attach to a new channel following a new channel capability being applied to the connection. @@ -147,18 +147,18 @@ blang[csharp]. On success, a new "@TokenDetails@":#token-details is returned only once the realtime connection has been successfully upgraded to use the new token. - On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state and an "@AblyException@":#ably-exception will be raised with the error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state and an "@AblyException@":#ably-exception will be raised with the error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. By waiting for the @authorize@ method return value, it can be used to run subsequent code only once the new token has taken effect. This can be useful if, for example, you want to do attach to a new channel following a new channel capability being applied to the connection. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On success, the registered success callbacks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@TokenDetails@":#token-details only once the realtime connection has been successfully upgraded to use the new token. + On success, the registered success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@TokenDetails@":#token-details only once the realtime connection has been successfully upgraded to use the new token. - On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state, triggering the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain a token or upgrade the token, the connection will move to the @SUSPENDED@ or @FAILED@ state, triggering the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. The @authorize@ callbacks can therefore be used to trigger an event once the new "Ably Token":#token-details has taken effect. This can be useful if, for example, you want to do attach to a new channel following a new channel capability being applied to the connection. @@ -218,8 +218,8 @@ h6(#create-token-request). csharp: CreateTokenRequestAsync bq(definition). - default: createTokenRequest("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "TokenRequest":#token-request tokenRequest)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable create_token_request("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) -> yields "TokenRequest":#token-request + default: createTokenRequest("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "TokenRequest":#token-request tokenRequest)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable create_token_request("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) -> yields "TokenRequest":#token-request java: "TokenRequest":#token-request createTokenRequest("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) csharp: Task<"TokenRequest":#token-request> CreateTokenRequestAsync("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) objc,swift: createTokenRequest(tokenParams: "ARTTokenParams":#token-params?, options: "ARTAuthOptions":#auth-options?, callback: ("ARTTokenRequest":#token-request?, NSError?) -> Void) @@ -245,7 +245,7 @@ blang[jsall]. On success, @tokenRequest@ contains a "@TokenRequest@":#token-request JSON object. - On failure to issue a "@TokenRequest@":#token-request, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to issue a "@TokenRequest@":#token-request, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[java]. h4. Returns @@ -266,11 +266,11 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On success, the registered success callbacks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@TokenRequest@":#token-request object. + On success, the registered success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@TokenRequest@":#token-request object. - Failure to issue a "@TokenRequest@":#token-request will trigger the errback callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to issue a "@TokenRequest@":#token-request will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. h4. Example @@ -327,13 +327,13 @@ h6(#request-token). csharp: RequestTokenAsync bq(definition). - default: requestToken("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable request_token("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) -> yields "TokenDetails":#token-details + default: requestToken("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable request_token("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) -> yields "TokenDetails":#token-details java: "TokenDetails":#token-details requestToken("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) csharp: async Task<"TokenDetails":#token-details> RequestTokenAsync("TokenParams":#token-params? tokenParams, "AuthOptions":#auth-options? options) objc,swift: requestToken(tokenParams: "ARTTokenParams":#token-params?, withOptions: "ARTAuthOptions":#auth-options?, callback: ("ARTTokenDetails":#token-details?, NSError?) -> Void) -Calls the "@requestToken@ REST API endpoint":/api/rest-api#request-token to obtain an "Ably Token":#token-details according to the specified @token_params@ and @auth_options@@tokenParams@ and @authOptions@. +Calls the "@requestToken@ REST API endpoint":/docs/api/rest-api#request-token to obtain an "Ably Token":#token-details according to the specified @token_params@ and @auth_options@@tokenParams@ and @authOptions@. Both @auth_options@ and @token_params@@authOptions@ and @tokenParams@ are optional. When omitted or @null@, the default token parameters and authentication options for the client library are used, as specified in the @ClientOptions@ when the client library was instantiated, or later updated with an explicit "@authorize@@Authorize@":#authorize request. Values passed in will be used instead of (rather than being merged with) the default values. @@ -354,7 +354,7 @@ blang[jsall,objc,swift]. On success, @tokenDetails@ contains a "@TokenDetails@":#token-details object containing the details of the new "Ably Token":#token-details along with the @token@ string. - On failure to obtain an "Ably Token":#token-details, @err@ contains an "@ErrorInfo@":#error-info@NSError@ object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain an "Ably Token":#token-details, @err@ contains an "@ErrorInfo@":#error-info@NSError@ object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[java]. h4. Returns @@ -375,11 +375,11 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On success, the registered success callbacks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@TokenDetails@":#token-details object containing the details of the new "Ably Token":#token-details along with the @token@ string. + On success, the registered success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@TokenDetails@":#token-details object containing the details of the new "Ably Token":#token-details along with the @token@ string. - Failure to obtain an "Ably Token":#token-details will trigger the errback callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to obtain an "Ably Token":#token-details will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. h4. Example diff --git a/content/api/realtime-sdk/channel-metadata.textile b/content/api/realtime-sdk/channel-metadata.textile index bdb0af10b2..910c8b75b1 100644 --- a/content/api/realtime-sdk/channel-metadata.textile +++ b/content/api/realtime-sdk/channel-metadata.textile @@ -10,8 +10,8 @@ jump_to: - ChannelStatus#channel-status - Occupancy#occupancy redirect_from: - - /api/versions/v1.1/realtime-sdk/channel-metadata - - /api/versions/v1.0/realtime-sdk/channel-metadata + - /docs/api/versions/v1.1/realtime-sdk/channel-metadata + - /docs/api/versions/v1.0/realtime-sdk/channel-metadata --- inline-toc. diff --git a/content/api/realtime-sdk/channels.textile b/content/api/realtime-sdk/channels.textile index 6f86f03bca..ad51c0af3d 100644 --- a/content/api/realtime-sdk/channels.textile +++ b/content/api/realtime-sdk/channels.textile @@ -32,9 +32,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/channels - - /api/versions/v1.0/realtime-sdk/channels - - /api/versions/v0.8/realtime-sdk/channels + - /docs/api/versions/v1.1/realtime-sdk/channels + - /docs/api/versions/v1.0/realtime-sdk/channels + - /docs/api/versions/v0.8/realtime-sdk/channels --- inline-toc. @@ -78,7 +78,7 @@ blang[javascript,nodejs]. h2(#channels-object). default: Channels -The @Channels@ object, accessed from the "realtime library client constructor":/api/realtime-sdk#channels, is used to create and destroy @Channel@ objects. It exposes the following public methods: +The @Channels@ object, accessed from the "realtime library client constructor":/docs/api/realtime-sdk#channels, is used to create and destroy @Channel@ objects. It exposes the following public methods: h3(#channels-methods). Channels Methods @@ -132,7 +132,7 @@ h6(#error-reason). csharp: ErrorReason When a channel failure occurs this attributememberpropertyproperty is populated. -The type is "@ErrorInfo@":/api/realtime-sdk/types#error-info"@AblyException@":/api/realtime-sdk/types#ably-exception. +The type is "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info"@AblyException@":/docs/api/realtime-sdk/types#ably-exception. h6(#name). default: name @@ -149,7 +149,7 @@ Provides access to the "Presence":/presence-occupancy/presence object for this c h6(#push). default: push -Provides access to the "PushChannel":/api/realtime-sdk/push#push-channel object for this channel which can be used to access members present on the channel, or participate in presence. +Provides access to the "PushChannel":/docs/api/realtime-sdk/push#push-channel object for this channel which can be used to access members present on the channel, or participate in presence. h3. Methods @@ -160,21 +160,21 @@ h6(#publish). There are two overloaded versions of this method: bq(definition#publish-data). - default: publish(String name, Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable publish(String name, Object data) -> yields + default: publish(String name, Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable publish(String name, Object data) -> yields java: void publish(String name, Object data, "CompletionListener":#completion-listener listener) csharp: void Publish(string name, object data, Action callback = null, string clientId = null) - objc,swift: publish(name: String?, data: AnyObject?, callback: (("ARTErrorInfo":/api/realtime-sdk/types#error-info?) -> Void)?) + objc,swift: publish(name: String?, data: AnyObject?, callback: (("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?) -> Void)?) flutter: Future publish(name: String name, data: Object data, message: "Message":#message message) Publish a single message on this channel based on a given event name and payload. A callbacklistener may optionally be passed in to this call to be notified of success or failure of the operation. When publish is called with this client library, it "won't attempt to implicitly attach to the channel":/channels/states#attach, so long as "transient publishing":/pub-sub/advanced#transient-publish is available in the library. Otherwise, the client will implicitly attach. bq(definition#publish-msg-array). - default: publish(Object[] messages, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable publish(Message[] messages) -> yields + default: publish(Object[] messages, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable publish(Message[] messages) -> yields java: void publish(Message[] messages, "CompletionListener":#completion-listener listener) - csharp: void Publish(IEnumerable<"Message":#message> messages, Action callback = null) - objc,swift: publish(messages: [ "ARTMessage":#message ], callback: (("ARTErrorInfo":/api/realtime-sdk/types#error-info?) -> Void)?) + csharp: void Publish(IEnumerable<"Message":#message> messages, Action callback = null) + objc,swift: publish(messages: [ "ARTMessage":#message ], callback: (("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?) -> Void)?) flutter: Future publish(messages: List<"Message":#message> messages) Publish several messages on this channel. A callbacklistenerblock may optionally be passed in to this call to be notified of success or failure of the operation. When publish is called with this client library, it "won't attempt to implicitly attach to the channel":/channels#transient-publish. If the channel is @initialized@ (i.e. no attempt to attach has yet been made for this channel), then calling @publish@ will implicitly attach the channel. @@ -225,9 +225,9 @@ blang[java]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On successful publish of the message, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to publish the message, the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. + On successful publish of the message, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to publish the message, the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. blang[flutter]. h4. Returns @@ -371,8 +371,8 @@ h6(#history). csharp: History bq(definition). - default: history(Object options, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable history(Hash options) -> yields "PaginatedResult":#paginated-result<"Message":#message> + default: history(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable history(Hash options) -> yields "PaginatedResult":#paginated-result<"Message":#message> java: "PaginatedResult":#paginated-result<"Message":#message> history("Param []":#param options) csharp: Task<"PaginatedResult":#paginated-result> HistoryAsync("PaginatedRequestParams":#paginated-request-params dataQuery, bool untilAttach = false) objc,swift: history(query: ARTRealtimeHistoryQuery?, callback: ("ARTPaginatedResult":#paginated-result<"ARTMessage":#message>?, ARTErrorInfo?) -> Void) throws @@ -381,13 +381,13 @@ Gets a "paginated":#paginated-result set of historical messages for this channel h4. Parameters -- optionsquerydataQuery := an optional object containing the query parametersan optional set of key value pairs containing the query parameters, as specified in the "message history API documentation":/api/realtime-sdk/history#channel-history
__Type: @Object@@ARTRealtimeHistoryQuery@@PaginatedRequestParams@@Hash@"@Param []@":#param__ +- optionsquerydataQuery := an optional object containing the query parametersan optional set of key value pairs containing the query parameters, as specified in the "message history API documentation":/docs/api/realtime-sdk/history#channel-history
__Type: @Object@@ARTRealtimeHistoryQuery@@PaginatedRequestParams@@Hash@"@Param []@":#param__ -
callback
:= is a function of the form: @function(err, resultPage)@ -
&block
:= yields a @PaginatedResult@ object -
callback
:= called with a "ARTPaginatedResult":#paginated-result<"ARTMessage":#message> object or an error -Further details of the supported @options@ params, see "message history API documentation":/api/realtime-sdk/history#channel-history. +Further details of the supported @options@ params, see "message history API documentation":/docs/api/realtime-sdk/history#channel-history. blang[jsall,objc,swift]. h4. Callback result @@ -401,7 +401,7 @@ blang[java]. 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. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[csharp]. h4. Returns @@ -410,32 +410,32 @@ blang[csharp]. 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 "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On success, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that 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. + On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that 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. - Failure to retrieve the message history will trigger the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. + Failure to retrieve the message history will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. h6(#attach). default: attach csharp: Attach bq(definition). - default: attach(callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) + default: attach(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) java: void attach() - csharp: void Attach(Action callback = null) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable attach -> yields - objc,swift: attach(callback: (("ARTErrorInfo":/api/realtime-sdk/types#error-info?) -> Void)?) + csharp: void Attach(Action callback = null) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable attach -> yields + objc,swift: attach(callback: (("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?) -> Void)?) flutter: Future attach() Attach to this channel ensuring the channel is created in the Ably system and all messages published on the channel will be received by any channel listeners registered using @subscribe()@@Subscribe()@@subscribe@. Any resulting channel state change will be emitted to any listeners registered using the "@on@@On@":#on or "@once@@Once@":#once methods. -As a convenience, @attach()@@Attach()@@attach@ will be called implicitly if "@subscribe()@@Subscribe()@@subscribe@":#subscribe for the @Channel@ is called, or "@enter()@@Enter()@@enter@":/api/realtime-sdk/presence#enter or "@subscribe()@@Subscribe()@@subscribe@":/api/realtime-sdk/presence#subscribe is called on the "@Presence@":/presence-occupancy/presence for this @Channel@. +As a convenience, @attach()@@Attach()@@attach@ will be called implicitly if "@subscribe()@@Subscribe()@@subscribe@":#subscribe for the @Channel@ is called, or "@enter()@@Enter()@@enter@":/docs/api/realtime-sdk/presence#enter or "@subscribe()@@Subscribe()@@subscribe@":/docs/api/realtime-sdk/presence#subscribe is called on the "@Presence@":/presence-occupancy/presence for this @Channel@. h4. Parameters @@ -447,27 +447,27 @@ h4. Parameters blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the attach method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the attach method. - On successful attachment, the success callbacks for the "@Deferrable@":/api/realtime-sdk/types#deferrable are called and any block provided to the method is yielded. Failure to attach will trigger the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. + On successful attachment, the success callbacks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called and any block provided to the method is yielded. Failure to attach will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. blang[flutter]. h4. Returns @Future@ - Failure to attach will throw an @AblyException@ with an "errorInfo":/api/realtime-sdk/types#error-info property with the failure reason. + Failure to attach will throw an @AblyException@ with an "errorInfo":/docs/api/realtime-sdk/types#error-info property with the failure reason. h6(#detach). default: detach csharp: Detach bq(definition). - default: detach(callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) + default: detach(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) java: void detach() csharp: void Detach(Action callback = null) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable detach -> yields - objc,swift: detach(callback: (("ARTErrorInfo":/api/realtime-sdk/types#error-info?) -> Void)?) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable detach -> yields + objc,swift: detach(callback: (("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?) -> Void)?) flutter: Future detach() Detach from this channel. Any resulting channel state change will be emitted to any listeners registered using the "@on@@On@":#on or "@once@@Once@":#once methods. @@ -484,16 +484,16 @@ h4. Parameters blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the detach method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the detach method. - On successful detachment, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. Failure to detach will trigger the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. + On successful detachment, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. Failure to detach will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. blang[flutter]. h4. Returns @Future@ - Failure to detach will throw an @AblyException@ with an "errorInfo":/api/realtime-sdk/types#error-info property with the failure reason. + Failure to detach will throw an @AblyException@ with an "errorInfo":/docs/api/realtime-sdk/types#error-info property with the failure reason. h6(#on). default: on diff --git a/content/api/realtime-sdk/connection.textile b/content/api/realtime-sdk/connection.textile index af08ccc7d5..2d112d0f5e 100644 --- a/content/api/realtime-sdk/connection.textile +++ b/content/api/realtime-sdk/connection.textile @@ -31,9 +31,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/connection - - /api/versions/v1.0/realtime-sdk/connection - - /api/versions/v0.8/realtime-sdk/connection + - /docs/api/versions/v1.1/realtime-sdk/connection + - /docs/api/versions/v1.0/realtime-sdk/connection + - /docs/api/versions/v0.8/realtime-sdk/connection --- inline-toc. @@ -92,13 +92,13 @@ h6(#error-reason). csharp: ErrorReason ruby: error_reason -When a connection failure occurs this attributememberproperty contains the "@ErrorInfo@":/api/realtime-sdk/types#error-info"@AblyException@":/api/realtime-sdk/types#ably-exception. +When a connection failure occurs this attributememberproperty contains the "@ErrorInfo@":/docs/api/realtime-sdk/types#error-info"@AblyException@":/docs/api/realtime-sdk/types#ably-exception. h6(#key). default: key csharp: Key -A unique private connection key @String@ used to recover or resume a connection, assigned by Ably. When recovering a connection explicitly, the @recoveryKey@@recovery_key@ is used in the @recover@ "client options":/api/realtime-sdk#client-options as it contains both the @key@ and the last message @serial@. +A unique private connection key @String@ used to recover or resume a connection, assigned by Ably. When recovering a connection explicitly, the @recoveryKey@@recovery_key@ is used in the @recover@ "client options":/docs/api/realtime-sdk#client-options as it contains both the @key@ and the last message @serial@. This private connection key can also be used by other REST clients to publish on behalf of this client. See the "publishing over REST on behalf of a realtime client documentation":/pub-sub/advanced#publish-on-behalf for more info. @@ -107,13 +107,13 @@ h6(#recovery-key). ruby: recovery_key csharp: RecoveryKey -The recovery key @String@ can be used by another client to recover this connection's state in the @recover@@Recover@ "client options":/api/realtime-sdk#client-options propertymemberattribute. See "connection state recover options":/connect/states#connection-state-recover-options for more information. +The recovery key @String@ can be used by another client to recover this connection's state in the @recover@@Recover@ "client options":/docs/api/realtime-sdk#client-options propertymemberattribute. See "connection state recover options":/connect/states#connection-state-recover-options for more information. h6(#serial). default: serial csharp: Serial -The serial number @Integer@ of the last message to be received on this connection, used automatically by the library when recovering or resuming a connection. When recovering a connection explicitly, the @recoveryKey@@recovery_key@@RecoveryKey@ is used in the @recover@@Recover@ "client options":/api/realtime-sdk#client-options as it contains both the @key@ and the last message @serial@. +The serial number @Integer@ of the last message to be received on this connection, used automatically by the library when recovering or resuming a connection. When recovering a connection explicitly, the @recoveryKey@@recovery_key@@RecoveryKey@ is used in the @recover@@Recover@ "client options":/docs/api/realtime-sdk#client-options as it contains both the @key@ and the last message @serial@. h2(#methods). default: Connection Methods @@ -128,7 +128,7 @@ h6(#connect). bq(definition). default: connect() - ruby: "Deferrable":/api/realtime-sdk/types#deferrable connect -> yields "@Connection@":/api/realtime-sdk/connection + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable connect -> yields "@Connection@":/docs/api/realtime-sdk/connection java: void connect() csharp: void Connect() flutter: Future connect() @@ -138,18 +138,18 @@ Explicitly calling @connect@@Con blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On successfully connecting to Ably, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/api/realtime-sdk/connection object. + On successfully connecting to Ably, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/docs/api/realtime-sdk/connection object. - Failure to connect will trigger the errback callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to connect will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[flutter]. h4. Returns @Future@ - Failure to connect will throw an @AblyException@ with an "@errorInfo@":#error-info property containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to connect will throw an @AblyException@ with an "@errorInfo@":#error-info property containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. h6(#close). default: close @@ -157,7 +157,7 @@ h6(#close). bq(definition). default: close() - ruby: "Deferrable":/api/realtime-sdk/types#deferrable close -> yields "@Connection@":/api/realtime-sdk/connection + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable close -> yields "@Connection@":/docs/api/realtime-sdk/connection java: void close() csharp: void Close() flutter: Future close() @@ -167,11 +167,11 @@ Causes the connection to close, entering the @closing@ state. Once @closed@, the blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from this method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from this method. - On successfully closing the connection, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/api/realtime-sdk/connection object. + On successfully closing the connection, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to this method yields a "@Connection@":/docs/api/realtime-sdk/connection object. - Failure to close the connection will trigger the errback callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + Failure to close the connection will trigger the errback callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object containing an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. h6(#on). default: on @@ -346,8 +346,8 @@ h6(#ping). csharp: Ping bq(definition). - default: ping(callback("ErrorInfo":/api/realtime-sdk/types#error-info err, Number responseInMilliseconds)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable ping -> yields @Float seconds@ + default: ping(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, Number responseInMilliseconds)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable ping -> yields @Float seconds@ java: void ping("CompletionListener":#completion-listener listener) objc,swift: ping(callback: (ARTErrorInfo?) -> Void) csharp: void Ping(Action callback) @@ -357,11 +357,11 @@ When connected, sends a heartbeat ping to the Ably server and "@AblyException@":/api/realtime-sdk/types#ably-exception exception. +On success, the method returns a complete "@CipherParams@":#cipher-params object. Failure will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception exception. h4. Example @@ -114,7 +114,7 @@ h6(#generate-random-key). csharp: GenerateRandomKey bq(definition). - default: Crypto.generateRandomKey(Int keyLength?, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, @Buffer@ key)) + default: Crypto.generateRandomKey(Int keyLength?, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, @Buffer@ key)) ruby: byte array Crypto.generate_random_key(Int key_length?) java: @byte[]@ Crypto.generateRandomKey(Int keyLength?) objc,swift: generateRandomKey(length?: UInt) -> NSData @@ -137,7 +137,7 @@ blang[jsall]. blang[java,ruby,objc,swift,csharp]. h4. Returns - On success, the method returns the generated key as a @byte[]@ arraybyte array@NSData@. Failure will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception . + On success, the method returns the generated key as a @byte[]@ arraybyte array@NSData@. Failure will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception . h4. Example diff --git a/content/api/realtime-sdk/history.textile b/content/api/realtime-sdk/history.textile index 159e16eb4b..f27bc8804c 100644 --- a/content/api/realtime-sdk/history.textile +++ b/content/api/realtime-sdk/history.textile @@ -19,9 +19,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/history - - /api/versions/v1.0/realtime-sdk/history - - /api/versions/v0.8/realtime-sdk/history + - /docs/api/versions/v1.1/realtime-sdk/history + - /docs/api/versions/v1.0/realtime-sdk/history + - /docs/api/versions/v0.8/realtime-sdk/history --- inline-toc. @@ -53,8 +53,8 @@ h6(#channel-history). csharp: History bq(definition). - default: history(Object option, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable history(Hash option) -> yields "PaginatedResult":#paginated-result<"Message":#message> + default: history(Object option, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) + 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) objc,swift: history(query: ARTRealtimeHistoryQuery?, callback: ("ARTPaginatedResult":#paginated-result<"ARTMessage":#message>?, ARTErrorInfo?) -> Void) throws csharp: Task> HistoryAsync("PaginatedRequestParams":#paginated-request-params dataQuery, bool untilAttach = false); @@ -89,7 +89,7 @@ blang[java]. 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. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[csharp]. h4. Returns @@ -98,16 +98,16 @@ blang[csharp]. 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 "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On success, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that 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. + On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that 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. - Failure to retrieve the message history will trigger the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. + Failure to retrieve the message history will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. h2. Presence object @@ -120,8 +120,8 @@ h6(#presence-history). csharp: History bq(definition). - default: history(Object option, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable history(Hash option) -> yields "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> + default: history(Object option, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) + 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) objc,swift: history(query: ARTRealtimeHistoryQuery?, callback: ("ARTPaginatedResult":#paginated-result<"ARTPresenceMessage":#presence-message>?, ARTErrorInfo?) -> Void) throws csharp: Task<"PaginatedResult":#paginated-result<"PresenceMessage":#presence-message>> HistoryAsync("PaginatedRequestParams":#paginated-request-params query, bool untilAttach = false [deprecated]) @@ -155,7 +155,7 @@ blang[java]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods. - Failure to retrieve the presence event history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the presence event history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[csharp]. h4. Returns @@ -164,16 +164,16 @@ blang[csharp]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods. - Failure to retrieve the presence event history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the presence event history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On success, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next()@":#paginated-result and "@first()@":#paginated-result methods. + On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next()@":#paginated-result and "@first()@":#paginated-result methods. - Failure to retrieve the presence event history will trigger the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. + Failure to retrieve the presence event history will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. h2(#related-types). Related types diff --git a/content/api/realtime-sdk/messages.textile b/content/api/realtime-sdk/messages.textile index b239096af3..d661290183 100644 --- a/content/api/realtime-sdk/messages.textile +++ b/content/api/realtime-sdk/messages.textile @@ -26,9 +26,9 @@ jump_to: - fromEncoded#message-from-encoded - fromEncodedArray#message-from-encoded-array redirect_from: - - /api/versions/v1.1/realtime-sdk/messages - - /api/versions/v1.0/realtime-sdk/messages - - /api/versions/v0.8/realtime-sdk/messages + - /docs/api/versions/v1.1/realtime-sdk/messages + - /docs/api/versions/v1.0/realtime-sdk/messages + - /docs/api/versions/v0.8/realtime-sdk/messages --- inline-toc. @@ -75,7 +75,7 @@ h6(#extras). default: extras csharp: Extras -Metadata and/or ancillary payloads, if provided. The only currently valid payloads for extras are the "@push@":/push/publish#payload, "@ref@":/channels/messages#interactions and "@privileged@":/general/webhooks#skipping objects.
__Type: @JSONObject@, @JSONArray@plain C# object that can be converted to JSON@JSON Object@@Hash@, @Array@@Dict@, @List@@Dictionary@, @Array@@NSDictionary *@, @NSArray *@@Associative Array@, @Array@__ +Metadata and/or ancillary payloads, if provided. The only currently valid payloads for extras are the "@push@":/push/publish#payload, "@ref@":/channels/messages#interactions and "@privileged@":/docs/general/webhooks#skipping objects.
__Type: @JSONObject@, @JSONArray@plain C# object that can be converted to JSON@JSON Object@@Hash@, @Array@@Dict@, @List@@Dictionary@, @Array@@NSDictionary *@, @NSArray *@@Associative Array@, @Array@__ h6(#id). default: id @@ -120,16 +120,16 @@ h6(#message-from-encoded). bq(definition). default: Message.fromEncoded(Object encodedMsg, ChannelOptions channelOptions?) -> Message -A static factory method to create a "@Message@":/api/realtime-sdk/types#message from a deserialized @Message@-like object encoded using Ably's wire protocol. +A static factory method to create a "@Message@":/docs/api/realtime-sdk/types#message from a deserialized @Message@-like object encoded using Ably's wire protocol. h4. Parameters - encodedMsg := a @Message@-like deserialized object.
__Type: @Object@__ -- channelOptions := an optional "@ChannelOptions@":/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ +- channelOptions := an optional "@ChannelOptions@":/docs/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ h4. Returns -A "@Message@":/api/realtime-sdk/types#message object +A "@Message@":/docs/api/realtime-sdk/types#message object h6(#message-from-encoded-array). default: Message.fromEncodedArray @@ -137,13 +137,13 @@ h6(#message-from-encoded-array). bq(definition). default: Message.fromEncodedArray(Object[] encodedMsgs, ChannelOptions channelOptions?) -> Message[] -A static factory method to create an array of "@Messages@":/api/realtime-sdk/types#message from an array of deserialized @Message@-like object encoded using Ably's wire protocol. +A static factory method to create an array of "@Messages@":/docs/api/realtime-sdk/types#message from an array of deserialized @Message@-like object encoded using Ably's wire protocol. h4. Parameters - encodedMsgs := an array of @Message@-like deserialized objects.
__Type: @Array@__ -- channelOptions := an optional "@ChannelOptions@":/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ +- channelOptions := an optional "@ChannelOptions@":/docs/api/realtime-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ h4. Returns -An @Array@ of "@Message@":/api/realtime-sdk/types#message objects +An @Array@ of "@Message@":/docs/api/realtime-sdk/types#message objects diff --git a/content/api/realtime-sdk/presence.textile b/content/api/realtime-sdk/presence.textile index 5cd8097950..a0654140c1 100644 --- a/content/api/realtime-sdk/presence.textile +++ b/content/api/realtime-sdk/presence.textile @@ -29,9 +29,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/presence - - /api/versions/v1.0/realtime-sdk/presence - - /api/versions/v0.8/realtime-sdk/presence + - /docs/api/versions/v1.1/realtime-sdk/presence + - /docs/api/versions/v1.0/realtime-sdk/presence + - /docs/api/versions/v0.8/realtime-sdk/presence --- inline-toc. @@ -91,8 +91,8 @@ There are two overloaded versions of this method. bq(definition#enter-none). - default: enter(callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable enter() -> yields + default: enter(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable enter() -> yields java: void enter("CompletionListener":#completion-listener listener) objc,swift: enter(data: nil, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task EnterAsync() @@ -100,8 +100,8 @@ bq(definition#enter-none). Enter a presence channel without any data. 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. bq(definition#enter-data). - default: enter(Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable enter(Object data) -> yields + default: enter(Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable enter(Object data) -> yields java: void enter(Object data, "CompletionListener":#completion-listener listener) objc,swift: enter(data: AnyObject?, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task EnterAsync(object clientData) @@ -139,9 +139,9 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On successfully entering the channel, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to enter, the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. + On successfully entering the channel, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to enter, the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. h6(#leave). default: leave @@ -154,8 +154,8 @@ There are two overloaded versions of this method. bq(definition#leave-none). - default: leave(callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable leave() -> yields + default: leave(callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable leave() -> yields java: void leave("CompletionListener":#completion-listener listener) swift,objc: leave(data: nil, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task LeaveAsync() @@ -163,8 +163,8 @@ bq(definition#leave-none). Leave a presence channel without emitting any data. bq(definition#leave-data). - default: leave(Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable leave(Object data) -> yields + default: leave(Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable leave(Object data) -> yields java: void leave(Object data, "CompletionListener":#completion-listener listener) swift,objc: leave(data: AnyObject?, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task LeaveAsync(object clientData) @@ -202,9 +202,9 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On successfully leaving the channel, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to leave, the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. + On successfully leaving the channel, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to leave, the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. h6(#update). default: update @@ -217,8 +217,8 @@ Clients can update their member data on the channel which will trigger a broadca
bq(definition#update-data). - default: update(Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable update(Object data) -> yields + default: update(Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable update(Object data) -> yields java: void update(Object data, "CompletionListener":#completion-listener listener) swift,objc: update(data: AnyObject?, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task UpdateAsync(object clientData) @@ -256,9 +256,9 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On successfully updating the data, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to update, the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. + On successfully updating the data, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to update, the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. h6(#get). default: get @@ -271,8 +271,8 @@ When a channel is attached, the Ably service immediately synchronizes the presen When a channel is @initialized@ (i.e. no attempt to attach has yet been made for this channel), then calling @get@ will implicitly attach the channel. bq(definition). - default: get(Object options, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PresenceMessage[]":#presence-message members)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable get(Hash options) -> yields "PresenceMessage[]":#presence-message + default: get(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PresenceMessage[]":#presence-message members)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable get(Hash options) -> yields "PresenceMessage[]":#presence-message java: "PresenceMessage[]":#presence-message get("Param":#param[] options) swift,objc: get(query: ARTRealtimePresenceQuery, callback: (["ARTPresenceMessage":#presence-message], ARTErrorInfo?) -> Void) csharp: Task> GetAsync(GetOptions { bool waitForSync = true, string clientId = "", string connectionId = "" }) @@ -290,8 +290,8 @@ blang[jsall,ruby,java,swift,objc]. h4. @options@ parameters@ARTRealtimePresenceQuery@ properties@GetOptions@ properties -- clientId:client_id := when provided, will filter array of members returned that match the provided "@clientId@":/api/realtime-sdk#client-id"@client_id@":/api/realtime-sdk#client-id"@ClientId@":/api/realtime-sdk#client-id string -- connectionId:connection_id := when provided, will filter array of members returned that match the provided @connectionId@@ConnectionId@@connection_id@":/api/realtime-sdk/connection#id string +- clientId:client_id := when provided, will filter array of members returned that match the provided "@clientId@":/docs/api/realtime-sdk#client-id"@client_id@":/docs/api/realtime-sdk#client-id"@ClientId@":/docs/api/realtime-sdk#client-id string +- connectionId:connection_id := when provided, will filter array of members returned that match the provided @connectionId@@ConnectionId@@connection_id@":/docs/api/realtime-sdk/connection#id string - waitForSync:wait_for_sync := _true_ A boolean value that by default waits for the initial presence synchronization following channel attachment to complete before returning the members present. When false, the current list of members is returned without waiting for a complete synchronization blang[jsall,swift,objc]. @@ -306,31 +306,31 @@ blang[java]. On success, the returned array of "@PresenceMessage@":#presence-message objects corresponds to the current set of present members on the channel. - Failure to retrieve the current presence member set will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the current presence member set will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[csharp]. h4. Returns On success, the returned enumerable of "#PresenceMessage@":#presence-message objects correspond to the current set of present members on the channel. - Failure to retrieve the current presence member set will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the current presence member set will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On success, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method yield an array of "@PresenceMessage@":#presence-message objects to the current set of present members on the channel. + On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield an array of "@PresenceMessage@":#presence-message objects to the current set of present members on the channel. - Failure to retrieve the current presence member set will trigger the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. + Failure to retrieve the current presence member set will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. h6(#history). default: history csharp: History bq(definition). - default: history(Object options, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable history(Hash options) -> yields "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> + default: history(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable history(Hash options) -> yields "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> java: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history("Param":#param[] options) objc,swift: history(query: ARTRealtimeHistoryQuery?, callback: ("ARTPaginatedResult":#paginated-result<"ARTPresenceMessage":#presence-message>?, ARTErrorInfo?) -> Void) throws csharp: Task> HistoryAsync("PaginatedRequestParams":#paginated-request-params query, bool untilAttach = false [deprecated]) @@ -360,7 +360,7 @@ blang[java]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[csharp]. h4. Returns @@ -369,16 +369,16 @@ blang[csharp]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception. Only if the task is awaited. + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception. Only if the task is awaited. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On success, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next()@":#paginated-result and "@first()@":#paginated-result methods. + On success, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method yield a "PaginatedResult":#paginated-result that encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next()@":#paginated-result and "@first()@":#paginated-result methods. - Failure to retrieve the message history will trigger the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. + Failure to retrieve the message history will trigger the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable with an "@ErrorInfo@":#error-info object with the failure reason. h6(#subscribe). default: subscribe @@ -505,8 +505,8 @@ There are two overloaded versions of this method. bq(definition#enter-client-none). - default: enterClient(String clientId, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable enter_client(String client_id) -> yields + default: enterClient(String clientId, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable enter_client(String client_id) -> yields java: void enterClient(String clientId, "CompletionListener":#completion-listener listener) objc,swift: enterClient(clientId: String, data: nil, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task EnterClientAsync(string clientId) @@ -514,8 +514,8 @@ bq(definition#enter-client-none). Enter a presence channel on behalf of the provided @clientId@@client_id@@ClientId@ without any data. 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. bq(definition#enter-client-data). - default: enterClient(String clientId, Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable enter_client(String client_id, Object data) -> yields + default: enterClient(String clientId, Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable enter_client(String client_id, Object data) -> yields java: void enterClient(String clientId, Object data, "CompletionListener":#completion-listener listener) objc,swift: enterClient(clientId: String, data: AnyObject?, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task EnterClientAsync(string clientId, object clientData) @@ -553,9 +553,9 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On successfully entering the channel, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to enter, the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. + On successfully entering the channel, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to enter, the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. h6(#leave-client). default: leaveClient @@ -570,8 +570,8 @@ There are two overloaded versions of this method. bq(definition#leave-client-none). - default: leaveClient(String clientId, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable leave_client(String client_id) -> yields + default: leaveClient(String clientId, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable leave_client(String client_id) -> yields java: void leaveClient(String clientId, "CompletionListener":#completion-listener listener) swift,objc: leaveClient(clientId: String, data: nil, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task LeaveClientAsync(string clientId, object data) @@ -579,8 +579,8 @@ bq(definition#leave-client-none). Leave a presence channel on behalf of the provided @clientId@@client_id@@ClientId@ without emitting any data. bq(definition#leave-client-data). - default: leaveClient(String clientId, Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable leave_client(String client_id, Object data) -> yields + default: leaveClient(String clientId, Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable leave_client(String client_id, Object data) -> yields java: void leaveClient(String clientId, Object data, "CompletionListener":#completion-listener listener) swift,objc: leave(clientId: String, data: AnyObject?, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task LeaveClientAsync(string clientId) @@ -618,9 +618,9 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On successfully leaving the channel, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to leave, the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. + On successfully leaving the channel, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to leave, the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. h6(#update-client). default: updateClient @@ -634,8 +634,8 @@ Clients can update the member data on behalf of the given @ bq(definition#update-client-data). - default: updateClient(String clientId, Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable update_client(String client_id, Object data) -> yields + default: updateClient(String clientId, Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable update_client(String client_id, Object data) -> yields java: void updateClient(String clientId, Object data, "CompletionListener":#completion-listener listener) swift,objc: update(clientId: String, data: AnyObject?, callback: ((ARTErrorInfo?) -> Void)?) csharp: Task UpdateClientAsync(string clientId, object data) @@ -673,9 +673,9 @@ blang[csharp]. blang[ruby]. h4. Returns - A "@Deferrable@":/api/realtime-sdk/types#deferrable object is returned from the method. + A "@Deferrable@":/docs/api/realtime-sdk/types#deferrable object is returned from the method. - On successfully updating the data, the registered success blocks for the "@Deferrable@":/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to update, the @errback@ callbacks of the "@Deferrable@":/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. + On successfully updating the data, the registered success blocks for the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable and any block provided to the method are executed. On failure to update, the @errback@ callbacks of the "@Deferrable@":/docs/api/realtime-sdk/types#deferrable are called with an "@ErrorInfo@":#error-info argument describing the failure reason. h2(#related-types). Related types diff --git a/content/api/realtime-sdk/push-admin.textile b/content/api/realtime-sdk/push-admin.textile index 3524f00f26..7e8197f2ce 100644 --- a/content/api/realtime-sdk/push-admin.textile +++ b/content/api/realtime-sdk/push-admin.textile @@ -22,7 +22,7 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/push-admin + - /docs/api/versions/v1.1/realtime-sdk/push-admin --- inline-toc. diff --git a/content/api/realtime-sdk/push.textile b/content/api/realtime-sdk/push.textile index 7e74679e4d..32ff90579f 100644 --- a/content/api/realtime-sdk/push.textile +++ b/content/api/realtime-sdk/push.textile @@ -15,7 +15,7 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/push + - /docs/api/versions/v1.1/realtime-sdk/push --- inline-toc. diff --git a/content/api/realtime-sdk/statistics.textile b/content/api/realtime-sdk/statistics.textile index 8c89a9d6bb..826485ee75 100644 --- a/content/api/realtime-sdk/statistics.textile +++ b/content/api/realtime-sdk/statistics.textile @@ -18,9 +18,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/realtime-sdk/statistics - - /api/versions/v1.0/realtime-sdk/statistics - - /api/versions/v0.8/realtime-sdk/statistics + - /docs/api/versions/v1.1/realtime-sdk/statistics + - /docs/api/versions/v1.0/realtime-sdk/statistics + - /docs/api/versions/v0.8/realtime-sdk/statistics --- blang[javascript,nodejs]. @@ -32,13 +32,13 @@ blang[javascript,nodejs]. h6(#stats). stats bq(definition). - jsall: stats(Object options, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":/api/realtime-sdk/types#stats> results)) - ruby: "Deferrable":/api/realtime-sdk/types#deferrable stats(Hash options) -> yields "PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":/api/realtime-sdk/types#stats> - java: "PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":/api/realtime-sdk/types#stats-type> stats("Param":#param[] options) - swift,objc: stats(query: ARTStatsQuery?, callback: ("ARTPaginatedResult":/api/realtime-sdk/types#paginated-result<"ARTStats":/api/realtime-sdk/types#stats>?, ARTErrorInfo?) -> Void) throws - csharp: Task<"PaginatedResult":/api/realtime-sdk/types#paginated-result<"Stats":/api/realtime-sdk/types#status>> StatsAsync("StatsRequestParams":#statsdatarequest query) + jsall: stats(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":/docs/api/realtime-sdk/types#stats> results)) + ruby: "Deferrable":/docs/api/realtime-sdk/types#deferrable stats(Hash options) -> yields "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result<"Stats":/docs/api/realtime-sdk/types#stats> + 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) -This call queries the "REST @/stats@ API":/api/rest-sdk#stats-type and retrieves your application's usage statistics. A "PaginatedResult":/api/realtime-sdk/types#paginated-result is returned, containing an array of "Stats":/api/realtime-sdk/types#stats-type for the first page of results. "PaginatedResult":/api/realtime-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. +This call queries the "REST @/stats@ API":/docs/api/rest-sdk#stats-type and retrieves your application's usage statistics. A "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result is returned, containing an array of "Stats":/docs/api/realtime-sdk/types#stats-type for the first page of results. "PaginatedResult":/docs/api/realtime-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. <%= partial partial_version('realtime/_stats') %> diff --git a/content/api/realtime-sdk/types.textile b/content/api/realtime-sdk/types.textile index 16c45967d1..efbe240df4 100644 --- a/content/api/realtime-sdk/types.textile +++ b/content/api/realtime-sdk/types.textile @@ -15,13 +15,13 @@ languages: - flutter - go redirect_from: - - /api/versions/v1.1/realtime-sdk/types - - /api/versions/v1.0/realtime-sdk/types - - /api/versions/v0.8/realtime-sdk/types - - /realtime/types - - /realtime/versions/v1.1/types - - /realtime/versions/v1.0/types - - /realtime/versions/v0.8/types + - /docs/api/versions/v1.1/realtime-sdk/types + - /docs/api/versions/v1.0/realtime-sdk/types + - /docs/api/versions/v0.8/realtime-sdk/types + - /docs/realtime/types + - /docs/realtime/versions/v1.1/types + - /docs/realtime/versions/v1.0/types + - /docs/realtime/versions/v0.8/types --- blang[javascript,nodejs]. diff --git a/content/api/rest-api.textile b/content/api/rest-api.textile index 73beb0771f..4131c14f3e 100644 --- a/content/api/rest-api.textile +++ b/content/api/rest-api.textile @@ -40,20 +40,20 @@ jump_to: Utilities API: - time redirect_from: - - /api/versions/v1.1/rest-api - - /api/versions/v1.0/rest-api - - /api/versions/v0.8/rest-api - - /api/versions/v1.1/beta - - /rest-api - - /rest-api/versions/v1.1 - - /rest-api/versions/v1.0 - - /rest-api/versions/v0.8 - - /rest-api/versions/v1.1/beta + - /docs/api/versions/v1.1/rest-api + - /docs/api/versions/v1.0/rest-api + - /docs/api/versions/v0.8/rest-api + - /docs/api/versions/v1.1/beta + - /docs/rest-api + - /docs/rest-api/versions/v1.1 + - /docs/rest-api/versions/v1.0 + - /docs/rest-api/versions/v0.8 + - /docs/rest-api/versions/v1.1/beta --- Welcome to the Ably REST API Reference documentation. -The Ably REST API provides a way for a wide range of server and client devices to communicate with the Ably service over "REST":https://en.wikipedia.org/wiki/Representational_State_Transfer. The REST API does not provide a realtime long-lived connection to Ably, but in all other respects is a simple subset of the full "realtime messaging API":/api/realtime-sdk. +The Ably REST API provides a way for a wide range of server and client devices to communicate with the Ably service over "REST":https://en.wikipedia.org/wiki/Representational_State_Transfer. The REST API does not provide a realtime long-lived connection to Ably, but in all other respects is a simple subset of the full "realtime messaging API":/docs/api/realtime-sdk. The primary use-case for the REST API is for servers that are part of the back-end of an application such as a web application, that publish messages, issue access tokens (temporary and client-specific) for its various clients, obtain message and presence history, and retrieve statistics. @@ -78,7 +78,7 @@ Using the REST API directly is fully supported, Ably recommends that customers s The "Ably client libraries SDKs are documented":https://ably.com/docs, and provide additional features that improve performance and resilience that the REST API cannot deliver on its own, such as automatic re-routing around network problems by using alternative datacenters. -You can also use the "Rest#request()":/api/rest-sdk#request method to make arbitrary API calls against Ably, to use endpoints that libraries do not yet have built-in support for. +You can also use the "Rest#request()":/docs/api/rest-sdk#request method to make arbitrary API calls against Ably, to use endpoints that libraries do not yet have built-in support for. h2(#common). Common API behavior @@ -294,15 +294,15 @@ bc[sh]. curl https://rest.ably.io/channels/rest-example/messages \ h3(#token-authentication). Token Authentication -*Token Authentication* uses an Ably-compatible token to authenticate with Ably without sharing a private API key. This can be an "Ably Token":/api/rest-sdk/authentication#tokens obtained via the REST API "@requestToken@":#request-token endpoint, an "Ably JWT":/api/rest-sdk/authentication#ably-jwt signed by your API key, or an "External JWT":https://jwt.io object "with an embedded Ably-compatible token":/auth/token#embedded. Tokens are authentication credentials that are short-lived, and therefore they may more readily be distributed to clients where there is a risk of compromise. Tokens may also be issued with a particular scope - such as a limited set of "access rights or capabilities":/auth/capabilities or being limited to use by a specific "@clientId@ identity":#identified-clients - and therefore token-based authentication provides the flexibility to implement access and identity control policies in the application. See the "Token Authentication documentation":/auth/token for more details. +*Token Authentication* uses an Ably-compatible token to authenticate with Ably without sharing a private API key. This can be an "Ably Token":/docs/api/rest-sdk/authentication#tokens obtained via the REST API "@requestToken@":#request-token endpoint, an "Ably JWT":/docs/api/rest-sdk/authentication#ably-jwt signed by your API key, or an "External JWT":https://jwt.io object "with an embedded Ably-compatible token":/auth/token#embedded. Tokens are authentication credentials that are short-lived, and therefore they may more readily be distributed to clients where there is a risk of compromise. Tokens may also be issued with a particular scope - such as a limited set of "access rights or capabilities":/auth/capabilities or being limited to use by a specific "@clientId@ identity":#identified-clients - and therefore token-based authentication provides the flexibility to implement access and identity control policies in the application. See the "Token Authentication documentation":/auth/token for more details. -The construction of an Ably "@TokenRequest@":/api/token-request-spec is described in the "Authentication Ably TokenRequest spec documentation":/api/token-request-spec. The resulting @token response@ object contains the token properties as defined in "Ably TokenRequest spec":/api/token-request-spec. +The construction of an Ably "@TokenRequest@":/docs/api/token-request-spec is described in the "Authentication Ably TokenRequest spec documentation":/docs/api/token-request-spec. The resulting @token response@ object contains the token properties as defined in "Ably TokenRequest spec":/docs/api/token-request-spec. h4(#using-token-auth). Usage in HTTP request header pre. Authorization: Bearer -The @@ is either the @token@ attribute of the Ably Token generated by "@requestToken@":#request-token encoded with "RFC 4648 Base64":https://datatracker.ietf.org/doc/html/rfc4648, or an "Ably JWT":/api/rest-sdk/authentication#ably-jwt. If using a generic HTTP client library it will probably be necessary to add the @Authorization@ header explicitly. +The @@ is either the @token@ attribute of the Ably Token generated by "@requestToken@":#request-token encoded with "RFC 4648 Base64":https://datatracker.ietf.org/doc/html/rfc4648, or an "Ably JWT":/docs/api/rest-sdk/authentication#ably-jwt. If using a generic HTTP client library it will probably be necessary to add the @Authorization@ header explicitly. Example request: @@ -338,7 +338,7 @@ In JSON format, the accepted types for the @data@ payload are: MessagePack additionally "supports byte arrays":https://github.com/msgpack/msgpack/blob/master/spec.md#formats-bin -A message may be published over REST on behalf of an existing realtime connection when a valid @connectionKey@ is present. For example, if you want to publish a message using the REST API so that it appears to come from an existing connected realtime client, then the connection's "private (secret) connection key":/api/realtime-sdk/connection#key must be included. +A message may be published over REST on behalf of an existing realtime connection when a valid @connectionKey@ is present. For example, if you want to publish a message using the REST API so that it appears to come from an existing connected realtime client, then the connection's "private (secret) connection key":/docs/api/realtime-sdk/connection#key must be included. Example request: @@ -427,7 +427,7 @@ h5. Options h5. Returns -When successful, returns status code 201 and an object with @channel@ and @messageId@ properties, in case you want to know the message ID assigned to correlate with messages received by realtime subscribers or Ably Integration recipients. When unsuccessful, returns an error as an "ErrorInfo":/api/rest-sdk/types#error-info object. +When successful, returns status code 201 and an object with @channel@ and @messageId@ properties, in case you want to know the message ID assigned to correlate with messages received by realtime subscribers or Ably Integration recipients. When unsuccessful, returns an error as an "ErrorInfo":/docs/api/rest-sdk/types#error-info object. h3(#unenveloped). Unenveloped publish @@ -461,7 +461,7 @@ h5. Options h5. Returns -When successful, returns an object with @channel@ and @messageId@ properties, in case you want to know the message ID assigned to correlate with messages received by realtime subscribers or integrations recipients. When unsuccessful, returns an error as an "ErrorInfo":/api/rest-sdk/types#error-info object. +When successful, returns an object with @channel@ and @messageId@ properties, in case you want to know the message ID assigned to correlate with messages received by realtime subscribers or integrations recipients. When unsuccessful, returns an error as an "ErrorInfo":/docs/api/rest-sdk/types#error-info object. h3(#message-history). Retrieve message history for a channel @@ -1160,7 +1160,7 @@ h3(#request-token). Request an access token h6. POST rest.ably.io/keys/@@/requestToken -This is the means by which clients obtain access tokens to use the service. The construction of an Ably "@TokenRequest@":/api/token-request-spec is described in the "Authentication Ably TokenRequest spec documentation":/api/token-request-spec. The resulting @token response@ object contains the token properties as defined in "Ably TokenRequest spec":/api/token-request-spec. +This is the means by which clients obtain access tokens to use the service. The construction of an Ably "@TokenRequest@":/docs/api/token-request-spec is described in the "Authentication Ably TokenRequest spec documentation":/docs/api/token-request-spec. The resulting @token response@ object contains the token properties as defined in "Ably TokenRequest spec":/docs/api/token-request-spec. Example request: @@ -1175,14 +1175,14 @@ None h5. Options -- Request body := signed or unsigned Ably "@TokenRequest@":/api/token-request-spec. All Ably "@TokenRequests@":/api/token-request-spec require values for @keyName@ and @timestamp@ attributes. In addition, signed Ably "@TokenRequests@":/api/token-request-spec require values for attributes @nonce@ and @mac@. +- Request body := signed or unsigned Ably "@TokenRequest@":/docs/api/token-request-spec. All Ably "@TokenRequests@":/docs/api/token-request-spec require values for @keyName@ and @timestamp@ attributes. In addition, signed Ably "@TokenRequests@":/docs/api/token-request-spec require values for attributes @nonce@ and @mac@. - Content-Type := @text/plain@ - Accept := @application/json@ by default, or @application/x-msgpack@ -- Auth required := no (for signed Ably "@TokenRequests@":/api/token-request-spec), yes (for unsigned Ably "@TokenRequests@":/api/token-request-spec, "basic":#basic-authentication or "token":#token-authentication permitted) +- Auth required := no (for signed Ably "@TokenRequests@":/docs/api/token-request-spec), yes (for unsigned Ably "@TokenRequests@":/docs/api/token-request-spec, "basic":#basic-authentication or "token":#token-authentication permitted) h5. Returns -A successful request will return a "token details object":/api/realtime-sdk/types#token-details containing the token string. +A successful request will return a "token details object":/docs/api/realtime-sdk/types#token-details containing the token string. bc[json]. { "token": "xVLyHw.CLchevH3hF....MDh9ZC_Q", // token string @@ -1354,9 +1354,9 @@ bc[json]. [ } ] -*Failure*: If the batch publish request itself fails, the response includes an "ErrorInfo":/api/rest-sdk/types#error-info object. +*Failure*: If the batch publish request itself fails, the response includes an "ErrorInfo":/docs/api/rest-sdk/types#error-info object. -*Partial success*: If the batch request itself succeeds, but one or more of the requests within the batch fails, then the response includes a top-level @error@ property with a status code of @400@ and an error code of @40020@. The @batchResponse@ object for the failed request includes the channel name and an "ErrorInfo":/api/rest-sdk/types#error-info object that describes the error. The successful requests within the batch return a @batchResponse@ object for each channel, together with the @messageId@ of the published message. +*Partial success*: If the batch request itself succeeds, but one or more of the requests within the batch fails, then the response includes a top-level @error@ property with a status code of @400@ and an error code of @40020@. The @batchResponse@ object for the failed request includes the channel name and an "ErrorInfo":/docs/api/rest-sdk/types#error-info object that describes the error. The successful requests within the batch return a @batchResponse@ object for each channel, together with the @messageId@ of the published message. h3(#batch-presence). Batch presence @@ -1429,7 +1429,7 @@ bc[text]. [{ data: }] -*Failure*: If the batch request itself fails the response body contains an "ErrorInfo":/api/rest-sdk/types#error-info object. +*Failure*: If the batch request itself fails the response body contains an "ErrorInfo":/docs/api/rest-sdk/types#error-info object. *Partial success*: If the batch request itself succeeds, but one or more of the requests within the batch fails, then the response for the failed request contains an error object with the error code @40020@ and a status code of @400@. Successful requests within the batch include a @presence@ array that describes the presence state of each of the channel members. @@ -1440,7 +1440,7 @@ h3(#time). Get the service time h6. GET rest.ably.io/time -This returns the service time in milliseconds since the epoch. This may be used by clients that do not have local access to a sufficiently accurate time source when generating an Ably "@TokenRequest@":/api/token-request-spec. (Ably "@TokenRequests@":/api/token-request-spec include a timestamp and have a limited validity period to help defend against replay attacks.) +This returns the service time in milliseconds since the epoch. This may be used by clients that do not have local access to a sufficiently accurate time source when generating an Ably "@TokenRequest@":/docs/api/token-request-spec. (Ably "@TokenRequests@":/docs/api/token-request-spec include a timestamp and have a limited validity period to help defend against replay attacks.) The result is a JSON-encoded array of length 1 containing the time result as a number. diff --git a/content/api/rest-sdk.textile b/content/api/rest-sdk.textile index 3b7fc401e6..440a7924d6 100644 --- a/content/api/rest-sdk.textile +++ b/content/api/rest-sdk.textile @@ -30,9 +30,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/rest-sdk - - /api/versions/v1.0/rest-sdk - - /api/versions/v0.8/rest-sdk + - /docs/api/versions/v1.1/rest-sdk + - /docs/api/versions/v1.0/rest-sdk + - /docs/api/versions/v0.8/rest-sdk --- inline-toc. @@ -126,7 +126,7 @@ h6(#auth). default: auth csharp,go: Auth -A reference to the "@Auth@":/api/rest-sdk/authentication authentication object configured for this client library. +A reference to the "@Auth@":/docs/api/rest-sdk/authentication authentication object configured for this client library. h6(#push). default: push @@ -145,7 +145,7 @@ h6(#channels). default: channels csharp,go: Channels -"@Channels@":/channels is a reference to the "@Channel@":/channels collection instance for this library indexed by the channel name. You can use the "@Get@":/api/rest-sdk/channels#get method of this to get a @Channel@ instance. See "channels":/channels and "messages":/channels/messages/ for more information. +"@Channels@":/channels is a reference to the "@Channel@":/channels collection instance for this library indexed by the channel name. You can use the "@Get@":/docs/api/rest-sdk/channels#get method of this to get a @Channel@ instance. See "channels":/channels and "messages":/channels/messages/ for more information. h2(#methods). default: AblyRest Methods @@ -160,16 +160,16 @@ h6(#stats). csharp,go: Stats bq(definition). - default: stats(Object options, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":#stats> results)) - ruby: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":#stats> stats(Hash options) - python: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":#stats> stats(kwargs_options) - php: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":#stats> stats(Array options) - java: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":#stats> stats("Param":#param[] options) - csharp: Task<"PaginatedResult":#paginated-result<"Stats":#stats>> StatsAsync("StatsRequestParams":/api/rest-sdk/types#data-request query) - swift,objc: stats(query: ARTStatsQuery?, callback: ("ARTPaginatedResult":#/realtime/types#paginated-result<"ARTStats":/api/realtime-sdk/types#stats>?, ARTErrorInfo?) -> Void) throws + default: stats(Object options, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats> results)) + ruby: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats> stats(Hash options) + python: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats> stats(kwargs_options) + php: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats> stats(Array options) + java: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":#stats> stats("Param":#param[] options) + csharp: Task<"PaginatedResult":#paginated-result<"Stats":#stats>> StatsAsync("StatsRequestParams":/docs/api/rest-sdk/types#data-request query) + swift,objc: stats(query: ARTStatsQuery?, callback: ("ARTPaginatedResult":#/docs/realtime/types#paginated-result<"ARTStats":/docs/api/realtime-sdk/types#stats>?, ARTErrorInfo?) -> Void) throws go: (c *RestClient) Stats(params *PaginateParams) (*PaginatedResult, error) -This call queries the "REST @/stats@ API":/api/rest-api#stats and retrieves your application's usage statistics. A "PaginatedResult":/api/rest-sdk/types#paginated-result is returned, containing an array of "Stats":#stats for the first page of results. "PaginatedResult":/api/rest-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. +This call queries the "REST @/stats@ API":/docs/api/rest-api#stats and retrieves your application's usage statistics. A "PaginatedResult":/docs/api/rest-sdk/types#paginated-result is returned, containing an array of "Stats":#stats for the first page of results. "PaginatedResult":/docs/api/rest-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. See "statistics":/metadata-stats/stats for more information. @@ -180,37 +180,37 @@ h6(#time). csharp: Time bq(definition). - default: time(callback("ErrorInfo":/api/rest-sdk/types#error-info err, Number time)) + default: time(callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, Number time)) ruby: Time time python: Int time() php: Integer time() java: long time() csharp: Task TimeAsync() objc,swift: time(callback: (NSDate?, NSError?) -> Void) - go: (c *RestClient) Time() (time.Time, "error":/api/rest-sdk/types#error-info) + go: (c *RestClient) Time() (time.Time, "error":/docs/api/rest-sdk/types#error-info) -Obtains the time from the Ably service as a @Time@ objecta @DateTimeOffset@ objectmilliseconds since epoch. (Clients that do not have access to a sufficiently well maintained time source and wish to issue Ably "TokenRequests":/api/rest-sdk/authentication#token-request with a more accurate timestamp should use the @queryTime@ "clientOptions":#client-options instead of this method). +Obtains the time from the Ably service as a @Time@ objecta @DateTimeOffset@ objectmilliseconds since epoch. (Clients that do not have access to a sufficiently well maintained time source and wish to issue Ably "TokenRequests":/docs/api/rest-sdk/authentication#token-request with a more accurate timestamp should use the @queryTime@ "clientOptions":#client-options instead of this method). blang[jsall,objc,swift]. h4. Callback result On success, @time@ is a number containing the number of milliseconds since the epoch. - On failure to retrieve the Ably server time, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to retrieve the Ably server time, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[java,ruby,php,csharp]. h4. Returns On success, milliseconds since epochthe @Time@the @DateTimeOffset@ is returned. - Failure to retrieve the Ably server time will raise an "@AblyException@":/api/rest-sdk/types#ably-exception. + Failure to retrieve the Ably server time will raise an "@AblyException@":/docs/api/rest-sdk/types#ably-exception. blang[go]. h4. Returns On success, milliseconds since epochthe @Time@the @DateTimeOffset@ is returned. - On failure to retrieve the Ably server time, @error@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to retrieve the Ably server time, @error@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. <%= partial partial_version('rest/_request') %> diff --git a/content/api/rest-sdk/authentication.textile b/content/api/rest-sdk/authentication.textile index 1a17e257ed..c94da445a1 100644 --- a/content/api/rest-sdk/authentication.textile +++ b/content/api/rest-sdk/authentication.textile @@ -28,9 +28,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/rest-sdk/authentication - - /api/versions/v1.0/rest-sdk/authentication - - /api/versions/v0.8/rest-sdk/authentication + - /docs/api/versions/v1.1/rest-sdk/authentication + - /docs/api/versions/v1.0/rest-sdk/authentication + - /docs/api/versions/v0.8/rest-sdk/authentication --- blang[javascript,nodejs]. @@ -65,7 +65,7 @@ inline-toc. - TokenParams#token-params - Ably JWT#ably-jwt -The Auth object is available as the "@auth@ field":/api/rest-sdk#auth"@auth@ property":/api/rest-sdk#auth"@Auth@ property":/api/rest-sdk#auth"@auth@ attribute":/api/rest-sdk#auth of an "Ably REST client instance":/api/rest-sdk#constructor. +The Auth object is available as the "@auth@ field":/docs/api/rest-sdk#auth"@auth@ property":/docs/api/rest-sdk#auth"@Auth@ property":/docs/api/rest-sdk#auth"@auth@ attribute":/docs/api/rest-sdk#auth of an "Ably REST client instance":/docs/api/rest-sdk#constructor. h2(#properties). default: Auth Properties @@ -100,7 +100,7 @@ h6(#authorize). bq(definition). - default: authorize("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) + default: authorize("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) ruby: "TokenDetails":#token-details authorize("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) python: "TokenDetails":#token-details authorize(token_params="TokenParams":#token-params, auth_options="AuthOptions":#auth-options) php: "TokenDetails":#token-details authorize("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) @@ -127,7 +127,7 @@ blang[jsall,objc,swift]. On success, @tokenDetails@ contains a "@TokenDetails@":#token-details object containing the details of the new or existing "Ably Token":#token-details along with the @token@ string. - On failure to obtain an token, @err@ contains an "@ErrorInfo@":#error-info@NSError@ object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain an token, @err@ contains an "@ErrorInfo@":#error-info@NSError@ object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[java,ruby,php,python,go]. h4. Returns @@ -218,7 +218,7 @@ h6(#create-token-request). python: create_token_request bq(definition). - default: createTokenRequest("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "TokenRequest":#token-request tokenRequest)) + default: createTokenRequest("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "TokenRequest":#token-request tokenRequest)) ruby: "TokenRequest":#token-request create_token_request("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) python: "TokenRequest":#token-request create_token_request(token_params="TokenParams":#token-params, key_name=String, key_secret=String) php: "TokenRequest":#token-request createTokenRequest("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) @@ -247,7 +247,7 @@ blang[jsall,objc,swift]. On success, @tokenRequest@ contains a "@TokenRequest@":#token-request JSON object. - On failure to issue a "@TokenRequest@":#token-request, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to issue a "@TokenRequest@":#token-request, @err@ contains an "@ErrorInfo@":#error-info object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[java,ruby,php,python,go]. h4. Returns @@ -339,7 +339,7 @@ h6(#request-token). go: RequestToken bq(definition). - default: requestToken("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) + default: requestToken("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "TokenDetails":#token-details tokenDetails)) ruby: "TokenDetails":#token-details request_token("TokenParams":#token-params token_params, "AuthOptions":#auth-options auth_options) python: "TokenDetails":#token-details request_token(token_params="TokenParams":#token-params, key_name=String, key_secret=None, auth_callback=Lambda, auth_url=String, auth_method=String, auth_headers=Dict, auth_params=Dict, query_time=Boolean) php: "TokenDetails":#token-details requestToken("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) @@ -348,7 +348,7 @@ bq(definition). objc,swift: requestToken(tokenParams: "ARTTokenParams":#token-params?, withOptions: "ARTAuthOptions":#auth-options?, callback: ("ARTTokenDetails":#token-details?, NSError?) -> Void) go: "TokenDetails":#token-details RequestToken("TokenParams":#token-params tokenParams, "AuthOptions":#auth-options authOptions) -Calls the "@requestToken@@RequestToken@ REST API endpoint":/api/rest-api#request-token to obtain an "Ably Token":#token-details according to the specified @token_params@ and @auth_options@@tokenParams@ and @authOptions@. +Calls the "@requestToken@@RequestToken@ REST API endpoint":/docs/api/rest-api#request-token to obtain an "Ably Token":#token-details according to the specified @token_params@ and @auth_options@@tokenParams@ and @authOptions@. Both @auth_options@ and @token_params@@authOptions@ and @tokenParams@ are optional. When omitted or @null@@Null@@None@@nil@, the default token parameters and authentication options for the client library are used, as specified in the @ClientOptions@ when the client library was instantiated, or later updated with an explicit "@authorize@@Authorize@":#authorize request. Values passed in will be used instead of (rather than being merged with) the default values. @@ -368,7 +368,7 @@ blang[jsall,objc,swift]. On success, @tokenDetails@ contains a "@TokenDetails@":#token-details object containing the details of the new "Ably Token":#token-details along with the @token@ string. - On failure to obtain an "Ably Token":#token-details, @err@ contains an "@ErrorInfo@":#error-info@NSError@ object with an error response as defined in the "Ably REST API":/api/rest-api#common documentation. + On failure to obtain an "Ably Token":#token-details, @err@ contains an "@ErrorInfo@":#error-info@NSError@ object with an error response as defined in the "Ably REST API":/docs/api/rest-api#common documentation. blang[java,ruby,php,python,go]. h4. Returns diff --git a/content/api/rest-sdk/channel-status.textile b/content/api/rest-sdk/channel-status.textile index c8c716b298..fb9f401da9 100644 --- a/content/api/rest-sdk/channel-status.textile +++ b/content/api/rest-sdk/channel-status.textile @@ -10,8 +10,8 @@ jump_to: - ChannelStatus#channel-status - Occupancy#occupancy redirect_from: - - /api/versions/v1.1/rest-sdk/channel-status - - /api/versions/v1.0/rest-sdk/channel-status + - /docs/api/versions/v1.1/rest-sdk/channel-status + - /docs/api/versions/v1.0/rest-sdk/channel-status --- inline-toc. @@ -28,6 +28,6 @@ blang[javascript,nodejs]. h2(#types). Types -The payload of metadata events for channels is the "@ChannelDetails@":#channel-details type which contains the @channelId@ (AKA the "channel's name":/api/realtime-sdk/channels#name) and other static information about the channel, plus a @status@ containing a "@ChannelStatus@":#channel-status instance which contains information about the current state of the channel. +The payload of metadata events for channels is the "@ChannelDetails@":#channel-details type which contains the @channelId@ (AKA the "channel's name":/docs/api/realtime-sdk/channels#name) and other static information about the channel, plus a @status@ containing a "@ChannelStatus@":#channel-status instance which contains information about the current state of the channel. <%= partial partial_version('types/_channel_details') %> diff --git a/content/api/rest-sdk/channels.textile b/content/api/rest-sdk/channels.textile index b47d1ac39b..27aa0a07c2 100644 --- a/content/api/rest-sdk/channels.textile +++ b/content/api/rest-sdk/channels.textile @@ -28,9 +28,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/rest-sdk/channels - - /api/versions/v1.0/rest-sdk/channels - - /api/versions/v0.8/rest-sdk/channels + - /docs/api/versions/v1.1/rest-sdk/channels + - /docs/api/versions/v1.0/rest-sdk/channels + - /docs/api/versions/v0.8/rest-sdk/channels --- inline-toc. @@ -59,7 +59,7 @@ blang[javascript,nodejs]. h2(#channels-object). default: Channels -The @Channels@ object, accessed from the "rest library client constructor":/api/rest-sdk#channels, is used to create and destroy @Channel@ objects. It exposes the following public methods: +The @Channels@ object, accessed from the "rest library client constructor":/docs/api/rest-sdk#channels, is used to create and destroy @Channel@ objects. It exposes the following public methods: h3(#channels-methods). Channels Methods @@ -126,12 +126,12 @@ h6(#publish). There are two overloaded versions of this method: bq(definition#publish-data). - default: publish(String name, Object data, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) + default: publish(String name, Object data, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) ruby,php: publish(String name, Object data) python: publish(name=Unicode, data=Object) java: void publish(String name, Object data) csharp: Task PublishAsync(string name, object data, string clientId = null) - objc,swift: publish(name: String?, data: AnyObject?, callback: (("ARTErrorInfo":/api/realtime-sdk/types#error-info?) -> Void)?) + objc,swift: publish(name: String?, data: AnyObject?, callback: (("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?) -> Void)?) go: (c *RestChannel) Publish(name string, data interface{}) (error "ErrorInfo":#error-info) flutter: Future publish({String name, Object data}) @@ -140,12 +140,12 @@ Publish a single message on this channel based on a given event name and payload It is also possible to publish a message to multiple channels at once using our "batch publish feature":/messages/batch#batch-publish. bq(definition#publish-msg-array). - default: publish(Object[] messages, callback("ErrorInfo":/api/realtime-sdk/types#error-info err)) + default: publish(Object[] messages, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err)) ruby,php: publish("Message":#message[] messages) python: publish(messages=List<"Message":#message>) java: void publish("Message":#message[] messages) csharp: Task PublishAsync(IEnumerable<"Message":#message> messages) - objc,swift: publish(messages: [ "ARTMessage":#message ], callback: (("ARTErrorInfo":/api/realtime-sdk/types#error-info?) -> Void)?) + objc,swift: publish(messages: [ "ARTMessage":#message ], callback: (("ARTErrorInfo":/docs/api/realtime-sdk/types#error-info?) -> Void)?) go: (c *RestChannel) PublishAll(messages []*proto.Message) (error "ErrorInfo":#error-info) flutter: Future publish({List<"Message":#message> messages}) @@ -186,14 +186,14 @@ blang[jsall,swift,objc]. blang[java,ruby,php]. h4. Failure - On failure to publish the message, an "@AblyException@":/api/rest-sdk/types#ably-exception will be raised. + On failure to publish the message, an "@AblyException@":/docs/api/rest-sdk/types#ably-exception will be raised. blang[csharp]. h4. Returns The method is asynchronous and returns a Task that can be awaited. - On failure to publish the message, an "@AblyException@":/api/rest-sdk/types#ably-exception will be raised. + On failure to publish the message, an "@AblyException@":/docs/api/rest-sdk/types#ably-exception will be raised. blang[go]. h4. Returns @@ -210,7 +210,7 @@ h6(#history). csharp,go: History bq(definition). - default: history(Object options, callback("ErrorInfo":/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) + default: history(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) ruby: "PaginatedResult":#paginated-result<"Message":#message> history(Hash options) python: "PaginatedResult":#paginated-result<"Message":#message> history(kwargs_options) php: "PaginatedResult":#paginated-result<"Message":#message> history(Array options) @@ -223,7 +223,7 @@ Gets a "paginated":#paginated-result set of historical messages for this channel h4. Parameters -- optionsquery"Param":#param[] options := an optional object containing the query parametersoptional keyword arguments containing the query parametersan optional set of key value pairs containing the query parametersan optional Associative Array containing the query parameters, as specified in the "message history API documentation":/api/rest-sdk/history#channel-history. +- optionsquery"Param":#param[] options := an optional object containing the query parametersoptional keyword arguments containing the query parametersan optional set of key value pairs containing the query parametersan optional Associative Array containing the query parameters, as specified in the "message history API documentation":/docs/api/rest-sdk/history#channel-history. -
callback
:= is a function of the form: @function(err, resultPage)@ -
callback
:= called with a "ARTPaginatedResult":#paginated-result<"ARTMessage":#message> object or an error @@ -240,7 +240,7 @@ blang[java,ruby,php,python]. 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. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[csharp]. h4. Returns @@ -249,7 +249,7 @@ blang[csharp]. 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 "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[go]. h4. Returns diff --git a/content/api/rest-sdk/encryption.textile b/content/api/rest-sdk/encryption.textile index eae9797831..00b7a5cb56 100644 --- a/content/api/rest-sdk/encryption.textile +++ b/content/api/rest-sdk/encryption.textile @@ -23,9 +23,9 @@ jump_to: - Channel Options - CipherParams#cipher-params redirect_from: - - /api/versions/v1.1/rest-sdk/encryption - - /api/versions/v1.0/rest-sdk/encryption - - /api/versions/v0.8/rest-sdk/encryption + - /docs/api/versions/v1.1/rest-sdk/encryption + - /docs/api/versions/v1.0/rest-sdk/encryption + - /docs/api/versions/v0.8/rest-sdk/encryption --- inline-toc. @@ -76,7 +76,7 @@ h4. Parameters h4. Returns -On success, the method returns a complete "@CipherParams@":#cipher-params object. Failure will raise an "@AblyException@":/api/rest-sdk/types#ably-exception exception. +On success, the method returns a complete "@CipherParams@":#cipher-params object. Failure will raise an "@AblyException@":/docs/api/rest-sdk/types#ably-exception exception. h4. Example @@ -139,7 +139,7 @@ h6(#generate-random-key). csharp,go: GenerateRandomKey bq(definition). - default: Crypto.generateRandomKey(Int keyLength?, callback("ErrorInfo":/api/rest-sdk/types#error-info err, @Buffer@ key)) + default: Crypto.generateRandomKey(Int keyLength?, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, @Buffer@ key)) ruby: byte array Crypto.generate_random_key(Int key_length?) python: byte array Crypto.generate_random_key(Int key_length?) php: string Crypto.generateRandomKey(Int keyLength?) @@ -165,7 +165,7 @@ blang[jsall]. blang[java,ruby,objc,swift,php,python,csharp,go]. h4. Returns - On success, the method returns the generated key as a @byte[]@ array@bytes@byte arraybinary string@NSData@@[]byte@ array. Failure will raise an "@AblyException@":/api/rest-sdk/types#ably-exceptionFailure will cause error to contain an "@ErrorInfo@":#error-info object describing the failure reason. + On success, the method returns the generated key as a @byte[]@ array@bytes@byte arraybinary string@NSData@@[]byte@ array. Failure will raise an "@AblyException@":/docs/api/rest-sdk/types#ably-exceptionFailure will cause error to contain an "@ErrorInfo@":#error-info object describing the failure reason. h4. Example diff --git a/content/api/rest-sdk/history.textile b/content/api/rest-sdk/history.textile index 4c4363d534..b1fbb4513d 100644 --- a/content/api/rest-sdk/history.textile +++ b/content/api/rest-sdk/history.textile @@ -22,9 +22,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/rest-sdk/history - - /api/versions/v1.0/rest-sdk/history - - /api/versions/v0.8/rest-sdk/history + - /docs/api/versions/v1.1/rest-sdk/history + - /docs/api/versions/v1.0/rest-sdk/history + - /docs/api/versions/v0.8/rest-sdk/history --- inline-toc. @@ -56,7 +56,7 @@ h6(#channel-history). csharp,go: History bq(definition). - default: history(Object option, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) + default: history(Object option, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"Message":#message> resultPage)) ruby: "PaginatedResult":#paginated-result<"Message":#message> history(Hash option) python: "PaginatedResult":#paginated-result<"Message":#message> history(kwargs_options) php: "PaginatedResult":#paginated-result<"Message":#message> history(Array option) @@ -93,7 +93,7 @@ blang[java,ruby,php,python]. 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. - Failure to retrieve the message history will raise an "@AblyException@":/api/rest-sdk/types/#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/rest-sdk/types/#ably-exception blang[go]. h4. Returns @@ -109,7 +109,7 @@ blang[csharp]. 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 "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods. - Failure to retrieve the message history will raise an "@AblyException@":/api/rest-sdk/types/#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/rest-sdk/types/#ably-exception h2. Presence object @@ -122,7 +122,7 @@ h6(#presence-history). csharp,go: History bq(definition). - default: history(Object option, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) + default: history(Object option, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) ruby: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history(Hash option) python: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history(kwargs_options) php: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history(Array option) @@ -159,7 +159,7 @@ blang[java,ruby,php,python]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@":#paginated-result and "@first@":#paginated-result methods. - Failure to retrieve the presence event history will raise an "@AblyException@":/api/rest-sdk/types/#ably-exception + Failure to retrieve the presence event history will raise an "@AblyException@":/docs/api/rest-sdk/types/#ably-exception blang[go]. h4. Returns @@ -175,7 +175,7 @@ blang[csharp]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@NextAsync@":#paginated-result and "@FirstAsync@":#paginated-result methods. - Failure to retrieve the presence event history will raise an "@AblyException@":/api/rest-sdk/types/#ably-exception + Failure to retrieve the presence event history will raise an "@AblyException@":/docs/api/rest-sdk/types/#ably-exception h2(#related-types). Related types diff --git a/content/api/rest-sdk/messages.textile b/content/api/rest-sdk/messages.textile index 1051c080a2..c12bead9c6 100644 --- a/content/api/rest-sdk/messages.textile +++ b/content/api/rest-sdk/messages.textile @@ -26,9 +26,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/rest-sdk/messages - - /api/versions/v1.0/rest-sdk/messages - - /api/versions/v0.8/rest-sdk/messages + - /docs/api/versions/v1.1/rest-sdk/messages + - /docs/api/versions/v1.0/rest-sdk/messages + - /docs/api/versions/v0.8/rest-sdk/messages --- inline-toc. @@ -74,7 +74,7 @@ h6(#extras). default: extras csharp: Extras -Metadata and/or ancillary payloads, if provided. The only currently valid payloads for extras are the "@push@":/push/publish#sub-channels, "@ref@":/channels/messages#interactions and "@privileged@":/general/webhooks#skipping objects.
__Type: @JSONObject@, @JSONArray@plain C# object that can be converted to JSON@JSON Object@@Hash@, @Array@@Dict@, @List@@Dictionary@, @Array@@NSDictionary *@, @NSArray *@@Associative Array@, @Array@__ +Metadata and/or ancillary payloads, if provided. The only currently valid payloads for extras are the "@push@":/push/publish#sub-channels, "@ref@":/channels/messages#interactions and "@privileged@":/docs/general/webhooks#skipping objects.
__Type: @JSONObject@, @JSONArray@plain C# object that can be converted to JSON@JSON Object@@Hash@, @Array@@Dict@, @List@@Dictionary@, @Array@@NSDictionary *@, @NSArray *@@Associative Array@, @Array@__ h6(#id). default: id @@ -126,16 +126,16 @@ h6(#message-from-encoded). bq(definition). default: Message.fromEncoded(Object encodedMsg, ChannelOptions channelOptions?) -> Message -A static factory method to create a "@Message@":/api/rest-sdk/types#message from a deserialized @Message@-like object encoded using Ably's wire protocol. +A static factory method to create a "@Message@":/docs/api/rest-sdk/types#message from a deserialized @Message@-like object encoded using Ably's wire protocol. h4. Parameters - encodedMsg := a @Message@-like deserialized object.
__Type: @Object@__ -- channelOptions := an optional "@ChannelOptions@":/api/rest-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ +- channelOptions := an optional "@ChannelOptions@":/docs/api/rest-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ h4. Returns -A "@Message@":/api/rest-sdk/types#message object +A "@Message@":/docs/api/rest-sdk/types#message object h6(#message-from-encoded-array). default: Message.fromEncodedArray @@ -143,13 +143,13 @@ h6(#message-from-encoded-array). bq(definition). default: Message.fromEncodedArray(Object[] encodedMsgs, ChannelOptions channelOptions?) -> Message[] -A static factory method to create an array of "@Messages@":/api/rest-sdk/types#message from an array of deserialized @Message@-like object encoded using Ably's wire protocol. +A static factory method to create an array of "@Messages@":/docs/api/rest-sdk/types#message from an array of deserialized @Message@-like object encoded using Ably's wire protocol. h4. Parameters - encodedMsgs := an array of @Message@-like deserialized objects.
__Type: @Array@__ -- channelOptions := an optional "@ChannelOptions@":/api/rest-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ +- channelOptions := an optional "@ChannelOptions@":/docs/api/rest-sdk/types#channel-options. If you have an encrypted channel, use this to allow the library can decrypt the data.
__Type: @Object@__ h4. Returns -An @Array@ of "@Message@":/api/rest-sdk/types#message objects +An @Array@ of "@Message@":/docs/api/rest-sdk/types#message objects diff --git a/content/api/rest-sdk/presence.textile b/content/api/rest-sdk/presence.textile index 734ed069fe..733e801475 100644 --- a/content/api/rest-sdk/presence.textile +++ b/content/api/rest-sdk/presence.textile @@ -22,9 +22,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/rest-sdk/presence - - /api/versions/v1.0/rest-sdk/presence - - /api/versions/v0.8/rest-sdk/presence + - /docs/api/versions/v1.1/rest-sdk/presence + - /docs/api/versions/v1.0/rest-sdk/presence + - /docs/api/versions/v0.8/rest-sdk/presence --- inline-toc. @@ -49,10 +49,10 @@ h6(#get). default: get csharp,go: Get -Get the current presence member set for this channel. In the REST client library this method directly queries "Ably's REST presence API":/api/rest-api#presence +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":/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) + default: get(Object options, callback("ErrorInfo":/docs/api/realtime-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) ruby: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> get(Hash options) python: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> get(kwargs_options) php: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> get(Array options) @@ -73,8 +73,8 @@ blang[jsall,ruby,python,php,java,swift,objc,go]. h4. @options@ parameters@ARTPresenceQuery@ propertiesArguments -- clientIdclient_id:client_id := when provided, will filter array of members returned that match the provided "@clientId@":/api/rest-sdk#client-options"@client_id@":/api/rest-sdk#client-options"@ClientId@":/api/rest-sdk#client-options string -- connectionIdconnection_id:connection_id := when provided, will filter array of members returned that match the provided @connectionId@@ConnectionId@@connection_id@":/api/realtime-sdk/connection#id string +- clientIdclient_id:client_id := when provided, will filter array of members returned that match the provided "@clientId@":/docs/api/rest-sdk#client-options"@client_id@":/docs/api/rest-sdk#client-options"@ClientId@":/docs/api/rest-sdk#client-options string +- connectionIdconnection_id:connection_id := when provided, will filter array of members returned that match the provided @connectionId@@ConnectionId@@connection_id@":/docs/api/realtime-sdk/connection#id string blang[jsall]. h4. Callback result @@ -90,7 +90,7 @@ blang[java,ruby,php,python,csharp]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of members currently present on the channel. "@PaginatedResult@":#paginated-result supports pagination using "@next@@NextAsync@":#paginated-result and "@first@@FirstAsync@":#paginated-result methods. - Failure to retrieve the current presence member set will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the current presence member set will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[java,ruby,php,python,csharp]. h4. Returns @@ -104,7 +104,7 @@ blang[java,ruby,php,python,csharp]. h6(#history). History bq(definition). - default: history(Object options, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) + default: history(Object options, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> resultPage)) ruby: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history(Hash options) python: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history(kwargs_options) php: "PaginatedResult":#paginated-result<"PresenceMessage":#presence-message> history(Array options) @@ -136,7 +136,7 @@ blang[java,ruby,php,python,csharp]. On success, the returned "@PaginatedResult@":#paginated-result encapsulates an array of "@PresenceMessage@":#presence-message objects corresponding to the current page of results. "@PaginatedResult@":#paginated-result supports pagination using "@next@@NextAsync@":#paginated-result and "@first@@FirstAsync@":#paginated-result methods. - Failure to retrieve the message history will raise an "@AblyException@":/api/realtime-sdk/types#ably-exception + Failure to retrieve the message history will raise an "@AblyException@":/docs/api/realtime-sdk/types#ably-exception blang[go]. h4. Returns diff --git a/content/api/rest-sdk/push-admin.textile b/content/api/rest-sdk/push-admin.textile index f14ea209a4..397050b433 100644 --- a/content/api/rest-sdk/push-admin.textile +++ b/content/api/rest-sdk/push-admin.textile @@ -22,8 +22,8 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/rest-sdk/push - - /api/versions/v1.1/rest-sdk/push-admin + - /docs/api/rest-sdk/push + - /docs/api/versions/v1.1/rest-sdk/push-admin --- inline-toc. diff --git a/content/api/rest-sdk/statistics.textile b/content/api/rest-sdk/statistics.textile index ac9dcf13e1..8082367bcb 100644 --- a/content/api/rest-sdk/statistics.textile +++ b/content/api/rest-sdk/statistics.textile @@ -21,9 +21,9 @@ jump_to: Types: - Related Types#related-types redirect_from: - - /api/versions/v1.1/rest-sdk/statistics - - /api/versions/v1.0/rest-sdk/statistics - - /api/versions/v0.8/rest-sdk/statistics + - /docs/api/versions/v1.1/rest-sdk/statistics + - /docs/api/versions/v1.0/rest-sdk/statistics + - /docs/api/versions/v0.8/rest-sdk/statistics --- blang[javascript,nodejs]. @@ -37,16 +37,16 @@ h6(#stats). csharp,go: Stats bq(definition). - jsall: stats(Object options, callback("ErrorInfo":/api/rest-sdk/types#error-info err, "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":/api/rest-sdk/types#stats> results)) - ruby: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":/api/rest-sdk/types#stats> stats(Hash options) - python: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":/api/rest-sdk/types#stats> stats(kwargs_options) - php: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":/api/rest-sdk/types#stats> stats(Array options) - java: "PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":/api/rest-sdk/types#stats-type> stats("Param":#param[] options) - csharp: Task<"PaginatedResult":/api/rest-sdk/types#paginated-result<"Stats":/api/rest-sdk/types#stats-type>> StatsAsync(@StatsRequestParams@ query) - swift,objc: stats(query: ARTStatsQuery?, callback: ("ARTPaginatedResult":#/realtime/types#paginated-result<"ARTStats":/api/realtime-sdk/types#stats>?, ARTErrorInfo?) -> Void) throws + jsall: stats(Object options, callback("ErrorInfo":/docs/api/rest-sdk/types#error-info err, "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":/docs/api/rest-sdk/types#stats> results)) + ruby: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":/docs/api/rest-sdk/types#stats> stats(Hash options) + python: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":/docs/api/rest-sdk/types#stats> stats(kwargs_options) + php: "PaginatedResult":/docs/api/rest-sdk/types#paginated-result<"Stats":/docs/api/rest-sdk/types#stats> stats(Array options) + 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 go: (c *RestClient) Stats(params *PaginateParams) (*PaginatedResult, error) -This call queries the "Ably REST @/stats@ API endpoint":/api/rest-api#stats-type and retrieves your application's usage statistics. A "PaginatedResult":/api/rest-sdk/types#paginated-result is returned, containing an array of "Stats":/api/rest-sdk/types#stats-type for the first page of results. "PaginatedResult":/api/rest-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. +This call queries the "Ably REST @/stats@ API endpoint":/docs/api/rest-api#stats-type and retrieves your application's usage statistics. A "PaginatedResult":/docs/api/rest-sdk/types#paginated-result is returned, containing an array of "Stats":/docs/api/rest-sdk/types#stats-type for the first page of results. "PaginatedResult":/docs/api/rest-sdk/types#paginated-result objects are iterable providing a means to page through historical statistics. "See an example set of raw stats returned via the REST API":/metadata-stats/stats#metrics. <%= partial partial_version('rest/_stats') %> diff --git a/content/api/rest-sdk/types.textile b/content/api/rest-sdk/types.textile index 064bd44938..751e824529 100644 --- a/content/api/rest-sdk/types.textile +++ b/content/api/rest-sdk/types.textile @@ -17,10 +17,10 @@ languages: - go - flutter redirect_from: - - /api/versions/v1.1/rest-sdk/types - - /api/versions/v1.0/rest-sdk/types - - /api/versions/v0.8/rest-sdk/types - - /rest/types + - /docs/api/versions/v1.1/rest-sdk/types + - /docs/api/versions/v1.0/rest-sdk/types + - /docs/api/versions/v0.8/rest-sdk/types + - /docs/rest/types --- blang[javascript,nodejs]. diff --git a/content/api/sse.textile b/content/api/sse.textile index 023d671e61..e192aa18f9 100644 --- a/content/api/sse.textile +++ b/content/api/sse.textile @@ -9,7 +9,7 @@ jump_to: - Server-sent events#sse - Plain event stream#event-stream redirect_from: - - /api/versions/v1.1/sse + - /docs/api/versions/v1.1/sse --- inline-toc. @@ -34,7 +34,7 @@ h5. Request parameters - accessToken := **optional** An Ably auth token to use, if using token auth. - lastEvent := **optional**. An @id@ to resume from. Only required when starting a new SSE connection which resumes from a previous connection. - rewind := **optional**. An integer which, if specified, will send a backlog of the number of messages specified once the connection opens. For example, @rewind=1@ will give you the most recent message sent on the channel. This is best-effort — only messages from within the last two minutes will be available, and only if the channel has been continuously active since the message was sent; it is not a replacement for the "history API":/storage-history/history It only has an effect for new connections; when resuming a previous connection using @lastEvent@, it is ignored in favour of sending you the messages you missed since you were last connected. -- enveloped := **optional**. Default is @true@. If @true@, the @data@ from each event envelope for a @message@ event will be a "Message":/api/realtime-sdk/types#message object. If @false@, it will be the payload from the message directly. See "Envelope format":#envelope-format below. +- enveloped := **optional**. Default is @true@. If @true@, the @data@ from each event envelope for a @message@ event will be a "Message":/docs/api/realtime-sdk/types#message object. If @false@, it will be the payload from the message directly. See "Envelope format":#envelope-format below. - heartbeats := **optional**. Default is @false@. if @true@ will use an explicit heartbeat event rather than a newline as a keepalive packet. h5(#envelope-format). Envelope format @@ -118,7 +118,7 @@ h5. Request parameters - accessToken := **optional** An Ably auth token to use, if using token auth. - lastEvent := **optional**. An @id@ to resume from. Only required when starting a new HTTP connection which resumes from a previous connection. - rewind := **optional**. An integer which, if specified, will send a backlog of the number of messages specified once the connection opens. For example, @rewind=1@ will give you the most recent message sent on the channel. This is best-effort — only messages from within the last two minutes will be available, and only if the channel has been continuously active since the message was sent; it is not a replacement for the "history API":/storage-history/history It only has an effect for new connections; when resuming a previous connection using @lastEvent@, it is ignored in favour of sending you the messages you missed since you were last connected. -- enveloped := **optional**. Default is @true@. If @true@, the @data@ from each event envelope for a @message@ event will be a "Message":/api/realtime-sdk/types#message object. If @false@, it will be the payload from the message directly. See "Envelope format":#envelope-format below. +- enveloped := **optional**. Default is @true@. If @true@, the @data@ from each event envelope for a @message@ event will be a "Message":/docs/api/realtime-sdk/types#message object. If @false@, it will be the payload from the message directly. See "Envelope format":#envelope-format below. - heartbeats := **optional**. Default is @false@. If @true@ will use an explicit heartbeat event rather than a newline as a keepalive packet. h5(#envelope-format). Envelope format @@ -134,9 +134,9 @@ bc[json]. { If @enveloped@ is true (the default), the @data@ will be a JSON-stringified object of a type determined by the event: -- For a @message@ event it will be a "Message":/api/realtime-sdk/types#message object -- For a @presence@ event it will be a "PresenceMessage":/api/realtime-sdk/types#presence-message object -- For an @error@ event it will be an "ErrorInfo":/api/realtime-sdk/types#error-info object +- For a @message@ event it will be a "Message":/docs/api/realtime-sdk/types#message object +- For a @presence@ event it will be a "PresenceMessage":/docs/api/realtime-sdk/types#presence-message object +- For an @error@ event it will be an "ErrorInfo":/docs/api/realtime-sdk/types#error-info object For a payload that is anything other than a string, as there is no client library to decode the payload of a @Message@ or @PresenceMessage@, you will have to decode it yourself. Objects and arrays will be json-encoded; binary payloads will be base64-encoded. The @encoding@ field of the @Message@ will specify what encoding has been used for the @data@ payload. diff --git a/content/api/token-request-spec.textile b/content/api/token-request-spec.textile index 9d2fa18e56..6196405f9d 100644 --- a/content/api/token-request-spec.textile +++ b/content/api/token-request-spec.textile @@ -8,16 +8,16 @@ jump_to: - Overview#title - Examples redirect_from: - - /api/versions/v1.1/token-request-spec - - /api/versions/v1.0/token-request-spec - - /rest-api/token-request-spec - - /rest-api/versions/v1.1/token-request-spec - - /rest-api/versions/v1.0/token-request-spec + - /docs/api/versions/v1.1/token-request-spec + - /docs/api/versions/v1.0/token-request-spec + - /docs/rest-api/token-request-spec + - /docs/rest-api/versions/v1.1/token-request-spec + - /docs/rest-api/versions/v1.0/token-request-spec --- -The "Ably REST and Realtime client libraries":https://ably.com/download/ aim to make things as simple as possible so it is not necessary to understand all of the details of how to interact with the service and issue tokens for clients. If you wish to issue Ably-compatible tokens or "Ably TokenRequests":/api/realtime-sdk/types#token-request, we recommend you start with the "client library authentication documentation":/auth. +The "Ably REST and Realtime client libraries":https://ably.com/download/ aim to make things as simple as possible so it is not necessary to understand all of the details of how to interact with the service and issue tokens for clients. If you wish to issue Ably-compatible tokens or "Ably TokenRequests":/docs/api/realtime-sdk/types#token-request, we recommend you start with the "client library authentication documentation":/auth. -However, if you are using the "REST API token endpoint directly":/api/rest-api/#request-token, or if you are creating Ably @TokenRequests@ without the use of our client libraries, then the following specification will give you an in-depth understanding of how getting Ably Tokens works. +However, if you are using the "REST API token endpoint directly":/docs/api/docs/rest-api/#request-token, or if you are creating Ably @TokenRequests@ without the use of our client libraries, then the following specification will give you an in-depth understanding of how getting Ably Tokens works. h3(#api-key-format). API key format @@ -29,7 +29,7 @@ API keys are issued and managed from "within your account dashboard":https://faq h3(#tokenrequest-format). Ably TokenRequest format -A request for an Ably Token is made against the "@requestToken@":/api/rest-api#request-token endpoint, with a JSON Ably @TokenRequest@ in the request body. The Ably @TokenRequest@ comprises: +A request for an Ably Token is made against the "@requestToken@":/docs/api/rest-api#request-token endpoint, with a JSON Ably @TokenRequest@ in the request body. The Ably @TokenRequest@ comprises: * the @keyName@ comprising of the app ID and key ID such as @{{API_KEY_NAME}}@ * a capability (i.e. a set of channel names/namespaces and, for each, a set of "operations":#capability-operations) which should be a subset of the set of capability associated with the key specified in @keyName@ diff --git a/content/asset-tracking/index.textile b/content/asset-tracking/index.textile index c87d0d2899..dec7519eca 100644 --- a/content/asset-tracking/index.textile +++ b/content/asset-tracking/index.textile @@ -15,7 +15,7 @@ The Ably Asset Tracking solution provides two "SDKs":/asset-tracking/using-the-s * **Publishing SDK** (Android, iOS) - for embedding in apps on the asset to be tracked. * **Subscribing SDK** (Android, iOS, JavaScript) - for embedding in apps that want to observe the asset being tracked using a realtime subscription. -As Ably is used as the underlying transport, you have direct access to your data and can use "Ably Integrations":/general/integrations for a wide range of applications, in addition to direct realtime subscriptions. Examples include: +As Ably is used as the underlying transport, you have direct access to your data and can use "Ably Integrations":/docs/general/integrations for a wide range of applications, in addition to direct realtime subscriptions. Examples include: * Passing data to another service for realtime processing or tracking. * Persistence of data to a database for later retrieval. diff --git a/content/asset-tracking/using-the-sdks.textile b/content/asset-tracking/using-the-sdks.textile index 0d7677240b..c1656e6619 100644 --- a/content/asset-tracking/using-the-sdks.textile +++ b/content/asset-tracking/using-the-sdks.textile @@ -369,7 +369,7 @@ blang[kotlin,swift]. The following code example demonstrates initializing and starting the subscriber: blang[javascript]. - Initialize the @Subscriber@ with a "@ClientOptions@":/api/rest-sdk#client-options object. You can also optionally configure event handlers for "location updates":#subscriber-subscribe and "asset state changes":#subscriber-subscribe-asset-state-changes during subscriber initialization. + Initialize the @Subscriber@ with a "@ClientOptions@":/docs/api/rest-sdk#client-options object. You can also optionally configure event handlers for "location updates":#subscriber-subscribe and "asset state changes":#subscriber-subscribe-asset-state-changes during subscriber initialization. The following code example demonstrates initializing and starting the subscriber: diff --git a/content/auth/capabilities.textile b/content/auth/capabilities.textile index 9172809d7b..4616da8c5e 100644 --- a/content/auth/capabilities.textile +++ b/content/auth/capabilities.textile @@ -47,7 +47,7 @@ The following capability operations are available for API keys and issued tokens - push-subscribe := can subscribe devices for push notifications - push-admin := can manage device registrations and push subscriptions for all devices in an app - channel-metadata := can get metadata for a channel, and enumerate channels -- privileged-headers := can set data in the privileged section of the "message extras":/api/realtime-sdk/messages#extras +- privileged-headers := can set data in the privileged section of the "message extras":/docs/api/realtime-sdk/messages#extras Although most capabilities need to be enabled for the resource you're using them with, there are exceptions. The @stats@ permission only does something when attached to the wildcard resource @'*'@, or a resource that contains that as a subset, such as @'[*]*'@, since stats are app-wide. @@ -60,9 +60,9 @@ The @channel-metadata@ permission works both ways. When associated with a specif h2(#capabilities-key). API key capabilities -An "Ably API key":/auth#api-key can have a single set of permissions, applied to any number of "channels":/channels or "queues":/general/queues. +An "Ably API key":/auth#api-key can have a single set of permissions, applied to any number of "channels":/channels or "queues":/docs/general/queues. -You can also choose whether to restrict the API key to only channels, only "queues":/general/queues, or to match a set of channel or queue names. If you've chosen to restrict the API key to *selected channels and queues*, you can use a comma separated list of resources the API key can access, making use of wildcards to provide access to areas of your app. It is worth noting an API key will provide the same permissions to all resources it has access to. +You can also choose whether to restrict the API key to only channels, only "queues":/docs/general/queues, or to match a set of channel or queue names. If you've chosen to restrict the API key to *selected channels and queues*, you can use a comma separated list of resources the API key can access, making use of wildcards to provide access to areas of your app. It is worth noting an API key will provide the same permissions to all resources it has access to. To view the capabilities for an existing API key: diff --git a/content/auth/index.textile b/content/auth/index.textile index 61c4a99379..0e3b01cd1e 100644 --- a/content/auth/index.textile +++ b/content/auth/index.textile @@ -2,21 +2,21 @@ title: Authentication meta_description: "Ably supports two main authentication schemes: basic authentication and token authentication. Token authentication can be implemented using JWTs, Ably tokens, and Ably token requests." redirect_from: - - /rest/authentication - - /rest/versions/v1.1/authentication - - /rest/versions/v1.0/authentication - - /rest/versions/v0.8/authentication - - /realtime/authentication - - /realtime/versions/v1.1/authentication - - /realtime/versions/v1.0/authentication - - /realtime/versions/v0.8/authentication - - /core-features/authentication - - /core-features/versions/v1.1/authentication - - /core-features/versions/v1.0/authentication - - /core-features/versions/v0.8/authentication - - /core-features/authentication.ably-jwt - - /general/authentication - - /general/_authentication_capabilities + - /docs/rest/authentication + - /docs/rest/versions/v1.1/authentication + - /docs/rest/versions/v1.0/authentication + - /docs/rest/versions/v0.8/authentication + - /docs/realtime/authentication + - /docs/realtime/versions/v1.1/authentication + - /docs/realtime/versions/v1.0/authentication + - /docs/realtime/versions/v0.8/authentication + - /docs/core-features/authentication + - /docs/core-features/versions/v1.1/authentication + - /docs/core-features/versions/v1.0/authentication + - /docs/core-features/versions/v0.8/authentication + - /docs/core-features/authentication.ably-jwt + - /docs/general/authentication + - /docs/general/_authentication_capabilities --- Before a client or server can issue requests to Ably, such as subscribe to channels, or publish messages, it must authenticate with Ably. Authentication requires an Ably API key. diff --git a/content/auth/revocation.textile b/content/auth/revocation.textile index 527bac88c6..c5d2ea597e 100644 --- a/content/auth/revocation.textile +++ b/content/auth/revocation.textile @@ -37,7 +37,7 @@ Initial connections to Ably and REST requests can incur a small latency cost whe h2(#revoke). Revoke a token -The Ably REST API contains the following endpoint for "revoking tokens":/api/rest-api#revoke-tokens : +The Ably REST API contains the following endpoint for "revoking tokens":/docs/api/rest-api#revoke-tokens : ``` POST /keys/{{API_KEY_NAME}}/revokeTokens diff --git a/content/auth/token.textile b/content/auth/token.textile index 5a0873e08b..669356b0b1 100644 --- a/content/auth/token.textile +++ b/content/auth/token.textile @@ -21,9 +21,9 @@ Token authentication is the recommended authentication method to use client-side Any of the following cause an SDK to use token authentication: -* An "@authUrl@@AuthUrl@":/api/realtime-sdk/types#client-options or "@authCallback@@AuthCallback@":/api/realtime-sdk/types#client-options is provided that returns an Ably-compatible token or an Ably "@TokenRequest@":/api/realtime-sdk/types#token-request -* "@useTokenAuth@@UseTokenAuth@":/api/realtime-sdk/types#client-options is true -* A "@token@@Token@":/api/realtime-sdk/types#client-options or "@tokenDetails@@TokenDetails@":/api/realtime-sdk/types#client-options property is provided +* An "@authUrl@@AuthUrl@":/docs/api/realtime-sdk/types#client-options or "@authCallback@@AuthCallback@":/docs/api/realtime-sdk/types#client-options is provided that returns an Ably-compatible token or an Ably "@TokenRequest@":/docs/api/realtime-sdk/types#token-request +* "@useTokenAuth@@UseTokenAuth@":/docs/api/realtime-sdk/types#client-options is true +* A "@token@@Token@":/docs/api/realtime-sdk/types#client-options or "@tokenDetails@@TokenDetails@":/docs/api/realtime-sdk/types#client-options property is provided Providing a literal @token@@Token@ or @tokenDetails@@TokenDetails@ is typically used for testing: since tokens are short-lived, in production you typically want to use an authentication method that allows the client library to renew the token automatically before the current token expires. @@ -325,11 +325,11 @@ ably.ClientOptions clientOptions = ably.ClientOptions( ably.Rest rest = ably.Rest(options: clientOptions); ``` -The "@tokenParams@":/api/realtime-sdk/authentication#token-params argument in @authCallback@ is available for convenience, allowing you to see the capabilities, @clientId@, and other details requested by the client. However, @tokenParams@ should not be trusted or used to generate the @tokenRequest@ on the server side. Instead it is recommended that your @createTokenRequest@ API authenticates clients separately, for example based on cookies, headers, or HTTP body. +The "@tokenParams@":/docs/api/realtime-sdk/authentication#token-params argument in @authCallback@ is available for convenience, allowing you to see the capabilities, @clientId@, and other details requested by the client. However, @tokenParams@ should not be trusted or used to generate the @tokenRequest@ on the server side. Instead it is recommended that your @createTokenRequest@ API authenticates clients separately, for example based on cookies, headers, or HTTP body. h2(#auth-options). AuthOptions -Use properties set with "@AuthOptions@":/api/realtime-sdk/authentication#auth-options to override the default authentication values set when instantiating a client. You can also embed @AuthOptions@ into your "@ClientOptions@":/api/realtime-sdk#client-options while instantiating. +Use properties set with "@AuthOptions@":/docs/api/realtime-sdk/authentication#auth-options to override the default authentication values set when instantiating a client. You can also embed @AuthOptions@ into your "@ClientOptions@":/docs/api/realtime-sdk#client-options while instantiating. There are several @AuthOptions@ you can specify along with @authUrl@ and @authCallback@: @@ -496,11 +496,11 @@ Ably Tokens can be used to authenticate with Ably in the following ways: * Ably "TokenRequest":#token-request is created by your servers and passed to clients. * An "Ably Token":#ably-token is issued by your servers and passed to clients. -Note that the machine on which you are running your auth server should have an accurate clock, as tokens and @TokenRequest@ contain a timestamp. You can use an "NTP daemon":https://en.wikipedia.org/wiki/Ntpd, or if you are not able to control your server's clock, you can wish to use the @queryTime@ "auth option":/api/rest-sdk/types#auth-options. +Note that the machine on which you are running your auth server should have an accurate clock, as tokens and @TokenRequest@ contain a timestamp. You can use an "NTP daemon":https://en.wikipedia.org/wiki/Ntpd, or if you are not able to control your server's clock, you can wish to use the @queryTime@ "auth option":/docs/api/rest-sdk/types#auth-options. h3(#token-request). Ably TokenRequest -Using an Ably SDK, a @TokenRequest@ is "generated from your server":/api/realtime-sdk/authentication#create-token-request and returned to the client-side SDK instance. The client-side SDK instance then uses the "@TokenRequest@":/api/realtime-sdk/types#token-request to request an "Ably Token":/api/realtime-sdk/authentication#request-token from Ably, and subsequently authenticates using that "Ably Token":/api/realtime-sdk/authentication#token-details. +Using an Ably SDK, a @TokenRequest@ is "generated from your server":/docs/api/realtime-sdk/authentication#create-token-request and returned to the client-side SDK instance. The client-side SDK instance then uses the "@TokenRequest@":/docs/api/realtime-sdk/types#token-request to request an "Ably Token":/docs/api/realtime-sdk/authentication#request-token from Ably, and subsequently authenticates using that "Ably Token":/docs/api/realtime-sdk/authentication#token-details. This is the recommended approach for client-side authentication, for the following reasons: @@ -579,7 +579,7 @@ Clients can pass this server-side generated @TokenRequest@ to Ably to authentica h3(#ably-token). Ably Token -Using an Ably SDK, an Ably Token is "requested by your servers":/api/realtime-sdk/authentication#request-token from Ably and then passed to the client-side SDK instance. The client-side SDK instance then uses that "Ably Token":/api/realtime-sdk/authentication#tokens to authenticate with Ably. This is an alternative approach for authentication that enables you to issue"Ably Tokens directly as opposed to providing Ably @TokenRequests@ from your servers. +Using an Ably SDK, an Ably Token is "requested by your servers":/docs/api/realtime-sdk/authentication#request-token from Ably and then passed to the client-side SDK instance. The client-side SDK instance then uses that "Ably Token":/docs/api/realtime-sdk/authentication#tokens to authenticate with Ably. This is an alternative approach for authentication that enables you to issue"Ably Tokens directly as opposed to providing Ably @TokenRequests@ from your servers. The advantage for clients is that it saves one round trip request as they do not need to request an Ably Token themselves. The disadvantage is that your servers must communicate with Ably each time an Ably Token is required. @@ -657,11 +657,11 @@ JSON Web Tokens (JWT) can be used to authenticate with Ably in the following way * "Ably JWT":#standard is created by your servers and passed to clients. * "Ably Token":#embedded is embedded in a JWT from your server and passed to clients. -Note that the machine on which you are running your auth server should have an accurate clock, as tokens contain a timestamp. You can use an "NTP daemon":https://en.wikipedia.org/wiki/Ntpd, or if you are not able to control your server's clock, you can wish to use the @queryTime@ "auth option":/api/rest-sdk/types#auth-options. +Note that the machine on which you are running your auth server should have an accurate clock, as tokens contain a timestamp. You can use an "NTP daemon":https://en.wikipedia.org/wiki/Ntpd, or if you are not able to control your server's clock, you can wish to use the @queryTime@ "auth option":/docs/api/rest-sdk/types#auth-options. h3(#standard). JWT using your API key -It is possible to use a "JWT":https://jwt.io as a form of token for authentication with Ably, so long as it is structured appropriately, in what will be referred to as an "Ably JWT":/api/realtime-sdk/authentication#ably-jwt. It is possible for an Ably JWT to contain claims indicating its @clientId@, capabilities and expiry - in an analogous way to an "Ably Token":#tokens - and it is signed with the applicable "Ably API key's secret part":/auth#api-key. +It is possible to use a "JWT":https://jwt.io as a form of token for authentication with Ably, so long as it is structured appropriately, in what will be referred to as an "Ably JWT":/docs/api/realtime-sdk/authentication#ably-jwt. It is possible for an Ably JWT to contain claims indicating its @clientId@, capabilities and expiry - in an analogous way to an "Ably Token":#tokens - and it is signed with the applicable "Ably API key's secret part":/auth#api-key. This is similar to signing an Ably "@TokenRequest@":#token-request, but the client does not need to request an Ably Token, instead being able to use the Ably JWT as a token in itself. Any compliant third-party JWT library may be used to create the JWT without requiring the token to be issued by Ably. This can be useful for situations where an Ably client library is not available, such as an embedded device connecting to Ably via "MQTT":/protocols/mqtt. diff --git a/content/basics/ably.textile b/content/basics/ably.textile index f8db965e49..c0fc4daec2 100644 --- a/content/basics/ably.textile +++ b/content/basics/ably.textile @@ -43,7 +43,7 @@ Messages received by Ably are "stored":/storage-history/storage in memory for 2 Messages can be stored for up to 72 hours on disk by Ably through additional configuration. The "history":/storage-history/history feature can be used to retrieve previously sent messages as a paginated list. History can retrieve messages from as far back as the message persistence configured for a channel. This is a minimum of 2 minutes, up to 72 hours. -For long term storage, you can use an Ably "integration":/general/webhooks to send all, or a subset of messages to your own database or data warehouse. +For long term storage, you can use an Ably "integration":/docs/general/webhooks to send all, or a subset of messages to your own database or data warehouse. h3(#presence). Presence diff --git a/content/basics/use-ably.textile b/content/basics/use-ably.textile index 97fe8cae6b..75251029f1 100644 --- a/content/basics/use-ably.textile +++ b/content/basics/use-ably.textile @@ -2,14 +2,14 @@ title: How to use Ably meta_description: "Determine how best to integrate Ably into your application with an overview of Ably's SDKs, APIs and protocol adapters." redirect_from: - - /rest - - /rest/versions/v1.1 - - /rest/versions/v1.0 - - /rest/versions/v0.8 - - /realtime - - /realtime/versions/v1.1 - - /realtime/versions/v1.0 - - /realtime/versions/v0.8 + - /docs/rest + - /docs/rest/versions/v1.1 + - /docs/rest/versions/v1.0 + - /docs/rest/versions/v0.8 + - /docs/realtime + - /docs/realtime/versions/v1.1 + - /docs/realtime/versions/v1.0 + - /docs/realtime/versions/v0.8 --- There are several different ways to use Ably in an application. These include using an Ably SDK, choosing a protocol adapter for libraries such as MQTT or SSE, or utilizing an integration to communicate between Ably and external systems. Each method provides slightly different benefits and feature sets. This page discusses the options available. @@ -38,7 +38,7 @@ The realtime interface is implemented using an Ably-defined protocol, primarily h2(#rest-api). REST HTTP API -Interacting with the "REST HTTP API":/api/rest-api directly is fully supported. However, Ably recommends using the REST interface of an SDK where possible, as they provide additional features that improve performance and resilience that the REST HTTP API can't deliver on its own. This includes automatic re-routing around network problems by using alternative data centers. +Interacting with the "REST HTTP API":/docs/api/rest-api directly is fully supported. However, Ably recommends using the REST interface of an SDK where possible, as they provide additional features that improve performance and resilience that the REST HTTP API can't deliver on its own. This includes automatic re-routing around network problems by using alternative data centers. h2(#protocol-adapters). Protocol adapters @@ -82,12 +82,12 @@ Asset tracking is powered by the Ably realtime network, Ably Asset Tracking SDKs h2(#integrations). Integrations -"Integrations":/general/integrations enable data to be sent between Ably channels and external services. "Inbound integrations":#inbound are where data is sent from an external service into Ably. "Outbound integrations":#outbound are where data is sent from Ably to an external service. +"Integrations":/docs/general/integrations enable data to be sent between Ably channels and external services. "Inbound integrations":#inbound are where data is sent from an external service into Ably. "Outbound integrations":#outbound are where data is sent from Ably to an external service. h3(#inbound). Inbound integrations -Inbound integrations enable you to publish data from an external web service to an Ably channel. Examples include "IFTTT":/general/events/ifttt and "Zapier":/general/events/zapier. +Inbound integrations enable you to publish data from an external web service to an Ably channel. Examples include "IFTTT":/docs/general/events/ifttt and "Zapier":/docs/general/events/zapier. h3(#outbound). Outbound integrations -Outbound integrations enable you to send data from Ably channels to an external streaming or queuing service. Examples include "Amazon Kinesis":/general/firehose/kinesis-rule or "Amazon SQS":/general/firehose/sqs-rule. +Outbound integrations enable you to send data from Ably channels to an external streaming or queuing service. Examples include "Amazon Kinesis":/docs/general/firehose/kinesis-rule or "Amazon SQS":/docs/general/firehose/sqs-rule. diff --git a/content/channels/index.textile b/content/channels/index.textile index 3009150125..a73eee6d32 100644 --- a/content/channels/index.textile +++ b/content/channels/index.textile @@ -14,28 +14,28 @@ languages: - swift - go redirect_from: - - /rest/channels - - /rest/versions/v1.1/channels - - /rest/versions/v1.0/channels - - /rest/versions/v0.8/channels - - /rest/channels-messages - - /rest/versions/v0.8/channels-messages - - /rest/beta - - /rest/batch - - /realtime/channels - - /realtime/versions/v1.1/channels - - /realtime/versions/v1.0/channels - - /realtime/versions/v0.8/channels - - /realtime/channels-messages - - /realtime/versions/v0.8/channels-messages - - /core-features/channels - - /core-features/versions/v1.1/channels - - /core-features/pubsub - - /core-features/versions/v1.1/pubsub - - /general/channel-rules-namespaces - - /general/versions/v1.1/channel-rules-namespaces - - /general/versions/v1.0/channel-rules-namespaces - - /general/versions/v0.8/channel-rules-namespaces + - /docs/rest/channels + - /docs/rest/versions/v1.1/channels + - /docs/rest/versions/v1.0/channels + - /docs/rest/versions/v0.8/channels + - /docs/rest/channels-messages + - /docs/rest/versions/v0.8/channels-messages + - /docs/rest/beta + - /docs/rest/batch + - /docs/realtime/channels + - /docs/realtime/versions/v1.1/channels + - /docs/realtime/versions/v1.0/channels + - /docs/realtime/versions/v0.8/channels + - /docs/realtime/channels-messages + - /docs/realtime/versions/v0.8/channels-messages + - /docs/core-features/channels + - /docs/core-features/versions/v1.1/channels + - /docs/core-features/pubsub + - /docs/core-features/versions/v1.1/pubsub + - /docs/general/channel-rules-namespaces + - /docs/general/versions/v1.1/channel-rules-namespaces + - /docs/general/versions/v1.0/channel-rules-namespaces + - /docs/general/versions/v0.8/channel-rules-namespaces --- Channels are used to separate messages into different topics. They are the building block of creating a realtime application using the publish-subscribe pattern. Channels are also the unit of security and scalability. Clients should only ever be provided the "capabilities":/auth/capabilities for channels that they should have access to. diff --git a/content/channels/messages.textile b/content/channels/messages.textile new file mode 100644 index 0000000000..220f989a17 --- /dev/null +++ b/content/channels/messages.textile @@ -0,0 +1,237 @@ +--- +title: Messages +meta_description: "Messages contain data and are sent and received through channels." +languages: + - csharp + - flutter + - java + - javascript + - nodejs + - objc + - php + - python + - ruby + - swift +redirect_from: + - /docs/rest/messages + - /docs/rest/versions/v1.1/messages + - /docs/rest/versions/v1.0/messages + - /docs/rest/versions/v0.8/messages + - /docs/realtime/messages + - /docs/realtime/versions/v1.1/messages + - /docs/realtime/versions/v1.0/messages + - /docs/realtime/versions/v0.8/messages +--- + +Messages contain the data that a client is communicating, such as the contents of a chat message. Clients publish messages on "channels":/channels, and these messages are received by clients that have "subscribed":/channels#subscribe to them. This pattern is otherwise known as pub/sub, as publishers and subscribers are completely decoupled. + + + +h2(#properties). Message properties + +The following are the properties of a message: + +- name := The name of the message. +- data := The contents of the message. Also known as the message payload. +- id := Each message sent through Ably is assigned a unique ID. Update this ID if you are using idempotent publishing. +- clientId := The "ID of the client":/auth/identified-clients that published the message. +- connectionId := The ID of the connection used to publish the message. +- timestamp := The timestamp of when the message was received by Ably, as milliseconds since the Unix epoch. +- extras := A JSON object of arbitrary key-value pairs that may contain metadata, and/or ancillary payloads. Valid payloads include those related to "Push Notifications":/push, "deltas":/channels/options/deltas and "message interactions":#interactions, and headers. +- encoding := This is typically empty, as all messages received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute contains the remaining transformations not applied to the data payload. + +h2(#interactions). Message interactions + +Message interactions enable you to interact with previously sent messages and support a wide variety of use cases. You can decide and customize what data is included in an interaction, and how this is displayed to end-users. + +Message interactions can help you to implement: + +* Emoji reactions +* Message updates and deletion +* Read receipts and unread message counts +* Quoting and replying to messages +* Message threads +* Media previews + +Once a channel has message interactions enabled, messages received on that channel will contain a unique @timeSerial@ that can be referenced by later messages. + +Message interactions add a @ref@ object to message payloads that enables you to indicate what an interaction represents, and which message it is referring to. The @ref@ object contains two fields: + +- @type@ (String) := a constant representing the reason for the interaction. +- @timeSerial@ (String) := a unique identifier used to reference a specific message, automatically generated when messages are sent in message interaction enabled channels. + + + +blang[default]. + Message interactions are only supported by the Ably JavaScript SDK. + +blang[javascript,nodejs]. + Message interactions are only supported by the Ably JavaScript SDK. + + + To enable message interactions for a channel: + + 1. Login to your "Ably dashboard":https://ably.com/login. + 2. Select the app you are working with. + 3. Click *Settings* on the right side of the navigation bar. + 4. Scroll down to *Channel rules* and click *Add new rule*. + 5. Give your new rule a Namespace or provide a specific Channel ID. + 6. Select the *Message interactions enabled* checkbox then click *Create channel rule*. + + + Message interactions in dashboard + + + You now have a namespace based rule you can apply to channels to enable message interactions or a specific channel with message interactions enabled. + + h3(#use-interactions). Use message interactions + + Once message interactions have been enabled for a channel you can start to reference the @timeSerial@ of previous messages to publish interactions. All messages sent on channels that have interactions enabled will automatically include a @timeSerial@. + + To reference a previous message, include the @ref@ object inside the @extras@ object with: + + * A @type@ constant string defining the reason for interaction. Note that Ably has reserved strings beginning with @com.ably.@. + * The @timeserial@ string of the message to interact with. + + The following is an example of sending an emoji reaction: + + ```[javascript] + async function sendReaction(emoji) { + await channel.publish({ + name: 'event_name', + data: emoji, + extras: { + ref: { + type: "com.ably.reaction", + timeserial: "1656424960320-1" + } + } + }) + } + ``` + + ```[nodejs] + async function sendReaction(emoji) { + await channel.publish({ + name: 'event_name', + data: emoji, + extras: { + ref: { + type: "com.ably.reaction", + timeserial: "1656424960320-1" + } + } + }) + } + ``` + + h3(#listener-interactions). Create a listener + + Regular listeners will get all messages (including those containing a reference), but it is possible to filter specifically for messages with or without a reference by supplying a filter object. A @filter object@ can contain any number of the following fields: + + - @refTimeserial@ (String) := filter containing a specific message timeserial (for example: @v1b25XrTDg:0@). + - @refType@ (String) := filter for a specific reference type (for example: @com.ably.reaction@). + - @isRef@ (Boolean) := filter for messages that only do or do not reference another message. + + h3(#subscribe-interactions). Subscribe to interactions + + Subscribing to interactions involves sending a filter object defining which interactions you're interested in. + + To subscribe to all reaction interactions: + + ```[realtime_javascript] + await channel.subscribe({ + refType: "com.ably.reaction" + }, onReaction); + ``` + + ```[realtime_nodejs] + await channel.subscribe({ + refType: "com.ably.reaction" + }, onReaction); + ``` + + To subscribe to any interaction: + + ```[realtime_javascript] + await channel.subscribe({ + isRef: true + }, onReference); + ``` + + ```[realtime_nodejs] + await channel.subscribe({ + isRef: true + }, onReference); + ``` + + To subscribe to any non-interaction: + + ```[realtime_javascript] + await channel.subscribe({ + isRef: false + }, onRegularMessage); + ``` + + ```[realtime_nodejs] + await channel.subscribe({ + isRef: false + }, onRegularMessage); + ``` + + To subscribe to interactions to a specific message: + + ```[realtime_javascript] + await channel.subscribe({ + refTimeserial: 'v1b25XrTDg:0' + }, onReference); + ``` + + ```[realtime_nodejs] + await channel.subscribe({ + refTimeserial: 'v1b25XrTDg:0' + }, onReference); + ``` + + To subscribe to a combination of filters: + + ```[realtime_javascript] + await channel.subscribe({ + refTimeserial: 'v1b25XrTDg:0', + refType: 'com.ably.reaction', + }, onReference); + ``` + + ```[realtime_nodejs] + await channel.subscribe({ + refTimeserial: 'v1b25XrTDg:0', + refType: 'com.ably.reaction', + }, onReference); + ``` + + h3(#unsubscribe-interactions). Unsubscribe from interactions + + Unsubscribing works similar to subscribing, you can unsubscribe by: + + * Passing the filter object to "@unsubscribe()@":/docs/api/realtime-sdk/channels#unsubscribe and, or + * Passing the filter function to "@unsubscribe()@":/docs/api/realtime-sdk/channels#unsubscribe + + For example, to unsubscribe to reaction interactions: + + ```[realtime_javascript] + channel.unsubscribe({ + refType: 'com.ably.reaction' + }); + ``` + + ```[realtime_nodejs] + channel.unsubscribe({ + refType: 'com.ably.reaction' + }); + ``` + + Passing a filter object will unsubscribe every listener attached to that particular filter unless you also pass the filter function. Unsubscribing with a filter requires *exactly* the same filter object to be passed in. diff --git a/content/channels/options/deltas.textile b/content/channels/options/deltas.textile index c2dcee93bd..14cbefbb2a 100644 --- a/content/channels/options/deltas.textile +++ b/content/channels/options/deltas.textile @@ -11,7 +11,7 @@ languages: - ruby - swift redirect_from: - - /realtime/channels/channel-parameters/deltas + - /docs/realtime/channels/channel-parameters/deltas --- The @delta@ channel option enables delta compression. It is applied on the channel you are subscribing to, enabling delta mode. @@ -24,15 +24,15 @@ As @delta@ only applies to channel subscriptions, it is only available when usin Using delta mode can significantly reduce the encoded size of each message when the difference between successive message payload sizes are small, relative to the overall size. The reduction can reduce bandwidth costs and transit latencies, and enable greater message throughput on a connection. - - Deltas explanation + + Deltas explanation h2(#processing). Delta processing Deltas apply to the @data@ property of a "@Message@":/channels/messages payload published via Ably. Other properties, such as @clientId@, @name@, and @extras@ remain unchanged and are not compressed when using deltas. -Messages retrieved via "history":/storage-history/history, and messages delivered to "integrations":/general/integrations are not compressed. +Messages retrieved via "history":/storage-history/history, and messages delivered to "integrations":/docs/general/integrations are not compressed. The @delta@ channel option implementation supports a single representation of a delta, "VCDIFF":https://tools.ietf.org/html/rfc3284. diff --git a/content/channels/options/encryption.textile b/content/channels/options/encryption.textile index f1fb188489..2d567a6110 100644 --- a/content/channels/options/encryption.textile +++ b/content/channels/options/encryption.textile @@ -14,14 +14,14 @@ languages: - ruby - swift redirect_from: - - /rest/encryption - - /rest/versions/v1.1/encryption - - /rest/versions/v1.0/encryption - - /rest/versions/v0.8/encryption - - /realtime/encryption - - /realtime/versions/v1.1/encryption - - /realtime/versions/v1.0/encryption - - /realtime/versions/v0.8/encryption + - /docs/rest/encryption + - /docs/rest/versions/v1.1/encryption + - /docs/rest/versions/v1.0/encryption + - /docs/rest/versions/v0.8/encryption + - /docs/realtime/encryption + - /docs/realtime/versions/v1.1/encryption + - /docs/realtime/versions/v1.0/encryption + - /docs/realtime/versions/v0.8/encryption --- "Transport Layer Security (TLS)":https://en.wikipedia.org/wiki/Transport_Layer_Security is enabled by default in Ably SDKs so that data is securely sent to, and received from, Ably. However, messages are not encrypted within the Ably system. Use the encryption channel option to ensure that message payloads are opaque, that they can't be decrypted by Ably, and can only be decrypted by other clients that share your secret key. @@ -32,7 +32,7 @@ h2(#with-ably). Encryption with Ably Ably SDKs support encryption purely as a convenience. The SDKs ensure interoperability between environments by having compatible implementations of encryption algorithms and by making common choices on things such as format, mode and padding. However, Ably intentionally does not manage the distribution of keys between clients, and end-to-end encryption is enabled without exposing keys to the Ably service at all. This has the advantage that Ably has no access to the un-encrypted contents of your messages, but also means that each app is responsible for enabling the distribution of keys to clients independently of Ably. -Encryption with Ably supports symmetric encryption only and requires each participating client to each specify the correct "@CipherParams@":/api/realtime-sdk/encryption#cipher-params secret @key@ when creating a @channel@ instance. Clients that do not specify a key will receive the still-encrypted message payloads, that they can subsequently decrypt offline if necessary. +Encryption with Ably supports symmetric encryption only and requires each participating client to each specify the correct "@CipherParams@":/docs/api/realtime-sdk/encryption#cipher-params secret @key@ when creating a @channel@ instance. Clients that do not specify a key will receive the still-encrypted message payloads, that they can subsequently decrypt offline if necessary. Only the AES algorithm, with a default key length of 256 bits, and CBC mode are supported. These defaults are intended to ensure that encryption support can be provided in all target environments and platforms. @@ -44,9 +44,9 @@ The key that's in use at any given time is known by the SDK. The Ably service on h2(#encrypt). Encrypt a channel -Set the @cipher@ property to enable message encryption by passing a "@CipherParams@":/api/realtime-sdk/encryption#cipher-params object that contains at least a secret @key@. +Set the @cipher@ property to enable message encryption by passing a "@CipherParams@":/docs/api/realtime-sdk/encryption#cipher-params object that contains at least a secret @key@. -A @key@ should be a cryptographic key generated from a secure random source, 128 or 256 bits long and binary or base-64 encoded. Ably SDKs are also capable of "generating a random key":/api/realtime-sdk/encryption#generate-random-key. If you wish to encrypt messages with a pass-phrase, for example one entered by a user then use a "key derivation function":https://en.wikipedia.org/wiki/Key_derivation_function to transform that into a key. +A @key@ should be a cryptographic key generated from a secure random source, 128 or 256 bits long and binary or base-64 encoded. Ably SDKs are also capable of "generating a random key":/docs/api/realtime-sdk/encryption#generate-random-key. If you wish to encrypt messages with a pass-phrase, for example one entered by a user then use a "key derivation function":https://en.wikipedia.org/wiki/Key_derivation_function to transform that into a key. The following is an example of setting encryption when obtaining a channel instance: diff --git a/content/channels/options/index.textile b/content/channels/options/index.textile index e575c40fbc..ddf4f6eb53 100644 --- a/content/channels/options/index.textile +++ b/content/channels/options/index.textile @@ -14,9 +14,9 @@ languages: - ruby - swift redirect_from: - - /realtime/channels/channel-parameters/overview - - /realtime/channel-params - - /realtime/versions/v1.1/channel-params + - /docs/realtime/channels/channel-parameters/overview + - /docs/realtime/channel-params + - /docs/realtime/versions/v1.1/channel-params --- Channel options can be used to customize the functionality of channels. This includes enabling features such as "encryption":/channels/options/encryption and "deltas":/channels/options/deltas, or for a client to retrieve messages published prior to it attaching to a channel using "rewind":/channels/options/rewind. @@ -31,12 +31,12 @@ h2(#set). Set channel options Channel options can be set in two different ways: -* When a channel instance is first obtained using "@channels.get()@":/api/realtime-sdk/channels#get. +* When a channel instance is first obtained using "@channels.get()@":/docs/api/realtime-sdk/channels#get. * Using @channel.setOptions()@ at any point after the channel instance has been obtained. h3(#get). channels.get -Pass a @channelOptions@ object into the call to "@get()@":/api/realtime-sdk/channels#get in order to set the desired channel options when obtaining a channel instance. +Pass a @channelOptions@ object into the call to "@get()@":/docs/api/realtime-sdk/channels#get in order to set the desired channel options when obtaining a channel instance. The following is an example of setting the @cipher@ property to set "encryption":/channels/options/encryption when obtaining a channel instance: diff --git a/content/channels/options/rewind.textile b/content/channels/options/rewind.textile index 3087e52b3a..34e3e7263f 100644 --- a/content/channels/options/rewind.textile +++ b/content/channels/options/rewind.textile @@ -13,7 +13,7 @@ languages: - swift - go redirect_from: - - /realtime/channels/channel-parameters/rewind + - /docs/realtime/channels/channel-parameters/rewind --- The @rewind@ channel option enables a client to specify where to start an attachment from, when attaching to a channel. Rewind can provide context to clients attaching to a channel by passing them previously published messages, such as in the example of a joining a chat room. @@ -28,7 +28,7 @@ h2(#subscribe). Subscribe with rewind The @rewind@ property of @params@ can be set at a point in time in the past, or for a given number of messages. -@rewind@ can also be set by qualifying a channel name during a call to "@get()@":/api/realtime-sdk/channels#get. For example, if you want to subscribe to channel @my_channel@ and fetch the most recent message, you would specify the channel as @[?rewind=1]my_channel@. If the channel also contains metadata, you would apply rewind with @[some_metadata?rewind=1]my_channel@. +@rewind@ can also be set by qualifying a channel name during a call to "@get()@":/docs/api/realtime-sdk/channels#get. For example, if you want to subscribe to channel @my_channel@ and fetch the most recent message, you would specify the channel as @[?rewind=1]my_channel@. If the channel also contains metadata, you would apply rewind with @[some_metadata?rewind=1]my_channel@.