inline keyboard and move to channel with threads
Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
@@ -3,7 +3,7 @@ class ItemMonitor:
|
||||
def __init__(self, name,search_query, latitude, longitude, max_distance,
|
||||
condition, min_price, max_price, title_exclude,
|
||||
description_exclude, title_must_include, description_must_include,
|
||||
title_first_word_exclude, check_every):
|
||||
title_first_word_exclude, check_every, thread_id):
|
||||
self._name = name
|
||||
self._search_query = search_query
|
||||
self._latitude = latitude
|
||||
@@ -18,6 +18,7 @@ class ItemMonitor:
|
||||
self._description_must_include = description_must_include
|
||||
self._title_first_word_exclude = title_first_word_exclude
|
||||
self._check_every = check_every
|
||||
self._thread_id = thread_id
|
||||
@classmethod
|
||||
def load_from_json(cls, json_data):
|
||||
# search_query is mandatory
|
||||
@@ -38,7 +39,8 @@ class ItemMonitor:
|
||||
json_data.get('title_must_include', []),
|
||||
json_data.get('description_must_include', []),
|
||||
json_data.get('title_first_word_exclude', []),
|
||||
json_data.get('check_every', 30)
|
||||
json_data.get('check_every', 30),
|
||||
json_data.get('thread_id', 1)
|
||||
)
|
||||
|
||||
def get_name(self):
|
||||
@@ -81,4 +83,7 @@ class ItemMonitor:
|
||||
return self._title_first_word_exclude
|
||||
|
||||
def get_check_every(self):
|
||||
return self._check_every
|
||||
return self._check_every
|
||||
|
||||
def get_thread_id(self):
|
||||
return self._thread_id
|
||||
Reference in New Issue
Block a user