@@ -147,6 +147,7 @@ where
147
147
)
148
148
. header ( USER_AGENT , "steamguard-cli" )
149
149
. header ( COOKIE , cookies. cookies ( & STEAM_COOKIE_URL ) . unwrap ( ) )
150
+ . header ( "Origin" , "https://steamcommunity.com" )
150
151
. query ( & query_params)
151
152
. send ( ) ?;
152
153
@@ -226,6 +227,7 @@ where
226
227
CONTENT_TYPE ,
227
228
"application/x-www-form-urlencoded; charset=UTF-8" ,
228
229
)
230
+ . header ( "Origin" , "https://steamcommunity.com" )
229
231
. body ( query_params)
230
232
. send ( ) ?;
231
233
@@ -255,11 +257,39 @@ where
255
257
Ok ( ( ) )
256
258
}
257
259
260
+ /// Bulk accept confirmations.
261
+ ///
262
+ /// Sends one request per confirmation.
258
263
pub fn accept_confirmations ( & self , confs : & [ Confirmation ] ) -> Result < ( ) , ConfirmerError > {
259
- self . send_multi_confirmation_ajax ( confs, ConfirmationAction :: Accept )
264
+ for conf in confs {
265
+ self . accept_confirmation ( conf) ?;
266
+ }
267
+
268
+ Ok ( ( ) )
260
269
}
261
270
271
+ /// Bulk deny confirmations.
272
+ ///
273
+ /// Sends one request per confirmation.
262
274
pub fn deny_confirmations ( & self , confs : & [ Confirmation ] ) -> Result < ( ) , ConfirmerError > {
275
+ for conf in confs {
276
+ self . deny_confirmation ( conf) ?;
277
+ }
278
+
279
+ Ok ( ( ) )
280
+ }
281
+
282
+ /// Bulk accept confirmations.
283
+ ///
284
+ /// Uses a different endpoint than `accept_confirmation()` to submit multiple confirmations in one request.
285
+ pub fn accept_confirmations_bulk ( & self , confs : & [ Confirmation ] ) -> Result < ( ) , ConfirmerError > {
286
+ self . send_multi_confirmation_ajax ( confs, ConfirmationAction :: Accept )
287
+ }
288
+
289
+ /// Bulk deny confirmations.
290
+ ///
291
+ /// Uses a different endpoint than `deny_confirmation()` to submit multiple confirmations in one request.
292
+ pub fn deny_confirmations_bulk ( & self , confs : & [ Confirmation ] ) -> Result < ( ) , ConfirmerError > {
263
293
self . send_multi_confirmation_ajax ( confs, ConfirmationAction :: Deny )
264
294
}
265
295
0 commit comments