fixprice_api.endpoints.geolocation

Геолокация

Functions

api_child_field(child_factory, *[, repr, ...])

Dataclass field helper for child API services initialized in ApiParent.__post_init__.

autotest(func)

dataclass([cls, init, repr, eq, order, ...])

Add dunder methods based on the fields defined in the class.

Classes

ApiChild(parent)

Base class for API child services that keeps a typed parent reference.

ApiParent()

Dataclass mixin that initializes fields declared with api_child_field.

ClassGeolocation(parent)

Методы для работы с геолокацией и выбором магазинов.

FetchResponse(request, page, url, headers, ...)

Represents the response of a request.

ShopService(parent)

Сервис для работы с информацией о магазинах.

class ClassGeolocation(parent: FixPriceAPI)[source][source]

Bases: ApiChild[FixPriceAPI], ApiParent

Методы для работы с геолокацией и выбором магазинов.

Включает получение информации о городах, адресах, поиск магазинов и управление настройками доставки.

Shop: ShopService

Работа с магазинами.

async countries_list(
alias: str = None,
) FetchResponse[source][source]

Возвращает список всех стран, их id и название. alias - работает как сортировка.

async regions_list(
country_id: int = None,
) FetchResponse[source][source]

Возвращает список всех регионов, их id и название. Если фильтр не применен - выдача всех регионов независимо от страны.

async cities_list(
country_id: int,
) FetchResponse[source][source]

Возвращает список всех городов, их id и название, геопозицию, регион и тип населенного пункта. По умолчанию - по РФ.

async city_info(
city_id: int,
) FetchResponse[source][source]

Возвращает информацию о городе.

class ShopService(parent: ParentT)[source][source]

Bases: ApiChild[FixPriceAPI]

Сервис для работы с информацией о магазинах.

async search(
country_id: int = None,
region_id: int = None,
city_id: int = None,
search: str = None,
) FetchResponse[source][source]

Поиск магазинов.