-
Notifications
You must be signed in to change notification settings - Fork 349
Expand file tree
/
Copy pathPlugin.py
More file actions
31 lines (25 loc) · 857 Bytes
/
Plugin.py
File metadata and controls
31 lines (25 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# coding=utf-8
class Plugin(object):
"""
@type cfg1: modules.Configuration
@type api1: modules.Poloniex.Poloniex
@type log1: modules.Logger.Logger
"""
def __init__(self, cfg1, api1, log1, notify_config1):
self.api = api1
self.config = cfg1
self.notify_config = notify_config1
self.log = log1
# override this to run plugin init code
def on_bot_init(self):
self.log.log(self.__class__.__name__ + ' plugin started.')
# override this to run plugin loop code before lending
def before_lending(self):
pass
# override this to run plugin loop code after lending
def after_lending(self):
pass
# override this to run plugin stop code
# since the bot can be killed, there is not guarantee this will be called.
def on_bot_stop(self):
pass