Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
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 |