]> rtime.felk.cvut.cz Git - hubacji1/coffee-getter.git/blob - cbconf.py
Update changelog
[hubacji1/coffee-getter.git] / cbconf.py
1 # -*- coding: utf-8 -*-
2 """Get configuration."""
3 from json import loads
4
5 class Conf:
6     PATH = ".cfg"
7
8     def __init__(self):
9         with open(Conf.PATH) as f:
10             self.conf = loads(f.read())
11         return None
12
13     def getCoffeebotURL(self):
14         """Return URL of Slack Coffeebot."""
15         return self.conf["coffeebot"]["url"]
16
17     def getCoffeeDbPath(self):
18         """Return the path to database with coffees."""
19         return self.conf["coffeedb"]["path"]