forked from platypush/platypush
Fixed docs
This commit is contained in:
parent
f2de1015a8
commit
4c3140c9b5
18 changed files with 80 additions and 95 deletions
|
@ -45,6 +45,7 @@ Backends
|
||||||
platypush/backend/sensor.distance.vl53l1x.rst
|
platypush/backend/sensor.distance.vl53l1x.rst
|
||||||
platypush/backend/sensor.envirophat.rst
|
platypush/backend/sensor.envirophat.rst
|
||||||
platypush/backend/sensor.ir.zeroborg.rst
|
platypush/backend/sensor.ir.zeroborg.rst
|
||||||
|
platypush/backend/sensor.leap.rst
|
||||||
platypush/backend/sensor.ltr559.rst
|
platypush/backend/sensor.ltr559.rst
|
||||||
platypush/backend/sensor.mcp3008.rst
|
platypush/backend/sensor.mcp3008.rst
|
||||||
platypush/backend/sensor.motion.pwm3901.rst
|
platypush/backend/sensor.motion.pwm3901.rst
|
||||||
|
|
|
@ -23,8 +23,8 @@ import sys
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
project = 'platypush'
|
project = 'platypush'
|
||||||
copyright = '2018, BlackLight'
|
copyright = '2017-2019, Fabio Manganiello'
|
||||||
author = 'BlackLight'
|
author = 'Fabio Manganiello'
|
||||||
|
|
||||||
# The short X.Y version
|
# The short X.Y version
|
||||||
version = ''
|
version = ''
|
||||||
|
@ -49,6 +49,7 @@ extensions = [
|
||||||
'sphinx.ext.ifconfig',
|
'sphinx.ext.ifconfig',
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
'sphinx.ext.githubpages',
|
'sphinx.ext.githubpages',
|
||||||
|
'sphinx_rtd_theme',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
@ -84,8 +85,8 @@ pygments_style = 'sphinx'
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
# html_theme = 'alabaster'
|
# html_theme = 'haiku'
|
||||||
html_theme = 'nature'
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
|
||||||
html_domain_indices = True
|
html_domain_indices = True
|
||||||
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
``platypush.backend``
|
|
||||||
=====================
|
|
||||||
|
|
||||||
.. automodule:: platypush.backend
|
|
||||||
:members:
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
``platypush.backend.camera``
|
|
||||||
============================
|
|
||||||
|
|
||||||
.. automodule:: platypush.backend.camera
|
|
||||||
:members:
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
``platypush.backend.http.request.rss``
|
|
||||||
======================================
|
|
||||||
|
|
||||||
.. automodule:: platypush.backend.http.request.rss
|
|
||||||
:members:
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
``platypush.backend.weather.forecast``
|
|
||||||
======================================
|
|
||||||
|
|
||||||
.. automodule:: platypush.backend.weather.forecast
|
|
||||||
:members:
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
``platypush.plugins.weather.forecast``
|
|
||||||
======================================
|
|
||||||
|
|
||||||
.. automodule:: platypush.plugins.weather.forecast
|
|
||||||
:members:
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ class LocalBackend(Backend):
|
||||||
|
|
||||||
You can use this backend either to send local commands to push through
|
You can use this backend either to send local commands to push through
|
||||||
Pusher (or any other script), or debug. You can even send command on the
|
Pusher (or any other script), or debug. You can even send command on the
|
||||||
command line and read the responses in this way:
|
command line and read the responses in this way::
|
||||||
|
|
||||||
# Send the request. Remember: the JSON must be all on one line.
|
# Send the request. Remember: the JSON must be all on one line.
|
||||||
$ cat <<EOF > /tmp/platypush-requests.fifo
|
$ cat <<EOF > /tmp/platypush-requests.fifo
|
||||||
|
|
|
@ -69,8 +69,7 @@ class Event(Message):
|
||||||
def matches_condition(self, condition):
|
def matches_condition(self, condition):
|
||||||
"""
|
"""
|
||||||
If the event matches an event condition, it will return an EventMatchResult
|
If the event matches an event condition, it will return an EventMatchResult
|
||||||
Params:
|
:param condition: The platypush.event.hook.EventCondition object
|
||||||
-- condition -- The platypush.event.hook.EventCondition object
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
result = EventMatchResult(is_match=False, parsed_args=self.args)
|
result = EventMatchResult(is_match=False, parsed_args=self.args)
|
||||||
|
@ -207,12 +206,11 @@ class StopEvent(Event):
|
||||||
|
|
||||||
def __init__(self, target, origin, thread_id, id=None, **kwargs):
|
def __init__(self, target, origin, thread_id, id=None, **kwargs):
|
||||||
""" Constructor.
|
""" Constructor.
|
||||||
Params:
|
:param target: Target node
|
||||||
target -- Target node
|
:param origin: Origin node
|
||||||
origin -- Origin node
|
:param thread_id: thread_iden() to be terminated if listening on the bus
|
||||||
thread_id -- thread_iden() to be terminated if listening on the bus
|
:param id: Event ID (default: auto-generated)
|
||||||
id -- Event ID (default: auto-generated)
|
:param kwargs: Extra key-value arguments
|
||||||
kwargs -- Extra key-value arguments
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
super().__init__(target=target, origin=origin, id=id,
|
super().__init__(target=target, origin=origin, id=id,
|
||||||
|
|
|
@ -139,7 +139,7 @@ class GoogleDrivePlugin(GooglePlugin):
|
||||||
:param path: Path of the file to upload.
|
:param path: Path of the file to upload.
|
||||||
:param mime_type: MIME type of the source file (e.g. "``image/jpeg``").
|
:param mime_type: MIME type of the source file (e.g. "``image/jpeg``").
|
||||||
:param name: Name of the target file. Default: same name as the source file.
|
:param name: Name of the target file. Default: same name as the source file.
|
||||||
:param description; File description.
|
:param description: File description.
|
||||||
:param parents: List of folder IDs that will contain the file (default: drive root).
|
:param parents: List of folder IDs that will contain the file (default: drive root).
|
||||||
:param starred: If True, then the uploaded file will be marked as starred by the user.
|
:param starred: If True, then the uploaded file will be marked as starred by the user.
|
||||||
:param target_mime_type: Target MIME type. Useful if you want to e.g. import a CSV file as a Google Sheet
|
:param target_mime_type: Target MIME type. Useful if you want to e.g. import a CSV file as a Google Sheet
|
||||||
|
|
|
@ -38,7 +38,9 @@ class GpioSensorBme280Plugin(GpioSensorPlugin):
|
||||||
@action
|
@action
|
||||||
def get_measurement(self):
|
def get_measurement(self):
|
||||||
"""
|
"""
|
||||||
:returns: dict. Example::
|
:returns: dict. Example:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
output = {
|
output = {
|
||||||
"temperature": 21.0, # Celsius
|
"temperature": 21.0, # Celsius
|
||||||
|
|
|
@ -45,7 +45,9 @@ class GpioSensorDistanceVl53L1XPlugin(GpioSensorPlugin):
|
||||||
:param medium: Enable medium range measurement (default: False)
|
:param medium: Enable medium range measurement (default: False)
|
||||||
:param long: Enable long range measurement (default: False)
|
:param long: Enable long range measurement (default: False)
|
||||||
|
|
||||||
:returns: dict. Example::
|
:returns: dict. Example:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
output = {
|
output = {
|
||||||
"short": 83, # Short range measurement in mm
|
"short": 83, # Short range measurement in mm
|
||||||
|
|
|
@ -19,7 +19,9 @@ class GpioSensorEnvirophatPlugin(GpioSensorPlugin):
|
||||||
:param: qnh: Local value for atmospheric pressure adjusted to sea level (default: 1020)
|
:param: qnh: Local value for atmospheric pressure adjusted to sea level (default: 1020)
|
||||||
:type qnh: float
|
:type qnh: float
|
||||||
|
|
||||||
:returns: dict. Example::
|
:returns: dict. Example:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
output = {
|
output = {
|
||||||
"temperature": 21.0, # Celsius
|
"temperature": 21.0, # Celsius
|
||||||
|
|
|
@ -19,8 +19,10 @@ class GpioSensorLtr559Plugin(GpioSensorPlugin):
|
||||||
@action
|
@action
|
||||||
def get_measurement(self):
|
def get_measurement(self):
|
||||||
"""
|
"""
|
||||||
:returns: dict. Example::
|
:returns: dict. Example:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
:
|
||||||
output = {
|
output = {
|
||||||
"light": 109.3543, # Lux
|
"light": 109.3543, # Lux
|
||||||
"proximity": 103 # The higher the value, the nearest the object, within a ~5cm range
|
"proximity": 103 # The higher the value, the nearest the object, within a ~5cm range
|
||||||
|
|
|
@ -82,7 +82,9 @@ class GpioSensorMotionPwm3901Plugin(GpioSensorPlugin):
|
||||||
@action
|
@action
|
||||||
def get_measurement(self):
|
def get_measurement(self):
|
||||||
"""
|
"""
|
||||||
:returns: dict. Example::
|
:returns: dict. Example:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
output = {
|
output = {
|
||||||
"motion_x": 3, # Detected motion vector X-coord
|
"motion_x": 3, # Detected motion vector X-coord
|
||||||
|
|
|
@ -384,7 +384,9 @@ class MediaPlugin(Plugin):
|
||||||
the streaming link instead of streaming it
|
the streaming link instead of streaming it
|
||||||
:type download: bool
|
:type download: bool
|
||||||
|
|
||||||
:returns: dict containing the streaming URL.Example::
|
:return: dict containing the streaming URL.Example:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "0123456abcdef.mp4",
|
"id": "0123456abcdef.mp4",
|
||||||
|
@ -392,6 +394,7 @@ class MediaPlugin(Plugin):
|
||||||
"mime_type": "video/mp4",
|
"mime_type": "video/mp4",
|
||||||
"url": "http://192.168.1.2:8008/media/0123456abcdef.mp4"
|
"url": "http://192.168.1.2:8008/media/0123456abcdef.mp4"
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,12 @@ class MediaCtrlPlugin(Plugin):
|
||||||
"""
|
"""
|
||||||
Wrapper plugin to control audio and video media.
|
Wrapper plugin to control audio and video media.
|
||||||
Examples of supported URL types:
|
Examples of supported URL types:
|
||||||
|
|
||||||
- file:///media/movies/Movie.mp4 [requires media plugin enabled]
|
- file:///media/movies/Movie.mp4 [requires media plugin enabled]
|
||||||
- youtube:video:poAk9XgK7Cs [requires media plugin+youtube-dl]
|
- youtube:video:poAk9XgK7Cs [requires media plugin+youtube-dl]
|
||||||
- magnet:?torrent_magnet [requires torrentcast]
|
- magnet:?torrent_magnet [requires torrentcast]
|
||||||
- spotify:track:track_id [leverages plugins.music.mpd]
|
- spotify:track:track_id [leverages plugins.music.mpd]
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_supported_plugins = {
|
_supported_plugins = {
|
||||||
|
|
|
@ -358,9 +358,9 @@ class MobileJoinPlugin(Plugin):
|
||||||
displayed lower in the notification list. Values from -2 (lowest priority) to 2 (highest priority).
|
displayed lower in the notification list. Values from -2 (lowest priority) to 2 (highest priority).
|
||||||
Default is 2.
|
Default is 2.
|
||||||
:param vibration_pattern: If the notification is received on an Android device, the vibration pattern in this
|
:param vibration_pattern: If the notification is received on an Android device, the vibration pattern in this
|
||||||
field will change the way the device vibrates with it. You can easily create a pattern by going
|
field will change the way the device vibrates with it. You can easily create a pattern by going to the
|
||||||
`here <http://autoremotejoaomgcd.appspot.com/AutoRemoteNotification.html>`_ and generating the pattern in
|
`AutoRemote notification page <http://autoremotejoaomgcd.appspot.com/AutoRemoteNotification.html>`_
|
||||||
the Vibration Pattern field
|
and generate the pattern in the Vibration Pattern field
|
||||||
:type vibration_pattern: str (comma-separated float values) or list[float]
|
:type vibration_pattern: str (comma-separated float values) or list[float]
|
||||||
:param dismiss_on_touch: If set the notification will be dismissed when touched (default: False)
|
:param dismiss_on_touch: If set the notification will be dismissed when touched (default: False)
|
||||||
:param image: Publicly available URL for an image to show up in the notification
|
:param image: Publicly available URL for an image to show up in the notification
|
||||||
|
@ -368,7 +368,7 @@ class MobileJoinPlugin(Plugin):
|
||||||
:param sound: Publicly available URL for a sound to play with the notification
|
:param sound: Publicly available URL for a sound to play with the notification
|
||||||
:param actions: Set notification buttons with customized behaviour. This parameter is a list of Join actions
|
:param actions: Set notification buttons with customized behaviour. This parameter is a list of Join actions
|
||||||
configured on the target device that will be mapped to notification input elements.
|
configured on the target device that will be mapped to notification input elements.
|
||||||
More info `here <https://joaoapps.com/join/actions/#notifications>`_
|
More info `on the Joaoapps notifications page <https://joaoapps.com/join/actions/#notifications>`_
|
||||||
"""
|
"""
|
||||||
|
|
||||||
params = {'dismissOnTouch': dismiss_on_touch}
|
params = {'dismissOnTouch': dismiss_on_touch}
|
||||||
|
|
Loading…
Reference in a new issue