Skip to content

Commit

Permalink
Add JS API descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dacharyc committed Jul 30, 2024
1 parent 2508109 commit a08ab84
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. note::

If you require the most recent version of custom user data, use the
:js-sdk:`User.refreshCustomData() <classes/User.html#refreshCustomData>`
method to request the latest version of a user's custom data.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
You retrieve custom user data in the :js-sdk:`customData <classes/User.html#customData>`
property of the ``User`` object.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This example uses :ref:`MongoDB remote access <sdks-access-mongodb>` to update
a user's custom data. The following example updates the custom data to alter
the user's ``favoriteColor`` to pink.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

.. literalinclude:: /examples/MissingPlaceholders/example.js
:language: javascript
:copyable: false

- id: kotlin
content: |
Expand All @@ -60,5 +61,6 @@
- id: typescript
content: |

.. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.write-asymmetric-object.ts
.. literalinclude:: /examples/MissingPlaceholders/example.ts
:language: typescript
:copyable: false
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- id: javascript
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.js
.. literalinclude:: /examples/generated/node/custom-user-data.snippet.read-custom-user-data.js
:language: javascript

- id: kotlin
Expand All @@ -60,5 +60,6 @@
- id: typescript
content: |

.. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.write-asymmetric-object.ts
.. literalinclude:: /examples/MissingPlaceholders/example.ts
:language: typescript
:copyable: false
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- id: javascript
content: |

.. literalinclude:: /examples/MissingPlaceholders/example.js
.. literalinclude:: /examples/generated/node/custom-user-data.snippet.write-custom-user-data.js
:language: javascript

- id: kotlin
Expand All @@ -60,5 +60,6 @@
- id: typescript
content: |

.. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.write-asymmetric-object.ts
.. literalinclude:: /examples/MissingPlaceholders/example.ts
:language: typescript
:copyable: false
16 changes: 8 additions & 8 deletions source/sdk/users/custom-user-data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ ways:
.. tab::
:tabid: javascript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst


.. tab::
:tabid: kotlin
Expand All @@ -129,7 +129,7 @@ ways:
.. tab::
:tabid: typescript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst


.. include:: /includes/sdk-examples/users/custom-user-data-create-custom-user-data.rst

Expand Down Expand Up @@ -178,7 +178,7 @@ data, see the Update Custom User Data section on this page.
.. tab::
:tabid: javascript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst
.. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst

.. tab::
:tabid: kotlin
Expand All @@ -198,7 +198,7 @@ data, see the Update Custom User Data section on this page.
.. tab::
:tabid: typescript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst
.. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst

.. include:: /includes/sdk-examples/users/custom-user-data-read-custom-user-data.rst

Expand Down Expand Up @@ -244,7 +244,7 @@ data, see the Update Custom User Data section on this page.
.. tab::
:tabid: javascript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst
.. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst

.. tab::
:tabid: kotlin
Expand All @@ -264,7 +264,7 @@ data, see the Update Custom User Data section on this page.
.. tab::
:tabid: typescript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst
.. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst

.. _sdks-update-custom-user-data:

Expand Down Expand Up @@ -311,7 +311,7 @@ You can update custom user data in a few ways:
.. tab::
:tabid: javascript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst
.. include:: /includes/api-details/javascript/users/custom-user-data-update-custom-user-data-description.rst

.. tab::
:tabid: kotlin
Expand All @@ -331,7 +331,7 @@ You can update custom user data in a few ways:
.. tab::
:tabid: typescript

.. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst


.. include:: /includes/sdk-examples/users/custom-user-data-update-custom-user-data.rst

Expand Down

0 comments on commit a08ab84

Please sign in to comment.