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

SalesAdapterBase.search()   A

Complexity

Conditions 1

Size

Total Lines 9
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 1
nop 3
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