Completed
Push — master ( dd2f8f...d34d79 )
by Steffen
03:32
created

SalesAdapterBase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A search() 0 8 1
A search_no_delay() 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
    @abstractmethod
11
    def search(self, market_name):
12
        """Search for a specific item
13
14
        :param market_name:
15
        :return:
16
        """
17
        pass
18
19
    @abstractmethod
20
    def search_no_delay(self, market_name):
21
        """Search for a specific item without delay (some APIs delay responses to prevent bot sniping, use workarounds)
22
23
        :param market_name:
24
        :return:
25
        """
26
        pass
27