Passed
Push — master ( e2e932...d28616 )
by Steffen
01:50
created

kuon.steam.steam   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 23
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Steam.get_my_inventory() 0 5 1
A Steam.__init__() 0 7 1
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
from kuon.common import CommonSteamGames
4
from kuon.steam.common import SteamUrls
5
from kuon.steam.steam_login import SteamLogin
6
7
8
class Steam(SteamLogin):
9
10
    def __init__(self, *args, **kwargs):
11
        """Initializing function
12
13
        :param args:
14
        :param kwargs:
15
        """
16
        super().__init__(*args, **kwargs)
17
18
    def get_my_inventory(self):
19
        url = '{base:s}/my/inventory/json/{app_id:d}/{app_context:d}'.format(base=SteamUrls.COMMUNITY,
20
                                                                             app_id=CommonSteamGames.APP_ID_CSGO,
21
                                                                             app_context=2)
22
        print(self._session.get(url).json())
23