@@ -267,7 +267,8 @@ async def fetch_auction_history(self, page=1):
267
267
parsing_time = time .perf_counter () - start_time
268
268
return TibiaResponse (response , auction_history , parsing_time )
269
269
270
- async def fetch_auction (self , auction_id , * , fetch_items = False , fetch_mounts = False , fetch_outfits = False ):
270
+ async def fetch_auction (self , auction_id , * , fetch_items = False , fetch_mounts = False , fetch_outfits = False ,
271
+ skip_details = False ):
271
272
"""Fetches an auction by its ID.
272
273
273
274
.. versionadded:: 3.3.0
@@ -282,6 +283,11 @@ async def fetch_auction(self, auction_id, *, fetch_items=False, fetch_mounts=Fal
282
283
Whether to fetch all of the character's mounts. By default only the first page is fetched.
283
284
fetch_outfits: :class:`bool`
284
285
Whether to fetch all of the character's outfits. By default only the first page is fetched.
286
+ skip_details: :class:`bool`, optional
287
+ Whether to skip parsing the entire auction and only parse the information shown in lists. False by default.
288
+
289
+ This allows fetching basic information like name, level, vocation, world, bid and status, shaving off some
290
+ parsing time.
285
291
286
292
Returns
287
293
-------
@@ -298,9 +304,9 @@ async def fetch_auction(self, auction_id, *, fetch_items=False, fetch_mounts=Fal
298
304
"""
299
305
response = await self ._request ("GET" , AuctionDetails .get_url (auction_id ))
300
306
start_time = time .perf_counter ()
301
- auction = AuctionDetails .from_content (response .content , auction_id )
307
+ auction = AuctionDetails .from_content (response .content , auction_id , skip_details )
302
308
parsing_time = time .perf_counter () - start_time
303
- if auction :
309
+ if auction and not skip_details :
304
310
if fetch_items :
305
311
await self ._fetch_all_pages (auction_id , auction .items , 0 )
306
312
await self ._fetch_all_pages (auction_id , auction .store_items , 1 )
0 commit comments