File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+
3+ build :
4+ os : ubuntu-22.04
5+ tools :
6+ python : " 3.12"
7+
8+ sphinx :
9+ configuration : docs/source/conf.py
Original file line number Diff line number Diff line change 1919# -- Project information -----------------------------------------------------
2020
2121project = 'epicstore_api'
22- copyright = '2023 , SD4RK'
22+ copyright = '2024 , SD4RK'
2323author = 'SD4RK'
2424
2525
Original file line number Diff line number Diff line change @@ -40,12 +40,13 @@ You can see other examples in ``examples/`` directory:
4040 from epicstore_api import EpicGamesStoreAPI, OfferData
4141
4242 api = EpicGamesStoreAPI()
43- namespace, slug = list( api.get_product_mapping().items())[0]
43+ namespace, slug = next(iter( api.get_product_mapping().items()))
4444 first_product = api.get_product(slug)
45- offers = []
46- for page in first_product['pages']:
47- if page.get('offer') is not None:
48- offers.append(OfferData(page['namespace'], page['offer']['id']))
45+ offers = [
46+ OfferData(page['namespace'], page['offer']['id'])
47+ for page in first_product['pages']
48+ if page.get('offer') and 'id' in page['offer']
49+ ]
4950 offers_data = api.get_offers_data(*offers)
5051 for offer_data in offers_data:
5152 data = offer_data['data']['Catalog']['catalogOffer']
You can’t perform that action at this time.
0 commit comments