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

kuon.steam.steam.Steam.get_my_inventory()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nop 1
crap 2
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