@@ -103,7 +103,7 @@ def _append_view_filters(self, params):
103
103
104
104
105
105
class CSVRequestOptions (_FilterOptionsBase ):
106
- def __init__ (self , maxage = None ):
106
+ def __init__ (self , maxage = - 1 ):
107
107
super (CSVRequestOptions , self ).__init__ ()
108
108
self .max_age = maxage
109
109
@@ -112,13 +112,13 @@ def max_age(self):
112
112
return self ._max_age
113
113
114
114
@max_age .setter
115
- @property_is_int (range = (0 , 240 ))
115
+ @property_is_int (range = (0 , 240 ), allowed = [ - 1 ] )
116
116
def max_age (self , value ):
117
117
self ._max_age = value
118
118
119
119
def apply_query_params (self , url ):
120
120
params = []
121
- if self .max_age != 0 :
121
+
10000
if self .max_age != - 1 :
122
122
params .append ('maxAge={0}' .format (self .max_age ))
123
123
124
124
self ._append_view_filters (params )
@@ -130,7 +130,7 @@ class ImageRequestOptions(_FilterOptionsBase):
130
130
class Resolution :
131
131
High = 'high'
132
132
133
- def __init__ (self , imageresolution = None , maxage = None ):
133
+ def __init__ (self , imageresolution = None , maxage = - 1 ):
134
134
super (ImageRequestOptions , self ).__init__ ()
135
135
self .image_resolution = imageresolution
136
136
self .max_age = maxage
@@ -140,15 +140,15 @@ def max_age(self):
140
140
return self ._max_age
141
141
142
142
@max_age .setter
143
- @property_is_int (range = (0 , 240 ))
143
+ @property_is_int (range = (0 , 240 ), allowed = [ - 1 ] )
144
144
def max_age (self , value ):
145
145
self ._max_age = value
146
146
147
147
def apply_query_params (self , url ):
148
148
params = []
149
149
if self .image_resolution :
150
150
params .append ('resolution={0}' .format (self .image_resolution ))
151
- if self .max_age != 0 :
151
+ if self .max_age != - 1 :
152
152
params .append ('maxAge={0}' .format (self .max_age ))
153
153
154
154
self ._append_view_filters (params )
@@ -176,7 +176,7 @@ class Orientation:
176
176
Portrait = "portrait"
177
177
Landscape = "landscape"
178
178
179
- def __init__ (self , page_type = None , orientation = None , maxage = 0 ):
179
+ def __init__ (self , page_type = None , orientation = None , maxage = - 1 ):
180
180
super (PDFRequestOptions , self ).__init__ ()
181
181
self .page_type = page_type
182
182
self .orientation = orientation
@@ -187,7 +187,7 @@ def max_age(self):
187
187
return self ._max_age
188
188
189
189
@max_age .setter
190
- @property_is_int (range = (0 , 240 ))
190
+ @property_is_int (range = (0 , 240 ), allowed = [ - 1 ] )
191
191
def max_age (self , value ):
192
192
self ._max_age = value
193
193
@@ -199,7 +199,7 @@ def apply_query_params(self, url):
199
199
if self .orientation :
200
200
params .append ('orientation={0}' .format (self .orientation ))
201
201
202
- if self .max_age != 0 :
202
+ if self .max_age != - 1 :
203
203
params .append ('maxAge={0}' .format (self .max_age ))
204
204
205
205
self ._append_view_filters (params )
0 commit comments