15
15
import re
16
16
17
17
# API Imports
18
- from .settings import STEAM_API_KEY , DEFAULT_LANGUAGE , DEFAULT_DATA_FORMAT
18
+ from .settings import STEAM_API_KEY , DEFAULT_LANGUAGE
19
19
from .util .decorators import public
20
20
21
21
30
30
# =============================================================================
31
31
@public
32
32
class SteamWebAPI (object ):
33
- def __init__ (self , key = STEAM_API_KEY , language = DEFAULT_LANGUAGE ,
34
- data_format = DEFAULT_DATA_FORMAT ):
35
- """.. method:: __init__(key=STEAM_API_KEY, language=DEFAULT_LANGUAGE, data_format=DEFAULT_DATA_FORMAT)
33
+ def __init__ (self , key = STEAM_API_KEY , language = DEFAULT_LANGUAGE ):
34
+ """.. method:: __init__(key=STEAM_API_KEY, language=DEFAULT_LANGUAGE)
36
35
37
36
API base class which contains the default settings for all queries.
38
37
@@ -50,17 +49,9 @@ def __init__(self, key=STEAM_API_KEY, language=DEFAULT_LANGUAGE,
50
49
if key and not API_KEY_RE .match (key ):
51
50
raise Exception ('Bad Key' )
52
51
53
- # Make format lower case
54
- data_format = data_format .lower ()
55
-
56
- # Check the format and to make sure it is a valid format
57
- if data_format and not data_format in ('json' , 'xml' , 'vdf' ):
58
- raise Exception ('Invalid format.' )
59
-
60
52
# Set the instance attributes
61
53
self .key = key
62
54
self .language = language
63
- self .data_format = data_format
64
55
65
56
def api_query (self , * args , ** kwargs ):
66
57
""".. method:: api_query(interface, method, method_version=1, httpmethod='GET', parameters={})
@@ -83,12 +74,8 @@ def api_query(self, *args, **kwargs):
83
74
:raises: ?
84
75
85
76
"""
86
- if not self .data_format :
87
- # Return the APIQuery instance
88
- return APIQuery (* args , ** kwargs )
89
-
90
- # Return an executed APIQuery call with the format of their choice
91
- return APIQuery (* args , ** kwargs ).__getattribute__ (self .format )
77
+ # Return the APIQuery instance
78
+ return APIQuery (* args , ** kwargs )
92
79
93
80
94
81
@public
@@ -207,7 +194,7 @@ def url(self):
207
194
def parameters (self ):
208
195
""".. attribute:: parameters
209
196
210
- Returns private variable parameters (read-only).
197
+ (str) - Returns private variable parameters (read-only).
211
198
212
199
(dict) The parameters for the query.
213
200
0 commit comments