Mercurial > libervia-backend
diff doc/components.rst @ 4037:524856bd7b19
massive refactoring to switch from camelCase to snake_case:
historically, Libervia (SàT before) was using camelCase as allowed by PEP8 when using a
pre-PEP8 code, to use the same coding style as in Twisted.
However, snake_case is more readable and it's better to follow PEP8 best practices, so it
has been decided to move on full snake_case. Because Libervia has a huge codebase, this
ended with a ugly mix of camelCase and snake_case.
To fix that, this patch does a big refactoring by renaming every function and method
(including bridge) that are not coming from Twisted or Wokkel, to use fully snake_case.
This is a massive change, and may result in some bugs.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 08 Apr 2023 13:54:42 +0200 |
parents | 425d809a505b |
children | d6837db456fd |
line wrap: on
line diff
--- a/doc/components.rst Fri Apr 07 15:18:39 2023 +0200 +++ b/doc/components.rst Sat Apr 08 13:54:42 2023 +0200 @@ -384,7 +384,7 @@ The encoding is explained in the documentation of the following method: -.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.getJIDAndNode +.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.get_jid_and_node .. [#AP_chars] Most if not all AP implementations use webfinger `acct` URI as a de-facto @@ -859,10 +859,10 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Publication of AP items can be tested using the following method (with can be accessed -through the ``APSend`` bridge method, client is then replaced by the ``profile`` name, as +through the ``ap_send`` bridge method, client is then replaced by the ``profile`` name, as last argument): -.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.publishMessage +.. automethod:: sat.plugins.plugin_comp_ap_gateway.APGateway.publish_message The method can be used either with CLI's :ref:`debug bridge method <li_debug_bridge_method>` or with any D-Bus tool like ``qdbus`` or ``d-feet`` (only if you @@ -875,7 +875,7 @@ ``https://example.net/@pierre/106986412193109832``. To send a reply to this message, Louise can use the following command:: - $ li debug bridge method -c APSend '"{\"node\": \"https://example.net/@pierre/106986412193109832\", \"content\": \"A lille hello from XMPP\"}","pierre\\40example.net@ap.example.org", "louise"' + $ li debug bridge method -c ap_send '"{\"node\": \"https://example.net/@pierre/106986412193109832\", \"content\": \"A lille hello from XMPP\"}","pierre\\40example.net@ap.example.org", "louise"' Note the double escaping, one for the shell argument, and the other to specify JSON object.