@@ -24,29 +24,27 @@ Import the client:
2424 tree = (await api.Catalog.tree()).json()
2525 print (f " Первая категория: { tree[next (iter (tree))][' alias' ]} " )
2626 products_list = (await api.Catalog.products_list(category_alias = tree[next (iter (tree))][" alias" ])).json()
27- print (f " Первый товар: { products_list[0 ]} " )
27+ print (f " Первый товар: { products_list[0 ][ ' title ' ] } " )
2828 balance = (await api.Catalog.Products.balance(product_id = products_list[0 ][" id" ])).json()
29- print (f " Первый баланс: { balance[0 ]} " )
29+ print (f " Первый баланс: { balance[0 ][ ' address ' ] } ; { balance[ 0 ][ ' count ' ] } шт " )
3030 info = (await api.Catalog.Products.info(url = products_list[0 ][" url" ])).json()
31- print (f " Информация о товаре: { info} " )
31+ print (f " Информация о товаре: { info[ ' title ' ] } " )
3232
3333 # Geolocation
34- en = (await api.Geolocation.countries_list(alias = " en" )).json()
35- print (f " Первая страна en: { en[0 ]} " )
36- ru = (await api.Geolocation.countries_list(alias = " ru" )).json()
37- print (f " Первая страна ru: { ru[0 ]} " )
34+ first_country = (await api.Geolocation.countries_list()).json()
35+ print (f " Первая страна: { first_country[0 ][' title' ]} " )
3836 regions = (await api.Geolocation.regions_list()).json()
39- print (f " Первый регион: { regions[0 ]} " )
40- cities = (await api.Geolocation.cities_list(country_id = en [1 ][" id" ])).json()
41- print (f " Первый город: { cities[0 ]} " )
37+ print (f " Первый регион: { regions[0 ][ ' title ' ] } " )
38+ cities = (await api.Geolocation.cities_list(country_id = first_country [1 ][" id" ])).json()
39+ print (f " Первый город: { cities[0 ][ ' name ' ] } " )
4240 city_info = (await api.Geolocation.city_info(city_id = cities[0 ][" id" ])).json()
43- print (f " Информация о городе: { city_info} " )
44- search = (await api.Geolocation.search(country_id = en [0 ][" id" ], city_id = cities[0 ][" id" ])).json()
45- print (f " Первый магазин: { search[0 ]} " )
41+ print (f " Информация о городе: { city_info[ ' name ' ] } ( { city_info[ ' fiasid ' ] } ) " )
42+ search = (await api.Geolocation.search(country_id = first_country [0 ][" id" ], city_id = cities[0 ][" id" ])).json()
43+ print (f " Первый магазин: { search[0 ][ ' address ' ] } " )
4644
4745 # Advertising
4846 home_brands = (await api.Advertising.home_brands_list()).json()
49- print (f " Первая рекламная запись: { home_brands[0 ]} " )
47+ print (f " Первая рекламная запись: { home_brands[0 ][ ' title ' ] } { home_brands[ 0 ][ ' updatedAt ' ] } " )
5048
5149 # General
5250 # Загрузка изображения по прямой ссылке.
0 commit comments