summaryrefslogtreecommitdiffstats
path: root/docs/write_hooks.rst
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-08 01:08:03 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-14 11:03:20 +0200
commit91115fd577f20704ef7f2e74c4527ffbb0730a09 (patch)
tree198fc68f1eb6f42e220d0f1c68499f48ae70543c /docs/write_hooks.rst
parentProject __init__ with info (diff)
downloadpyload-91115fd577f20704ef7f2e74c4527ffbb0730a09.tar.xz
Restructure pyload file tree (1)
Diffstat (limited to 'docs/write_hooks.rst')
-rw-r--r--docs/write_hooks.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/write_hooks.rst b/docs/write_hooks.rst
index 5508f5a0c..ebf2ed368 100644
--- a/docs/write_hooks.rst
+++ b/docs/write_hooks.rst
@@ -6,7 +6,7 @@ Hooks
A Hook is a python file which is located at :file:`pyload/plugins/hooks`.
The :class:`HookManager <pyload.HookManager.HookManager>` will load it automatically on startup. Only one instance exists
over the complete lifetime of pyload. Your hook can interact on various events called by the :class:`HookManager <pyload.HookManager.HookManager>`,
-do something complete autonomic and has full access to the :class:`Api <pyload.Api.Api>` and every detail of pyLoad.
+do something complete autonomic and has full access to the :class:`Api <pyload.api.Api>` and every detail of pyLoad.
The UpdateManager, CaptchaTrader, UnRar and many more are realised as hooks.
Hook header
@@ -102,7 +102,7 @@ available as event and not accessible through overwriting hook methods. However
Providing RPC services
----------------------
-You may noticed that pyLoad has an :class:`Api <pyload.Api.Api>`, which can be used internal or called by clients via RPC.
+You may noticed that pyLoad has an :class:`Api <pyload.api.Api>`, which can be used internal or called by clients via RPC.
So probably clients want to be able to interact with your hook to request it's state or invoke some action.
Sounds complicated but is very easy to do. Just use the ``Expose`` decorator: ::
@@ -118,7 +118,7 @@ Sounds complicated but is very easy to do. Just use the ``Expose`` decorator: ::
def invoke(self, arg):
print "Invoked with", arg
-Thats all, it's available via the :class:`Api <pyload.Api.Api>` now. If you want to use it read :ref:`access_api`.
+Thats all, it's available via the :class:`Api <pyload.api.Api>` now. If you want to use it read :ref:`access_api`.
Here is a basic example: ::
#Assuming client is a ThriftClient or Api object
@@ -128,7 +128,7 @@ Here is a basic example: ::
Providing status information
----------------------------
-Your hook can store information in a ``dict`` that can easily be retrievied via the :class:`Api <pyload.Api.Api>`.
+Your hook can store information in a ``dict`` that can easily be retrievied via the :class:`Api <pyload.api.Api>`.
Just store everything in ``self.info``. ::