Passed
Push — master ( 849c80...dd2f8f )
by Steffen
01:24
created

SalesAdapter.__init__()   A

Complexity

Conditions 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 2
Metric Value
cc 1
c 2
b 0
f 2
dl 0
loc 7
rs 9.4285
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
4
from kuon.watcher.adapters import SalesAdapterBase
5
from kuon.bitskins.api.interfaces import ISales
6
7
8
class SalesAdapter(SalesAdapterBase):
9
    """Adapter for the Sales Interface of BitSkins"""
10
11
    def __init__(self, *args, **kwargs):
12
        """Initializing function
13
14
        :param args:
15
        :param kwargs:
16
        """
17
        self.sales_interface = ISales(*args, **kwargs)
18
19
    def search(self, market_name):
20
        """Implementation of the search function
21
22
        :param market_name:
23
        :return:
24
        """
25
        # ToDo: unify the units(BitSkins float like 5.50, OPSkins int like 550)
26
        return self.sales_interface.get_sales_info(market_hash_name=market_name)
27