| Total Complexity | 0 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/python |
||
| 2 | # -*- coding: utf-8 -*- |
||
| 3 | from kuon.watcher.tracker import TrackConditions |
||
| 4 | from kuon.watcher.tracker.json_manager import JsonManager |
||
| 5 | |||
| 6 | if __name__ == '__main__': |
||
| 7 | example_items = [ |
||
| 8 | { |
||
| 9 | 'search_item': "M4A4 | Howl (Minimal Wear)", |
||
| 10 | 'conditions': [ |
||
| 11 | { |
||
| 12 | 'key': 'price', |
||
| 13 | 'value': 80000, |
||
| 14 | 'unit': '#', |
||
| 15 | 'condition': TrackConditions.BELOW_VALUE |
||
| 16 | } |
||
| 17 | ] |
||
| 18 | }, |
||
| 19 | { |
||
| 20 | 'search_item': "Desert Eagle | Blaze (Factory New)", |
||
| 21 | 'conditions': [ |
||
| 22 | { |
||
| 23 | 'key': 'wear_value', |
||
| 24 | 'value': 0.01, |
||
| 25 | 'unit': '#', |
||
| 26 | 'condition': TrackConditions.BELOW_VALUE |
||
| 27 | }, |
||
| 28 | { |
||
| 29 | 'key': 'price', |
||
| 30 | 'value': 0.01, |
||
| 31 | 'unit': '%', |
||
| 32 | 'condition': TrackConditions.BELOW_AVERAGE_LAST_SOLD |
||
| 33 | } |
||
| 34 | ] |
||
| 35 | }, |
||
| 36 | { |
||
| 37 | 'search_item': "AK-47 | Vulcan (Minimal Wear)", |
||
| 38 | 'conditions': [ |
||
| 39 | { |
||
| 40 | 'key': 'price', |
||
| 41 | 'value': 0, |
||
| 42 | 'unit': '#', |
||
| 43 | 'condition': TrackConditions.BELOW_CHEAPEST_LAST_SOLD |
||
| 44 | } |
||
| 45 | ] |
||
| 46 | }, |
||
| 47 | ] |
||
| 48 | tracked_items = JsonManager.get_tracked_items() |
||
| 49 | print(tracked_items) |
||
| 50 | JsonManager.save_tracked_items(example_items) |
||
| 51 |