From dd4a66be773f10e2cd3cef858fe9ee38f1bcc416 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Tue, 8 Jul 2014 11:58:37 +0200 Subject: [PATCH] Some missing renames of ICap to Cap refs #1424 --- contrib/videoob_web/videoob_web/videoob_web.py | 6 +++--- docs/source/guides/capability.rst | 4 ++-- docs/source/overview.rst | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/videoob_web/videoob_web/videoob_web.py b/contrib/videoob_web/videoob_web/videoob_web.py index bd2c1bb4..6510a4b1 100644 --- a/contrib/videoob_web/videoob_web/videoob_web.py +++ b/contrib/videoob_web/videoob_web/videoob_web.py @@ -28,7 +28,7 @@ from webob.dec import wsgify from webob import exc from wsgiref.simple_server import make_server -from weboob.capabilities.video import ICapVideo +from weboob.capabilities.video import CapVideo from weboob.tools.application.base import BaseApplication @@ -44,7 +44,7 @@ class VideoobWeb(BaseApplication): VERSION = '0.j' COPYRIGHT = 'Copyright(C) 2010-2011 Christophe Benz' DESCRIPTION = 'WSGI web server application allowing to search for videos on various websites.' - CAPS = ICapVideo + CAPS = CapVideo CONFIG = dict(host='localhost', port=8080) @wsgify @@ -78,7 +78,7 @@ class VideoobWeb(BaseApplication): def main(self, argv): self.load_config() - self.weboob.load_backends(ICapVideo) + self.weboob.load_backends(CapVideo) print 'Web server created. Listening on http://%s:%s' % ( self.config.get('host'), int(self.config.get('port'))) srv = make_server(self.config.get('host'), int(self.config.get('port')), self.make_app) diff --git a/docs/source/guides/capability.rst b/docs/source/guides/capability.rst index b3a27247..3aa29b2c 100644 --- a/docs/source/guides/capability.rst +++ b/docs/source/guides/capability.rst @@ -12,9 +12,9 @@ Prefer returning objects ^^^^^^^^^^^^^^^^^^^^^^^^ Python is an object-oriented language, so when your capability supports entities (for example -:class:`weboob.capabilities.video.BaseVideo` with the :class:`weboob.capabilities.video.ICapVideo` capability), +:class:`weboob.capabilities.video.BaseVideo` with the :class:`weboob.capabilities.video.CapVideo` capability), you have to create a class derived from :class:`weboob.capabilities.base.BaseObject`, and create an unique method -to get it (for example :func:`get_video() `), instead of several methods like +to get it (for example :func:`get_video() `), instead of several methods like ``get_video_url()``, ``get_video_preview()``, etc. An object has an unique ID. diff --git a/docs/source/overview.rst b/docs/source/overview.rst index fc247248..98256512 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -23,7 +23,7 @@ Capabilities The core library defines capabilities. They represent features common to various websites. For example, http://www.youtube.com and http://www.dailymotion.com are both videos -providers: Weboob defines the ``ICapVideo`` capability. +providers: Weboob defines the ``CapVideo`` capability. Each backend interfaces a website and implements one or many of these capabilities. Backends can be configured, which means that the end-user can