SalesAdapterBase.__init__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 7
ccs 1
cts 2
cp 0.5
rs 10
c 0
b 0
f 0
cc 1
nop 3
crap 1.125
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3 1
from abc import ABCMeta, abstractmethod
4
5 1
from kuon.api_response import APIResponse
6
7
8 1
class SalesAdapterBase(object):
9 1
    __metaclass__ = ABCMeta
10
11 1
    def __init__(self, *args, **kwargs) -> None:
12
        """Initializing function to just not display the warning of unexpected arguments
13
14
        :type args: list
15
        :type kwargs: dict
16
        """
17
        pass
18
19 1
    @abstractmethod
20 1
    def search(self, market_name, no_delay=False) -> APIResponse:
21
        """Search for a specific item
22
23
        :type market_name: str
24
        :type no_delay: bool
25
        :return:
26
        """
27
        pass
28
29 1
    @abstractmethod
30 1
    def get_sold_history(self, market_name, no_delay=False) -> APIResponse:
31
        """Get the last available sell history
32
33
        :type market_name: str
34
        :type no_delay: bool
35
        :return:
36
        """
37
        pass
38
39 1
    @staticmethod
40 1
    @abstractmethod
41 1
    def get_item_link(item_id: int) -> str:
42
        """Generate the item link from the item id
43
44
        :return:
45
        """
46
        pass
47