Skip to content

Commit

Permalink
sort subgroups in functions and events
Browse files Browse the repository at this point in the history
  • Loading branch information
jobisoft committed Dec 1, 2023
1 parent 8ef1a22 commit 7044c0f
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 181 deletions.
334 changes: 167 additions & 167 deletions messages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,29 +83,6 @@ Permissions
Functions
=========

.. _messages.abortList:

abortList(messageListId)
------------------------

.. api-section-annotation-hack:: -- [Added in TB 120]

Finalizes the specified list and terminates any process currently still adding messages.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageListId``
:type: (string)


.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. _messages.archive:

archive(messageIds)
Expand All @@ -132,39 +109,6 @@ Archives messages using the current settings. Archiving external messages will t
- :permission:`messagesRead`
- :permission:`messagesMove`

.. _messages.continueList:

continueList(messageListId)
---------------------------

.. api-section-annotation-hack::

Returns the next chunk of messages in a list. See :doc:`how-to/messageLists` for more information.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageListId``
:type: (string)


.. api-header::
:label: Return type (`Promise`_)


.. api-member::
:type: :ref:`messages.MessageList`


.. _Promise: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. _messages.copy:

copy(messageIds, destination)
Expand Down Expand Up @@ -270,49 +214,6 @@ Returns the specified message.

- :permission:`messagesRead`

.. _messages.getAttachmentFile:

getAttachmentFile(messageId, partName)
--------------------------------------

.. api-section-annotation-hack:: -- [Added in TB 88]

Gets the content of a :ref:`messages.MessageAttachment` as a `File <https://developer.mozilla.org/docs/Web/API/File>`__ object.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageId``
:type: (integer)


.. api-member::
:name: ``partName``
:type: (string)


.. api-header::
:label: Return type (`Promise`_)


.. api-member::
:type: `File <https://developer.mozilla.org/en-US/docs/Web/API/File>`__


.. _Promise: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

.. api-header::
:label: Required permissions

- :permission:`messagesRead`

The most simple way to get the content of an attachment is to use the `text() <https://developer.mozilla.org/en-US/docs/Web/API/Blob/text>`__ method of the returned `File <https://developer.mozilla.org/en-US/docs/Web/API/File>`__ object:

.. literalinclude:: includes/messages/file.js
:language: JavaScript

.. _messages.getFull:

getFull(messageId)
Expand Down Expand Up @@ -487,39 +388,6 @@ Gets all messages in a folder.
- :permission:`messagesRead`
- :permission:`accountsRead`

.. _messages.listAttachments:

listAttachments(messageId)
--------------------------

.. api-section-annotation-hack:: -- [Added in TB 88]

Lists the attachments of a message.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageId``
:type: (integer)


.. api-header::
:label: Return type (`Promise`_)


.. api-member::
:type: array of :ref:`messages.MessageAttachment`


.. _Promise: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. _messages.move:

move(messageIds, destination)
Expand Down Expand Up @@ -554,41 +422,6 @@ Moves messages to a specified folder. If the messages cannot be removed from the
- :permission:`accountsRead`
- :permission:`messagesMove`

.. _messages.openAttachment:

openAttachment(messageId, partName, tabId)
------------------------------------------

.. api-section-annotation-hack::

Opens the specified attachment

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageId``
:type: (integer)


.. api-member::
:name: ``partName``
:type: (string)


.. api-member::
:name: ``tabId``
:type: (integer)

The ID of the tab associated with the message opening.


.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. _messages.query:

query([queryInfo])
Expand Down Expand Up @@ -830,6 +663,173 @@ Updates message properties and tags. Updating external messages will throw an *E
- :permission:`messagesRead`
- :permission:`messagesUpdate`

.. _messages.getAttachmentFile:

getAttachmentFile(messageId, partName)
--------------------------------------

.. api-section-annotation-hack:: -- [Added in TB 88]

Gets the content of a :ref:`messages.MessageAttachment` as a `File <https://developer.mozilla.org/docs/Web/API/File>`__ object.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageId``
:type: (integer)


.. api-member::
:name: ``partName``
:type: (string)


.. api-header::
:label: Return type (`Promise`_)


.. api-member::
:type: `File <https://developer.mozilla.org/en-US/docs/Web/API/File>`__


.. _Promise: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

.. api-header::
:label: Required permissions

- :permission:`messagesRead`

The most simple way to get the content of an attachment is to use the `text() <https://developer.mozilla.org/en-US/docs/Web/API/Blob/text>`__ method of the returned `File <https://developer.mozilla.org/en-US/docs/Web/API/File>`__ object:

.. literalinclude:: includes/messages/file.js
:language: JavaScript

.. _messages.listAttachments:

listAttachments(messageId)
--------------------------

.. api-section-annotation-hack:: -- [Added in TB 88]

Lists the attachments of a message.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageId``
:type: (integer)


.. api-header::
:label: Return type (`Promise`_)


.. api-member::
:type: array of :ref:`messages.MessageAttachment`


.. _Promise: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. _messages.openAttachment:

openAttachment(messageId, partName, tabId)
------------------------------------------

.. api-section-annotation-hack:: -- [Added in TB 114]

Opens the specified attachment

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageId``
:type: (integer)


.. api-member::
:name: ``partName``
:type: (string)


.. api-member::
:name: ``tabId``
:type: (integer)

The ID of the tab associated with the message opening.


.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. _messages.abortList:

abortList(messageListId)
------------------------

.. api-section-annotation-hack:: -- [Added in TB 120]

Finalizes the specified list and terminates any process currently still adding messages.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageListId``
:type: (string)


.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. _messages.continueList:

continueList(messageListId)
---------------------------

.. api-section-annotation-hack::

Returns the next chunk of messages in a list. See :doc:`how-to/messageLists` for more information.

.. api-header::
:label: Parameters


.. api-member::
:name: ``messageListId``
:type: (string)


.. api-header::
:label: Return type (`Promise`_)


.. api-member::
:type: :ref:`messages.MessageList`


.. _Promise: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

.. api-header::
:label: Required permissions

- :permission:`messagesRead`

.. rst-class:: api-main-section

Events
Expand Down

0 comments on commit 7044c0f

Please sign in to comment.