helium_py.api.hotspots.Hotspots

class helium_py.api.hotspots.Hotspots(host=None, port=None, user_agent=None, base_path=None)[source]

Bases: API

Hotspots client class for Helium Blockchain API.

https://docs.helium.com/api/blockchain/hotspots

__init__(host=None, port=None, user_agent=None, base_path=None)

Allow for overriding API details at instantiation.

Methods

__init__([host, port, user_agent, base_path])

Allow for overriding API details at instantiation.

all(params)

Yield all hotspots.

get_hotspot_challenges(address, params)

Yield hotspot challenges for provided address.

get_hotspot_rewards(address, params)

Yield hotspot rewards for provided address.

get_hotspot_rewards_total(address, params)

Return hotspot rewards totals for provided address.

get_hotspot_witnessed(address)

Return list of hotspots witnessed by hotspot with provided address.

get_hotspot_witnesses(address)

Return list of witnesses for a hotspot with provided address.

get_roles(address, params)

Yield all roles for provided address.

get_roles_counts(address, params)

Return account roles for provided address.

hotspot_for_address(address)

Return hotspot details for a hotspot with provided address.

hotspots_by_hex(h3_index)

Return hotspots located within hex provided by h3_index.

hotspots_for_name(name)

Return hotspot details for a hotspot with provided name.

hotspots_search_by_geo(swlat, swlon, nelat, ...)

Return hotspots that are contained within the box coordinates.

hotspots_search_by_location_distance(lat, ...)

Return hotspots that are contained within distance meters of point coordinates.

hotspots_search_by_name(name)

Return search results for provided hotspot name.

Attributes

base_path

client

Return a client singleton per API.

host

port

user_agent

all(params: Optional[dict]) Generator[dict, None, None][source]

Yield all hotspots.

Args:

params: Filter mode params.

property client: Client

Return a client singleton per API.

get_hotspot_challenges(address: str, params: Optional[dict]) Generator[dict, None, None][source]

Yield hotspot challenges for provided address.

get_hotspot_rewards(address: str, params: Optional[dict]) Generator[dict, None, None][source]

Yield hotspot rewards for provided address.

get_hotspot_rewards_total(address: str, params: Optional[dict]) dict[source]

Return hotspot rewards totals for provided address.

get_hotspot_witnessed(address: str) List[dict][source]

Return list of hotspots witnessed by hotspot with provided address.

get_hotspot_witnesses(address: str) List[dict][source]

Return list of witnesses for a hotspot with provided address.

get_roles(address: str, params: Optional[dict]) Generator[dict, None, None][source]

Yield all roles for provided address.

get_roles_counts(address: str, params: Optional[dict]) dict[source]

Return account roles for provided address.

hotspot_for_address(address: str) dict[source]

Return hotspot details for a hotspot with provided address.

hotspots_by_hex(h3_index: str) List[dict][source]

Return hotspots located within hex provided by h3_index.

hotspots_for_name(name: str) List[dict][source]

Return hotspot details for a hotspot with provided name.

hotspots_search_by_geo(swlat: float, swlon: float, nelat: float, nelon: float) List[dict][source]

Return hotspots that are contained within the box coordinates.

hotspots_search_by_location_distance(lat: float, lon: float, distance: int) List[dict][source]

Return hotspots that are contained within distance meters of point coordinates.

hotspots_search_by_name(name: str) List[dict][source]

Return search results for provided hotspot name.