Conditions | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
1 | from lib import action |
||
5 | def run(self, stream, title, description=None, start_time=None, |
||
6 | end_time=None): |
||
7 | # TODO: Add support for links |
||
8 | data = { |
||
9 | 'title': title |
||
10 | } |
||
11 | |||
12 | if description: |
||
13 | data['description'] = description |
||
14 | |||
15 | if start_time: |
||
16 | data['start_time'] = start_time |
||
17 | |||
18 | if end_time: |
||
19 | data['end_time'] = end_time |
||
20 | |||
21 | return self.librato.post_annotation(name=stream, **data) |
||
22 |