Adding a new Backend for the meteofrance website. This is only an Alpha version
Signed-off-by: Cedric <cedric@aiur.fr>
This commit is contained in:
parent
bd12ead317
commit
714b1be9ad
4 changed files with 209 additions and 0 deletions
47
weboob/backends/meteofrance/backend.py
Normal file
47
weboob/backends/meteofrance/backend.py
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2010 Julien Veyssier
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, version 3 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
from weboob.capabilities.weather import ICapWeather
|
||||
from weboob.tools.backend import BaseBackend
|
||||
|
||||
from .browser import MeteofranceBrowser
|
||||
|
||||
|
||||
__all__ = ['MeteofranceBackend']
|
||||
|
||||
|
||||
class MeteofranceBackend(BaseBackend, ICapWeather):
|
||||
NAME = 'meteofrance'
|
||||
MAINTAINER = 'Cedric D.'
|
||||
EMAIL = 'cedric@aiur.fr'
|
||||
VERSION = '0.1'
|
||||
DESCRIPTION = 'MeteoFrance'
|
||||
LICENSE = 'GPLv3'
|
||||
#CONFIG = ValuesDict(Value('domain', label='Domain (example "ssl.what.cd")'),
|
||||
# Value('protocol', label='Protocol to use', choices=('http', 'https')),
|
||||
# Value('username', label='Username'),
|
||||
# Value('password', label='Password', masked=True))
|
||||
BROWSER = MeteofranceBrowser
|
||||
|
||||
def create_default_browser(self):
|
||||
return self.create_browser()
|
||||
|
||||
def get_weather(self, city_id):
|
||||
return self.browser.get_weather(city_id)
|
||||
|
||||
def iter_city_search(self, pattern):
|
||||
return self.browser.iter_city_search(pattern.replace(' ','+'))
|
||||
Loading…
Add table
Add a link
Reference in a new issue