Pick events class from v4
This commit is contained in:
parent
04eccbe250
commit
acded35e1a
6 changed files with 82 additions and 49 deletions
|
|
@ -16,7 +16,7 @@ API_URL="http://worldcup.sfg.io/%s"
|
|||
|
||||
def load(context):
|
||||
from event import ModuleEvent
|
||||
add_event(ModuleEvent(func=lambda url: urlopen(url, timeout=10).read().decode(), func_data=API_URL % "matches/current?by_date=DESC", call=current_match_new_action, intervalle=30))
|
||||
add_event(ModuleEvent(func=lambda url: urlopen(url, timeout=10).read().decode(), func_data=API_URL % "matches/current?by_date=DESC", call=current_match_new_action, interval=30))
|
||||
|
||||
|
||||
def help_full ():
|
||||
|
|
@ -66,7 +66,7 @@ def cmd_watch(msg):
|
|||
def current_match_new_action(match_str, osef):
|
||||
global DATAS
|
||||
|
||||
add_event(ModuleEvent(func=lambda url: urlopen(url).read().decode(), func_data=API_URL % "matches/current?by_date=DESC", call=current_match_new_action, intervalle=30))
|
||||
add_event(ModuleEvent(func=lambda url: urlopen(url).read().decode(), func_data=API_URL % "matches/current?by_date=DESC", call=current_match_new_action, interval=30))
|
||||
|
||||
matches = json.loads(match_str)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue