Completed
Push — master ( 72b331...d4b7d2 )
by Steffen
02:14
created

kuon.watcher.adapters.sales_adapter   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 16
dl 0
loc 46
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A SalesAdapterBase.get_sold_history() 0 9 1
A SalesAdapterBase.search() 0 9 1
A SalesAdapterBase.__init__() 0 7 1
A SalesAdapterBase.get_item_link() 0 8 1
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
4
from abc import ABCMeta, abstractmethod
5
6
7
class SalesAdapterBase:
8
    __metaclass__ = ABCMeta
9
10
    def __init__(self, *args, **kwargs):
11
        """Initializing function to just not display the warning of unexpected arguments
12
13
        :param args:
14
        :param kwargs:
15
        """
16
        pass
17
18
    @abstractmethod
19
    def search(self, market_name, no_delay=False):
20
        """Search for a specific item
21
22
        :param market_name:
23
        :param no_delay:
24
        :return:
25
        """
26
        pass
27
28
    @abstractmethod
29
    def get_sold_history(self, market_name, no_delay=False):
30
        """Get the last available sell history
31
32
        :param market_name:
33
        :param no_delay:
34
        :return:
35
        """
36
        pass
37
38
    @staticmethod
39
    @abstractmethod
40
    def get_item_link(item_id: int):
41
        """Generate the item link from the item id
42
43
        :return:
44
        """
45
        pass
46