summaryrefslogtreecommitdiff
path: root/wikifolio/model.py
diff options
context:
space:
mode:
Diffstat (limited to 'wikifolio/model.py')
-rw-r--r--wikifolio/model.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/wikifolio/model.py b/wikifolio/model.py
new file mode 100644
index 0000000..7315782
--- /dev/null
+++ b/wikifolio/model.py
@@ -0,0 +1,25 @@
+BASE_URL = "https://www.wikifolio.com/de/de/wikifolio/"
+
+
+class Certificate:
+ def __init__(self, id, shortdesc, isin, trader):
+ self.id = id
+ self.name = shortdesc
+ self.isin = isin
+ self.trader = trader
+
+ def make_url(self):
+ return BASE_URL + self.name
+
+ def __repr__(self):
+ return "<{} id={} shortdesc=\"{}\" isin={}>".format(
+ self.__class__.__name__, self.id, self.name, self.isin)
+
+
+class Comment:
+ def __init__(self, date, author, text, guid, link):
+ self.pubDate = date
+ self.author = author
+ self.description = text
+ self.guid = guid
+ self.link = link