evcloud 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evcloud/__init__.py +802 -0
- evcloud/_default_clients.py +30 -0
- evcloud/client.py +200 -0
- evcloud/core/__init__.py +67 -0
- evcloud/core/api_error.py +23 -0
- evcloud/core/client_wrapper.py +108 -0
- evcloud/core/datetime_utils.py +70 -0
- evcloud/core/file.py +67 -0
- evcloud/core/force_multipart.py +18 -0
- evcloud/core/http_client.py +840 -0
- evcloud/core/http_response.py +59 -0
- evcloud/core/http_sse/__init__.py +9 -0
- evcloud/core/http_sse/_api.py +112 -0
- evcloud/core/http_sse/_decoders.py +61 -0
- evcloud/core/http_sse/_exceptions.py +7 -0
- evcloud/core/http_sse/_models.py +17 -0
- evcloud/core/jsonable_encoder.py +120 -0
- evcloud/core/logging.py +107 -0
- evcloud/core/pagination.py +82 -0
- evcloud/core/parse_error.py +36 -0
- evcloud/core/pydantic_utilities.py +634 -0
- evcloud/core/query_encoder.py +58 -0
- evcloud/core/remove_none_from_dict.py +11 -0
- evcloud/core/request_options.py +35 -0
- evcloud/core/serialization.py +276 -0
- evcloud/cpo/__init__.py +31 -0
- evcloud/cpo/cdrs/__init__.py +4 -0
- evcloud/cpo/cdrs/client.py +311 -0
- evcloud/cpo/cdrs/raw_client.py +592 -0
- evcloud/cpo/charge_points/__init__.py +7 -0
- evcloud/cpo/charge_points/client.py +1436 -0
- evcloud/cpo/charge_points/raw_client.py +2809 -0
- evcloud/cpo/charge_points/types/__init__.py +7 -0
- evcloud/cpo/charge_points/types/list_charge_points_request_ocpp_version.py +5 -0
- evcloud/cpo/client.py +62 -0
- evcloud/cpo/connectors/__init__.py +4 -0
- evcloud/cpo/connectors/client.py +698 -0
- evcloud/cpo/connectors/raw_client.py +1457 -0
- evcloud/cpo/evses/__init__.py +4 -0
- evcloud/cpo/evses/client.py +691 -0
- evcloud/cpo/evses/raw_client.py +1457 -0
- evcloud/cpo/health/__init__.py +4 -0
- evcloud/cpo/health/client.py +100 -0
- evcloud/cpo/health/raw_client.py +192 -0
- evcloud/cpo/locations/__init__.py +4 -0
- evcloud/cpo/locations/client.py +1021 -0
- evcloud/cpo/locations/raw_client.py +1887 -0
- evcloud/cpo/raw_client.py +13 -0
- evcloud/cpo/sessions/__init__.py +7 -0
- evcloud/cpo/sessions/client.py +430 -0
- evcloud/cpo/sessions/raw_client.py +889 -0
- evcloud/cpo/sessions/types/__init__.py +8 -0
- evcloud/cpo/sessions/types/list_sessions_request_billing_state.py +5 -0
- evcloud/cpo/sessions/types/list_sessions_request_status.py +7 -0
- evcloud/cpo/tariffs/__init__.py +17 -0
- evcloud/cpo/tariffs/client.py +1232 -0
- evcloud/cpo/tariffs/raw_client.py +2526 -0
- evcloud/cpo/tariffs/types/__init__.py +15 -0
- evcloud/cpo/tariffs/types/list_tariffs_request_type.py +7 -0
- evcloud/cpo/tariffs/types/tariff_create_ocpi_version.py +5 -0
- evcloud/cpo/tariffs/types/tariff_create_preauthorize_amount.py +5 -0
- evcloud/cpo/tariffs/types/tariff_patch_preauthorize_amount.py +5 -0
- evcloud/emsp/__init__.py +55 -0
- evcloud/emsp/cdrs/__init__.py +4 -0
- evcloud/emsp/cdrs/client.py +300 -0
- evcloud/emsp/cdrs/raw_client.py +610 -0
- evcloud/emsp/chargers/__init__.py +7 -0
- evcloud/emsp/chargers/client.py +167 -0
- evcloud/emsp/chargers/raw_client.py +331 -0
- evcloud/emsp/chargers/types/__init__.py +11 -0
- evcloud/emsp/chargers/types/resolve_chargers_response.py +53 -0
- evcloud/emsp/client.py +77 -0
- evcloud/emsp/commands/__init__.py +7 -0
- evcloud/emsp/commands/client.py +516 -0
- evcloud/emsp/commands/raw_client.py +979 -0
- evcloud/emsp/commands/types/__init__.py +7 -0
- evcloud/emsp/commands/types/send_commands_request_command.py +7 -0
- evcloud/emsp/emp_identities/__init__.py +4 -0
- evcloud/emsp/emp_identities/client.py +548 -0
- evcloud/emsp/emp_identities/raw_client.py +1277 -0
- evcloud/emsp/evses/__init__.py +4 -0
- evcloud/emsp/evses/client.py +154 -0
- evcloud/emsp/evses/raw_client.py +288 -0
- evcloud/emsp/health/__init__.py +4 -0
- evcloud/emsp/health/client.py +100 -0
- evcloud/emsp/health/raw_client.py +192 -0
- evcloud/emsp/locations/__init__.py +4 -0
- evcloud/emsp/locations/client.py +1386 -0
- evcloud/emsp/locations/raw_client.py +2903 -0
- evcloud/emsp/networks/__init__.py +7 -0
- evcloud/emsp/networks/client.py +1615 -0
- evcloud/emsp/networks/raw_client.py +3725 -0
- evcloud/emsp/networks/types/__init__.py +9 -0
- evcloud/emsp/networks/types/list_networks_request_network_type.py +5 -0
- evcloud/emsp/networks/types/list_rules_networks_request_validity.py +5 -0
- evcloud/emsp/networks/types/network_rule_create_request_rule_type.py +5 -0
- evcloud/emsp/raw_client.py +13 -0
- evcloud/emsp/sessions/__init__.py +4 -0
- evcloud/emsp/sessions/client.py +300 -0
- evcloud/emsp/sessions/raw_client.py +610 -0
- evcloud/emsp/tariffs/__init__.py +7 -0
- evcloud/emsp/tariffs/client.py +421 -0
- evcloud/emsp/tariffs/raw_client.py +883 -0
- evcloud/emsp/tariffs/types/__init__.py +8 -0
- evcloud/emsp/tariffs/types/estimate_request_kwh.py +5 -0
- evcloud/emsp/tariffs/types/estimate_request_minutes.py +5 -0
- evcloud/emsp/tenant/__init__.py +4 -0
- evcloud/emsp/tenant/client.py +328 -0
- evcloud/emsp/tenant/raw_client.py +869 -0
- evcloud/emsp/token_groups/__init__.py +7 -0
- evcloud/emsp/token_groups/client.py +1256 -0
- evcloud/emsp/token_groups/raw_client.py +3288 -0
- evcloud/emsp/token_groups/types/__init__.py +7 -0
- evcloud/emsp/token_groups/types/remove_token_token_groups_request_type.py +5 -0
- evcloud/emsp/tokens/__init__.py +7 -0
- evcloud/emsp/tokens/client.py +1298 -0
- evcloud/emsp/tokens/raw_client.py +2947 -0
- evcloud/emsp/tokens/types/__init__.py +10 -0
- evcloud/emsp/tokens/types/list_tokens_request_status.py +7 -0
- evcloud/emsp/tokens/types/list_tokens_request_type.py +5 -0
- evcloud/emsp/tokens/types/token_update_default_profile_type.py +5 -0
- evcloud/emsp/tokens/types/token_update_whitelist.py +5 -0
- evcloud/energy/__init__.py +8 -0
- evcloud/energy/client.py +47 -0
- evcloud/energy/control_requests/__init__.py +7 -0
- evcloud/energy/control_requests/client.py +399 -0
- evcloud/energy/control_requests/raw_client.py +835 -0
- evcloud/energy/control_requests/types/__init__.py +7 -0
- evcloud/energy/control_requests/types/list_control_requests_request_result.py +15 -0
- evcloud/energy/health/__init__.py +4 -0
- evcloud/energy/health/client.py +100 -0
- evcloud/energy/health/raw_client.py +192 -0
- evcloud/energy/power_measurements/__init__.py +4 -0
- evcloud/energy/power_measurements/client.py +254 -0
- evcloud/energy/power_measurements/raw_client.py +527 -0
- evcloud/energy/raw_client.py +13 -0
- evcloud/environment.py +7 -0
- evcloud/errors/__init__.py +25 -0
- evcloud/errors/bad_gateway_error.py +11 -0
- evcloud/errors/bad_request_error.py +11 -0
- evcloud/errors/conflict_error.py +11 -0
- evcloud/errors/forbidden_error.py +11 -0
- evcloud/errors/gateway_timeout_error.py +11 -0
- evcloud/errors/not_found_error.py +11 -0
- evcloud/errors/too_many_requests_error.py +11 -0
- evcloud/errors/unauthorized_error.py +11 -0
- evcloud/errors/unprocessable_entity_error.py +11 -0
- evcloud/health/__init__.py +4 -0
- evcloud/health/client.py +99 -0
- evcloud/health/raw_client.py +100 -0
- evcloud/ocpi/__init__.py +123 -0
- evcloud/ocpi/client.py +56 -0
- evcloud/ocpi/cpo_data/__init__.py +31 -0
- evcloud/ocpi/cpo_data/client.py +1553 -0
- evcloud/ocpi/cpo_data/raw_client.py +3119 -0
- evcloud/ocpi/cpo_data/types/__init__.py +29 -0
- evcloud/ocpi/cpo_data/types/cancel_reservation_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/create_cdr_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/delete_tariff_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/send_active_charging_profile_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_connector_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_evse_status_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_location_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_session_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_location_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_session_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_tariff_cpo_data_request_version.py +5 -0
- evcloud/ocpi/credentials/__init__.py +31 -0
- evcloud/ocpi/credentials/client.py +750 -0
- evcloud/ocpi/credentials/raw_client.py +1537 -0
- evcloud/ocpi/credentials/types/__init__.py +29 -0
- evcloud/ocpi/credentials/types/partner_versions_pull_request_partner_token_encoding.py +5 -0
- evcloud/ocpi/credentials/types/pull_versions_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/pull_versions_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/rotate_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/rotate_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/start_handshake_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/start_handshake_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/status_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/status_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/unregister_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/unregister_credentials_request_version.py +5 -0
- evcloud/ocpi/emsp/__init__.py +27 -0
- evcloud/ocpi/emsp/client.py +1142 -0
- evcloud/ocpi/emsp/raw_client.py +2209 -0
- evcloud/ocpi/emsp/types/__init__.py +25 -0
- evcloud/ocpi/emsp/types/charging_preferences_request_profile_type.py +5 -0
- evcloud/ocpi/emsp/types/clear_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/get_active_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/send_command_emsp_request_command.py +7 -0
- evcloud/ocpi/emsp/types/send_command_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/set_charging_preferences_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/set_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/update_token_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/upsert_token_emsp_request_version.py +5 -0
- evcloud/ocpi/invites/__init__.py +19 -0
- evcloud/ocpi/invites/client.py +385 -0
- evcloud/ocpi/invites/raw_client.py +887 -0
- evcloud/ocpi/invites/types/__init__.py +17 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_gateway_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_version.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_update_request_gateway_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_update_request_version.py +5 -0
- evcloud/ocpi/partners/__init__.py +7 -0
- evcloud/ocpi/partners/client.py +581 -0
- evcloud/ocpi/partners/raw_client.py +1340 -0
- evcloud/ocpi/partners/types/__init__.py +8 -0
- evcloud/ocpi/partners/types/partner_register_request_ocpi_version.py +5 -0
- evcloud/ocpi/partners/types/partner_update_request_ocpi_version.py +5 -0
- evcloud/ocpi/raw_client.py +13 -0
- evcloud/ocpi/sync/__init__.py +33 -0
- evcloud/ocpi/sync/client.py +1701 -0
- evcloud/ocpi/sync/raw_client.py +3685 -0
- evcloud/ocpi/sync/types/__init__.py +31 -0
- evcloud/ocpi/sync/types/pull_cdrs_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_hub_client_info_as_cpo_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_hub_client_info_as_emsp_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_locations_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_sessions_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_tariffs_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_tokens_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_cdr_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_location_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_session_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_tariff_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_token_sync_request_version.py +5 -0
- evcloud/py.typed +0 -0
- evcloud/types/__init__.py +759 -0
- evcloud/types/access_mode.py +5 -0
- evcloud/types/asset_connector.py +26 -0
- evcloud/types/asset_updated_event.py +29 -0
- evcloud/types/availability_page.py +26 -0
- evcloud/types/batch_response.py +26 -0
- evcloud/types/batch_response_missing_item.py +7 -0
- evcloud/types/cdr_event.py +41 -0
- evcloud/types/cdr_out.py +75 -0
- evcloud/types/cdr_out_auth_method.py +7 -0
- evcloud/types/cdr_out_auth_method_zero.py +5 -0
- evcloud/types/cdr_out_origin.py +7 -0
- evcloud/types/cdr_out_origin_zero.py +5 -0
- evcloud/types/cdr_page.py +27 -0
- evcloud/types/cdr_write_response.py +26 -0
- evcloud/types/charge_point_created_out.py +74 -0
- evcloud/types/charge_point_created_out_access_mode.py +7 -0
- evcloud/types/charge_point_created_out_access_mode_zero.py +5 -0
- evcloud/types/charge_point_created_out_pricing.py +7 -0
- evcloud/types/charge_point_created_out_pricing_zero.py +5 -0
- evcloud/types/charge_point_created_out_site_type.py +7 -0
- evcloud/types/charge_point_created_out_site_type_zero.py +5 -0
- evcloud/types/charge_point_out.py +73 -0
- evcloud/types/charge_point_out_access_mode.py +7 -0
- evcloud/types/charge_point_out_access_mode_zero.py +5 -0
- evcloud/types/charge_point_out_pricing.py +7 -0
- evcloud/types/charge_point_out_pricing_zero.py +5 -0
- evcloud/types/charge_point_out_site_type.py +7 -0
- evcloud/types/charge_point_out_site_type_zero.py +5 -0
- evcloud/types/charge_point_page.py +27 -0
- evcloud/types/charging_preferences_response.py +28 -0
- evcloud/types/charging_preferences_response_result.py +10 -0
- evcloud/types/charging_profile.py +30 -0
- evcloud/types/charging_profile_charging_rate_unit.py +5 -0
- evcloud/types/charging_profile_period.py +31 -0
- evcloud/types/charging_profile_response.py +32 -0
- evcloud/types/cluster_page.py +26 -0
- evcloud/types/command_accepted.py +30 -0
- evcloud/types/command_accepted_route.py +53 -0
- evcloud/types/command_accepted_route_own.py +28 -0
- evcloud/types/command_accepted_route_own_ocpi_version.py +7 -0
- evcloud/types/command_accepted_route_own_ocpi_version_zero.py +5 -0
- evcloud/types/command_accepted_route_roaming.py +30 -0
- evcloud/types/command_accepted_route_roaming_ocpi_version.py +7 -0
- evcloud/types/command_accepted_route_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/command_accepted_status.py +7 -0
- evcloud/types/command_accepted_status_zero.py +20 -0
- evcloud/types/command_page.py +26 -0
- evcloud/types/command_record.py +40 -0
- evcloud/types/command_record_command.py +7 -0
- evcloud/types/command_record_command_zero.py +7 -0
- evcloud/types/command_record_route.py +53 -0
- evcloud/types/command_record_route_own.py +28 -0
- evcloud/types/command_record_route_own_ocpi_version.py +7 -0
- evcloud/types/command_record_route_own_ocpi_version_zero.py +5 -0
- evcloud/types/command_record_route_roaming.py +30 -0
- evcloud/types/command_record_route_roaming_ocpi_version.py +7 -0
- evcloud/types/command_record_route_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/command_record_status.py +7 -0
- evcloud/types/command_record_status_zero.py +20 -0
- evcloud/types/command_response_out.py +26 -0
- evcloud/types/command_response_out_result.py +7 -0
- evcloud/types/command_response_out_result_zero.py +7 -0
- evcloud/types/command_result_event.py +39 -0
- evcloud/types/command_result_event_module.py +5 -0
- evcloud/types/command_result_event_protocol.py +5 -0
- evcloud/types/command_result_event_status.py +5 -0
- evcloud/types/command_send_response.py +31 -0
- evcloud/types/command_token.py +36 -0
- evcloud/types/connector_format.py +5 -0
- evcloud/types/connector_page.py +27 -0
- evcloud/types/connector_status_event.py +29 -0
- evcloud/types/connector_write_response.py +27 -0
- evcloud/types/control_action.py +5 -0
- evcloud/types/control_request_page.py +27 -0
- evcloud/types/control_request_response.py +38 -0
- evcloud/types/control_request_response_action.py +7 -0
- evcloud/types/control_request_response_action_zero.py +7 -0
- evcloud/types/control_request_response_result.py +7 -0
- evcloud/types/control_request_response_result_zero.py +15 -0
- evcloud/types/control_request_response_unit.py +7 -0
- evcloud/types/control_request_response_unit_zero.py +5 -0
- evcloud/types/control_response_event.py +38 -0
- evcloud/types/control_response_event_action.py +5 -0
- evcloud/types/control_response_event_result.py +15 -0
- evcloud/types/control_response_event_unit.py +5 -0
- evcloud/types/cpo_connector_out.py +58 -0
- evcloud/types/cpo_connector_out_format.py +7 -0
- evcloud/types/cpo_connector_out_format_zero.py +5 -0
- evcloud/types/cpo_connector_out_ocpi_status.py +7 -0
- evcloud/types/cpo_connector_out_ocpi_status_zero.py +10 -0
- evcloud/types/cpo_connector_out_power_type.py +7 -0
- evcloud/types/cpo_connector_out_power_type_zero.py +7 -0
- evcloud/types/cpo_evse_out.py +61 -0
- evcloud/types/cpo_evse_out_origin.py +7 -0
- evcloud/types/cpo_evse_out_origin_zero.py +5 -0
- evcloud/types/cpo_evse_out_status.py +7 -0
- evcloud/types/cpo_evse_out_status_zero.py +10 -0
- evcloud/types/credentials_handshake_request.py +44 -0
- evcloud/types/credentials_handshake_request_partner_token_encoding.py +5 -0
- evcloud/types/credentials_handshake_response.py +32 -0
- evcloud/types/credentials_handshake_response_action.py +7 -0
- evcloud/types/credentials_handshake_response_version.py +5 -0
- evcloud/types/deliver_event_response.py +23 -0
- evcloud/types/delivery_drift_event.py +30 -0
- evcloud/types/display_text.py +24 -0
- evcloud/types/effective_cpo.py +27 -0
- evcloud/types/effective_cpo_source.py +7 -0
- evcloud/types/effective_cpo_source_zero.py +5 -0
- evcloud/types/effective_view_response.py +29 -0
- evcloud/types/emp_identity_out.py +35 -0
- evcloud/types/emp_identity_out_status.py +7 -0
- evcloud/types/emp_identity_out_status_zero.py +5 -0
- evcloud/types/emp_identity_page.py +26 -0
- evcloud/types/emsp_cdr_out.py +41 -0
- evcloud/types/emsp_cdr_out_source.py +7 -0
- evcloud/types/emsp_cdr_out_source_zero.py +5 -0
- evcloud/types/emsp_cdr_page.py +26 -0
- evcloud/types/emsp_connector_out.py +30 -0
- evcloud/types/emsp_evse_out.py +32 -0
- evcloud/types/emsp_gateway_schema_commands_location_key.py +25 -0
- evcloud/types/emsp_gateway_schema_location_lookup_location_key.py +25 -0
- evcloud/types/emsp_gateway_schema_locations_location_out.py +47 -0
- evcloud/types/emsp_gateway_schema_locations_location_page.py +26 -0
- evcloud/types/emsp_gateway_schema_networks_location_out.py +37 -0
- evcloud/types/emsp_gateway_schema_networks_location_page.py +26 -0
- evcloud/types/emsp_session_out.py +41 -0
- evcloud/types/emsp_session_out_source.py +7 -0
- evcloud/types/emsp_session_out_source_zero.py +5 -0
- evcloud/types/emsp_session_page.py +26 -0
- evcloud/types/emsp_tariff_page.py +26 -0
- evcloud/types/energy_contract.py +24 -0
- evcloud/types/estimate_line.py +27 -0
- evcloud/types/estimate_line_type.py +7 -0
- evcloud/types/estimate_line_type_zero.py +5 -0
- evcloud/types/estimate_response.py +30 -0
- evcloud/types/event_type_list.py +24 -0
- evcloud/types/event_type_response.py +27 -0
- evcloud/types/event_type_response_type.py +7 -0
- evcloud/types/event_type_response_type_zero.py +27 -0
- evcloud/types/event_type_version.py +24 -0
- evcloud/types/evse_connector_status.py +26 -0
- evcloud/types/evse_page.py +27 -0
- evcloud/types/evse_parking.py +25 -0
- evcloud/types/evse_parking_evse_position.py +7 -0
- evcloud/types/evse_parking_evse_position_zero.py +5 -0
- evcloud/types/evse_status_event.py +31 -0
- evcloud/types/evse_status_out.py +32 -0
- evcloud/types/evse_status_write_response.py +28 -0
- evcloud/types/facility_count.py +24 -0
- evcloud/types/facility_page.py +26 -0
- evcloud/types/health_ok.py +24 -0
- evcloud/types/health_ok_status.py +7 -0
- evcloud/types/health_ok_status_zero.py +5 -0
- evcloud/types/http_error_response.py +29 -0
- evcloud/types/http_validation_error.py +24 -0
- evcloud/types/limit_unit.py +5 -0
- evcloud/types/location_availability.py +28 -0
- evcloud/types/location_availability_status.py +7 -0
- evcloud/types/location_availability_status_zero.py +7 -0
- evcloud/types/location_base.py +53 -0
- evcloud/types/location_base_parking_type.py +7 -0
- evcloud/types/location_base_parking_type_zero.py +8 -0
- evcloud/types/location_cluster.py +26 -0
- evcloud/types/location_detail.py +51 -0
- evcloud/types/location_key_input.py +25 -0
- evcloud/types/location_list.py +24 -0
- evcloud/types/location_out.py +79 -0
- evcloud/types/location_out_access_mode.py +7 -0
- evcloud/types/location_out_access_mode_zero.py +5 -0
- evcloud/types/location_out_ocpi_version.py +7 -0
- evcloud/types/location_out_ocpi_version_zero.py +5 -0
- evcloud/types/location_out_origin.py +7 -0
- evcloud/types/location_out_origin_zero.py +5 -0
- evcloud/types/location_out_parking_type.py +7 -0
- evcloud/types/location_out_parking_type_zero.py +8 -0
- evcloud/types/location_out_role.py +7 -0
- evcloud/types/location_out_role_zero.py +5 -0
- evcloud/types/location_out_site_type.py +7 -0
- evcloud/types/location_out_site_type_zero.py +5 -0
- evcloud/types/location_page.py +27 -0
- evcloud/types/location_summary.py +43 -0
- evcloud/types/location_updated_event.py +30 -0
- evcloud/types/location_write_response.py +26 -0
- evcloud/types/map_cluster.py +28 -0
- evcloud/types/map_page.py +29 -0
- evcloud/types/network_consumer.py +25 -0
- evcloud/types/network_consumer_page.py +26 -0
- evcloud/types/network_detail_response.py +49 -0
- evcloud/types/network_detail_response_network_type.py +7 -0
- evcloud/types/network_detail_response_network_type_zero.py +5 -0
- evcloud/types/network_detail_response_publish_state.py +7 -0
- evcloud/types/network_detail_response_publish_state_zero.py +7 -0
- evcloud/types/network_page.py +26 -0
- evcloud/types/network_priority_order.py +23 -0
- evcloud/types/network_response.py +46 -0
- evcloud/types/network_response_network_type.py +7 -0
- evcloud/types/network_response_network_type_zero.py +5 -0
- evcloud/types/network_response_publish_state.py +7 -0
- evcloud/types/network_response_publish_state_zero.py +5 -0
- evcloud/types/network_rule_page.py +26 -0
- evcloud/types/network_rule_response.py +33 -0
- evcloud/types/network_rule_response_rule_type.py +7 -0
- evcloud/types/network_rule_response_rule_type_zero.py +5 -0
- evcloud/types/ocpi_business_details.py +26 -0
- evcloud/types/ocpi_business_details_input.py +26 -0
- evcloud/types/ocpi_cdr_dimension.py +24 -0
- evcloud/types/ocpi_cdr_location.py +30 -0
- evcloud/types/ocpi_cdr_token.py +30 -0
- evcloud/types/ocpi_charging_period.py +27 -0
- evcloud/types/ocpi_display_text.py +24 -0
- evcloud/types/ocpi_energy_mix.py +29 -0
- evcloud/types/ocpi_energy_mix_input.py +29 -0
- evcloud/types/ocpi_energy_source.py +24 -0
- evcloud/types/ocpi_energy_source_input.py +24 -0
- evcloud/types/ocpi_environmental_impact.py +24 -0
- evcloud/types/ocpi_evse_parking.py +24 -0
- evcloud/types/ocpi_exceptional_period.py +25 -0
- evcloud/types/ocpi_geo_location.py +24 -0
- evcloud/types/ocpi_geo_location_in.py +24 -0
- evcloud/types/ocpi_image.py +28 -0
- evcloud/types/ocpi_image_input.py +28 -0
- evcloud/types/ocpi_opening_times.py +28 -0
- evcloud/types/ocpi_opening_times_input.py +28 -0
- evcloud/types/ocpi_parking_place.py +44 -0
- evcloud/types/ocpi_parking_place_input.py +44 -0
- evcloud/types/ocpi_price_component_input.py +28 -0
- evcloud/types/ocpi_price_component_input_price.py +5 -0
- evcloud/types/ocpi_price_component_input_vat.py +5 -0
- evcloud/types/ocpi_price_component_output.py +26 -0
- evcloud/types/ocpi_price_input.py +26 -0
- evcloud/types/ocpi_price_input_excl_vat.py +5 -0
- evcloud/types/ocpi_price_input_incl_vat.py +5 -0
- evcloud/types/ocpi_price_output.py +24 -0
- evcloud/types/ocpi_publish_token.py +27 -0
- evcloud/types/ocpi_regular_hours.py +25 -0
- evcloud/types/ocpi_regular_hours_input.py +25 -0
- evcloud/types/ocpi_related_location.py +26 -0
- evcloud/types/ocpi_signed_data.py +28 -0
- evcloud/types/ocpi_signed_value.py +25 -0
- evcloud/types/ocpi_status_schedule.py +26 -0
- evcloud/types/ocpi_tariff_element_input.py +26 -0
- evcloud/types/ocpi_tariff_element_output.py +26 -0
- evcloud/types/ocpi_tariff_restrictions_input.py +33 -0
- evcloud/types/ocpi_tariff_restrictions_input_max_kwh.py +5 -0
- evcloud/types/ocpi_tariff_restrictions_input_min_kwh.py +5 -0
- evcloud/types/ocpi_tariff_restrictions_output.py +31 -0
- evcloud/types/ocpi_tariff_snapshot.py +26 -0
- evcloud/types/ocpp_version.py +5 -0
- evcloud/types/page_info.py +24 -0
- evcloud/types/parking.py +45 -0
- evcloud/types/parking_direction.py +7 -0
- evcloud/types/parking_direction_zero.py +5 -0
- evcloud/types/parking_type.py +8 -0
- evcloud/types/parking_vehicle_types_item.py +7 -0
- evcloud/types/parking_vehicle_types_item_zero.py +18 -0
- evcloud/types/partner_invite_response.py +47 -0
- evcloud/types/partner_invite_response_action.py +5 -0
- evcloud/types/partner_invite_response_role.py +5 -0
- evcloud/types/partner_invite_response_version.py +5 -0
- evcloud/types/partner_invite_revoke_response.py +31 -0
- evcloud/types/partner_invite_revoke_response_role.py +5 -0
- evcloud/types/partner_response.py +41 -0
- evcloud/types/partner_response_ocpi_version.py +5 -0
- evcloud/types/partner_token_updated_event.py +35 -0
- evcloud/types/partner_versions_pull_response.py +29 -0
- evcloud/types/partner_versions_pull_response_code.py +8 -0
- evcloud/types/partner_versions_pull_response_version.py +5 -0
- evcloud/types/power_measurement.py +30 -0
- evcloud/types/power_measurement_event.py +30 -0
- evcloud/types/power_measurement_list.py +24 -0
- evcloud/types/power_type.py +5 -0
- evcloud/types/price_component.py +26 -0
- evcloud/types/price_limit.py +24 -0
- evcloud/types/pricing_mode.py +5 -0
- evcloud/types/queue_health.py +34 -0
- evcloud/types/reservation_cancel_response.py +25 -0
- evcloud/types/resolve_chargers_response_own.py +28 -0
- evcloud/types/resolve_chargers_response_own_ocpi_version.py +7 -0
- evcloud/types/resolve_chargers_response_own_ocpi_version_zero.py +5 -0
- evcloud/types/resolve_chargers_response_roaming.py +30 -0
- evcloud/types/resolve_chargers_response_roaming_ocpi_version.py +7 -0
- evcloud/types/resolve_chargers_response_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/session_event.py +39 -0
- evcloud/types/session_out.py +60 -0
- evcloud/types/session_out_auth_method.py +7 -0
- evcloud/types/session_out_auth_method_zero.py +5 -0
- evcloud/types/session_out_billing_state.py +7 -0
- evcloud/types/session_out_billing_state_zero.py +5 -0
- evcloud/types/session_out_origin.py +7 -0
- evcloud/types/session_out_origin_zero.py +5 -0
- evcloud/types/session_out_status.py +7 -0
- evcloud/types/session_out_status_zero.py +7 -0
- evcloud/types/session_page.py +27 -0
- evcloud/types/session_write_response.py +27 -0
- evcloud/types/sharing_slot.py +25 -0
- evcloud/types/sharing_slot_input.py +25 -0
- evcloud/types/site_type.py +5 -0
- evcloud/types/sync_patch_request.py +26 -0
- evcloud/types/sync_pull_response.py +31 -0
- evcloud/types/sync_push_response.py +31 -0
- evcloud/types/sync_push_response_status.py +5 -0
- evcloud/types/tariff.py +42 -0
- evcloud/types/tariff_assignment_out.py +32 -0
- evcloud/types/tariff_assignment_page.py +27 -0
- evcloud/types/tariff_delete_response.py +26 -0
- evcloud/types/tariff_display.py +27 -0
- evcloud/types/tariff_element.py +26 -0
- evcloud/types/tariff_out.py +57 -0
- evcloud/types/tariff_out_origin.py +7 -0
- evcloud/types/tariff_out_origin_zero.py +5 -0
- evcloud/types/tariff_out_tax_included.py +7 -0
- evcloud/types/tariff_out_tax_included_zero.py +5 -0
- evcloud/types/tariff_out_type.py +7 -0
- evcloud/types/tariff_out_type_zero.py +7 -0
- evcloud/types/tariff_page.py +27 -0
- evcloud/types/tariff_restrictions.py +36 -0
- evcloud/types/tariff_summary.py +29 -0
- evcloud/types/tariff_tax_included.py +7 -0
- evcloud/types/tariff_tax_included_zero.py +5 -0
- evcloud/types/tariff_type.py +7 -0
- evcloud/types/tariff_updated_event.py +29 -0
- evcloud/types/tariff_write_response.py +26 -0
- evcloud/types/tax_included.py +5 -0
- evcloud/types/tenant_profile_out.py +31 -0
- evcloud/types/token_bulk_out.py +26 -0
- evcloud/types/token_create.py +46 -0
- evcloud/types/token_create_default_profile_type.py +5 -0
- evcloud/types/token_create_ocpi_version.py +5 -0
- evcloud/types/token_create_type.py +5 -0
- evcloud/types/token_create_whitelist.py +5 -0
- evcloud/types/token_event_data.py +47 -0
- evcloud/types/token_event_data_status.py +7 -0
- evcloud/types/token_event_data_type.py +5 -0
- evcloud/types/token_event_data_whitelist.py +5 -0
- evcloud/types/token_event_out.py +32 -0
- evcloud/types/token_event_out_event.py +7 -0
- evcloud/types/token_event_out_event_zero.py +7 -0
- evcloud/types/token_event_page.py +26 -0
- evcloud/types/token_failure_item.py +24 -0
- evcloud/types/token_group_action_out.py +27 -0
- evcloud/types/token_group_failure.py +24 -0
- evcloud/types/token_group_member_out.py +26 -0
- evcloud/types/token_group_network_out.py +35 -0
- evcloud/types/token_group_network_page.py +26 -0
- evcloud/types/token_group_out.py +31 -0
- evcloud/types/token_group_page.py +26 -0
- evcloud/types/token_out.py +55 -0
- evcloud/types/token_out_status.py +7 -0
- evcloud/types/token_out_status_zero.py +7 -0
- evcloud/types/token_out_type.py +7 -0
- evcloud/types/token_out_type_zero.py +5 -0
- evcloud/types/token_out_whitelist.py +7 -0
- evcloud/types/token_out_whitelist_zero.py +5 -0
- evcloud/types/token_page.py +26 -0
- evcloud/types/token_reason.py +23 -0
- evcloud/types/token_ref.py +26 -0
- evcloud/types/token_ref_ocpi_version.py +5 -0
- evcloud/types/token_write_response.py +28 -0
- evcloud/types/validation_error.py +28 -0
- evcloud/types/validation_error_loc_item.py +5 -0
- evcloud/types/webhook_delivery_page.py +27 -0
- evcloud/types/webhook_delivery_response.py +35 -0
- evcloud/types/webhook_page.py +27 -0
- evcloud/types/webhook_response.py +42 -0
- evcloud/types/webhook_response_event.py +7 -0
- evcloud/types/webhook_response_event_zero.py +27 -0
- evcloud/types/webhook_response_status.py +7 -0
- evcloud/types/webhook_response_status_zero.py +5 -0
- evcloud/types/webhook_test_result.py +25 -0
- evcloud/types/webhook_with_secret_response.py +43 -0
- evcloud/types/webhook_with_secret_response_event.py +7 -0
- evcloud/types/webhook_with_secret_response_event_zero.py +27 -0
- evcloud/types/webhook_with_secret_response_status.py +7 -0
- evcloud/types/webhook_with_secret_response_status_zero.py +5 -0
- evcloud/version.py +3 -0
- evcloud/webhooks/__init__.py +28 -0
- evcloud/webhooks/client.py +53 -0
- evcloud/webhooks/deliveries/__init__.py +4 -0
- evcloud/webhooks/deliveries/client.py +141 -0
- evcloud/webhooks/deliveries/raw_client.py +268 -0
- evcloud/webhooks/endpoints/__init__.py +17 -0
- evcloud/webhooks/endpoints/client.py +642 -0
- evcloud/webhooks/endpoints/raw_client.py +1521 -0
- evcloud/webhooks/endpoints/types/__init__.py +15 -0
- evcloud/webhooks/endpoints/types/list_endpoints_request_event_types_item.py +27 -0
- evcloud/webhooks/endpoints/types/webhook_create_request_api_version.py +5 -0
- evcloud/webhooks/endpoints/types/webhook_create_request_event.py +27 -0
- evcloud/webhooks/endpoints/types/webhook_update_request_status.py +5 -0
- evcloud/webhooks/event_types/__init__.py +7 -0
- evcloud/webhooks/event_types/client.py +176 -0
- evcloud/webhooks/event_types/raw_client.py +418 -0
- evcloud/webhooks/event_types/types/__init__.py +7 -0
- evcloud/webhooks/event_types/types/get_event_types_request_type.py +27 -0
- evcloud/webhooks/events/__init__.py +7 -0
- evcloud/webhooks/events/client.py +207 -0
- evcloud/webhooks/events/raw_client.py +355 -0
- evcloud/webhooks/events/types/__init__.py +8 -0
- evcloud/webhooks/events/types/deliver_event_request_data.py +33 -0
- evcloud/webhooks/events/types/deliver_event_request_event.py +27 -0
- evcloud/webhooks/health/__init__.py +4 -0
- evcloud/webhooks/health/client.py +161 -0
- evcloud/webhooks/health/raw_client.py +380 -0
- evcloud/webhooks/raw_client.py +13 -0
- evcloud-0.1.0.dist-info/METADATA +257 -0
- evcloud-0.1.0.dist-info/RECORD +635 -0
- evcloud-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1386 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ...core.pagination import AsyncPager, SyncPager
|
|
7
|
+
from ...core.request_options import RequestOptions
|
|
8
|
+
from ...types.availability_page import AvailabilityPage
|
|
9
|
+
from ...types.batch_response import BatchResponse
|
|
10
|
+
from ...types.cluster_page import ClusterPage
|
|
11
|
+
from ...types.emsp_gateway_schema_locations_location_out import EmspGatewaySchemaLocationsLocationOut
|
|
12
|
+
from ...types.emsp_gateway_schema_locations_location_page import EmspGatewaySchemaLocationsLocationPage
|
|
13
|
+
from ...types.facility_page import FacilityPage
|
|
14
|
+
from ...types.location_detail import LocationDetail
|
|
15
|
+
from ...types.location_key_input import LocationKeyInput
|
|
16
|
+
from ...types.location_list import LocationList
|
|
17
|
+
from ...types.map_page import MapPage
|
|
18
|
+
from .raw_client import AsyncRawLocationsClient, RawLocationsClient
|
|
19
|
+
|
|
20
|
+
# this is used as the default value for optional parameters
|
|
21
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class LocationsClient:
|
|
25
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
26
|
+
self._raw_client = RawLocationsClient(client_wrapper=client_wrapper)
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def with_raw_response(self) -> RawLocationsClient:
|
|
30
|
+
"""
|
|
31
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
32
|
+
|
|
33
|
+
Returns
|
|
34
|
+
-------
|
|
35
|
+
RawLocationsClient
|
|
36
|
+
"""
|
|
37
|
+
return self._raw_client
|
|
38
|
+
|
|
39
|
+
def list(
|
|
40
|
+
self,
|
|
41
|
+
*,
|
|
42
|
+
cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
43
|
+
countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
44
|
+
connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
45
|
+
facilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
46
|
+
parking_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
47
|
+
network_id: typing.Optional[int] = None,
|
|
48
|
+
token_group_id: typing.Optional[int] = None,
|
|
49
|
+
bounding_box: typing.Optional[str] = None,
|
|
50
|
+
after: typing.Optional[str] = None,
|
|
51
|
+
limit: typing.Optional[int] = None,
|
|
52
|
+
q: typing.Optional[str] = None,
|
|
53
|
+
lat: typing.Optional[float] = None,
|
|
54
|
+
lon: typing.Optional[float] = None,
|
|
55
|
+
radius_km: typing.Optional[float] = None,
|
|
56
|
+
availability: typing.Optional[bool] = None,
|
|
57
|
+
min_power: typing.Optional[float] = None,
|
|
58
|
+
own: typing.Optional[bool] = None,
|
|
59
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
60
|
+
) -> SyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]:
|
|
61
|
+
"""
|
|
62
|
+
Your own OCPP chargers and roaming CPOs' locations, filtered by area, text, CPO, connector, power, facilities and parking type, optionally scoped to a network or a token group's networks. Each row carries a stable ``uid`` and its ``source`` (``OWN_OCPP`` or ``PARTNER_OCPI``).
|
|
63
|
+
|
|
64
|
+
Parameters
|
|
65
|
+
----------
|
|
66
|
+
cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
67
|
+
Only these CPOs, as ``CC*PID``. Repeat for more than one.
|
|
68
|
+
|
|
69
|
+
countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
70
|
+
ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
|
|
71
|
+
|
|
72
|
+
connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
73
|
+
Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
|
|
74
|
+
|
|
75
|
+
facilities : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
76
|
+
OCPI facilities, e.g. ``CAFE``. A location must list every one. Repeat for more than one.
|
|
77
|
+
|
|
78
|
+
parking_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
79
|
+
OCPI parking types, e.g. ``PARKING_GARAGE``. Any one matches. Repeat for more than one.
|
|
80
|
+
|
|
81
|
+
network_id : typing.Optional[int]
|
|
82
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
83
|
+
|
|
84
|
+
token_group_id : typing.Optional[int]
|
|
85
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
86
|
+
|
|
87
|
+
bounding_box : typing.Optional[str]
|
|
88
|
+
Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
|
|
89
|
+
|
|
90
|
+
after : typing.Optional[str]
|
|
91
|
+
Cursor: the previous page's ``pagination.end_cursor`` (``country_code:party_id:location_id``). Omit it for the first page.
|
|
92
|
+
|
|
93
|
+
limit : typing.Optional[int]
|
|
94
|
+
Maximum rows per page (default 50, max 200).
|
|
95
|
+
|
|
96
|
+
q : typing.Optional[str]
|
|
97
|
+
Text in name, address or city.
|
|
98
|
+
|
|
99
|
+
lat : typing.Optional[float]
|
|
100
|
+
Search centre latitude (WGS84); send with lon.
|
|
101
|
+
|
|
102
|
+
lon : typing.Optional[float]
|
|
103
|
+
Search centre longitude (WGS84); send with lat.
|
|
104
|
+
|
|
105
|
+
radius_km : typing.Optional[float]
|
|
106
|
+
Search radius around lat/lon in km (default 10).
|
|
107
|
+
|
|
108
|
+
availability : typing.Optional[bool]
|
|
109
|
+
Only locations with an EVSE free right now.
|
|
110
|
+
|
|
111
|
+
min_power : typing.Optional[float]
|
|
112
|
+
Minimum connector power in kW.
|
|
113
|
+
|
|
114
|
+
own : typing.Optional[bool]
|
|
115
|
+
true: only your own OCPP chargers. false: only partner (roaming) locations.
|
|
116
|
+
|
|
117
|
+
request_options : typing.Optional[RequestOptions]
|
|
118
|
+
Request-specific configuration.
|
|
119
|
+
|
|
120
|
+
Returns
|
|
121
|
+
-------
|
|
122
|
+
SyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]
|
|
123
|
+
One page of own and partner locations.
|
|
124
|
+
|
|
125
|
+
Examples
|
|
126
|
+
--------
|
|
127
|
+
from evcloud import EvcloudClient
|
|
128
|
+
|
|
129
|
+
client = EvcloudClient(
|
|
130
|
+
token="YOUR_TOKEN",
|
|
131
|
+
)
|
|
132
|
+
response = client.emsp.locations.list(
|
|
133
|
+
limit=50,
|
|
134
|
+
lat=52.37,
|
|
135
|
+
lon=4.89,
|
|
136
|
+
radius_km=5.0,
|
|
137
|
+
availability=True,
|
|
138
|
+
min_power=50.0,
|
|
139
|
+
)
|
|
140
|
+
for item in response:
|
|
141
|
+
yield item
|
|
142
|
+
# alternatively, you can paginate page-by-page
|
|
143
|
+
for page in response.iter_pages():
|
|
144
|
+
yield page
|
|
145
|
+
"""
|
|
146
|
+
return self._raw_client.list(
|
|
147
|
+
cpo_ids=cpo_ids,
|
|
148
|
+
countries=countries,
|
|
149
|
+
connector_types=connector_types,
|
|
150
|
+
facilities=facilities,
|
|
151
|
+
parking_types=parking_types,
|
|
152
|
+
network_id=network_id,
|
|
153
|
+
token_group_id=token_group_id,
|
|
154
|
+
bounding_box=bounding_box,
|
|
155
|
+
after=after,
|
|
156
|
+
limit=limit,
|
|
157
|
+
q=q,
|
|
158
|
+
lat=lat,
|
|
159
|
+
lon=lon,
|
|
160
|
+
radius_km=radius_km,
|
|
161
|
+
availability=availability,
|
|
162
|
+
min_power=min_power,
|
|
163
|
+
own=own,
|
|
164
|
+
request_options=request_options,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
def check_availability(
|
|
168
|
+
self,
|
|
169
|
+
*,
|
|
170
|
+
location_ids: typing.Sequence[str],
|
|
171
|
+
network_id: typing.Optional[int] = OMIT,
|
|
172
|
+
token_group_id: typing.Optional[int] = OMIT,
|
|
173
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
174
|
+
) -> AvailabilityPage:
|
|
175
|
+
"""
|
|
176
|
+
Free and total EVSEs per location. Unknown or out-of-scope ids are left out.
|
|
177
|
+
|
|
178
|
+
Parameters
|
|
179
|
+
----------
|
|
180
|
+
location_ids : typing.Sequence[str]
|
|
181
|
+
|
|
182
|
+
network_id : typing.Optional[int]
|
|
183
|
+
|
|
184
|
+
token_group_id : typing.Optional[int]
|
|
185
|
+
|
|
186
|
+
request_options : typing.Optional[RequestOptions]
|
|
187
|
+
Request-specific configuration.
|
|
188
|
+
|
|
189
|
+
Returns
|
|
190
|
+
-------
|
|
191
|
+
AvailabilityPage
|
|
192
|
+
Availability of each location found.
|
|
193
|
+
|
|
194
|
+
Examples
|
|
195
|
+
--------
|
|
196
|
+
from evcloud import EvcloudClient
|
|
197
|
+
|
|
198
|
+
client = EvcloudClient(
|
|
199
|
+
token="YOUR_TOKEN",
|
|
200
|
+
)
|
|
201
|
+
client.emsp.locations.check_availability(
|
|
202
|
+
location_ids=["LOC-AMS-001", "LOC-AMS-002"],
|
|
203
|
+
)
|
|
204
|
+
"""
|
|
205
|
+
_response = self._raw_client.check_availability(
|
|
206
|
+
location_ids=location_ids,
|
|
207
|
+
network_id=network_id,
|
|
208
|
+
token_group_id=token_group_id,
|
|
209
|
+
request_options=request_options,
|
|
210
|
+
)
|
|
211
|
+
return _response.data
|
|
212
|
+
|
|
213
|
+
def cluster(
|
|
214
|
+
self,
|
|
215
|
+
*,
|
|
216
|
+
zoom_level: int,
|
|
217
|
+
network_id: typing.Optional[int] = None,
|
|
218
|
+
token_group_id: typing.Optional[int] = None,
|
|
219
|
+
bounding_box: typing.Optional[str] = None,
|
|
220
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
221
|
+
) -> ClusterPage:
|
|
222
|
+
"""
|
|
223
|
+
Deprecated: use ``GET /emsp/locations/map``. Kept for one minor version. Groups locations into grid cells sized for the zoom level. A cell lists its location ids when it holds 20 or fewer.
|
|
224
|
+
|
|
225
|
+
Parameters
|
|
226
|
+
----------
|
|
227
|
+
zoom_level : int
|
|
228
|
+
Map zoom level (0 = whole world, 22 = street).
|
|
229
|
+
|
|
230
|
+
network_id : typing.Optional[int]
|
|
231
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
232
|
+
|
|
233
|
+
token_group_id : typing.Optional[int]
|
|
234
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
235
|
+
|
|
236
|
+
bounding_box : typing.Optional[str]
|
|
237
|
+
Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
|
|
238
|
+
|
|
239
|
+
request_options : typing.Optional[RequestOptions]
|
|
240
|
+
Request-specific configuration.
|
|
241
|
+
|
|
242
|
+
Returns
|
|
243
|
+
-------
|
|
244
|
+
ClusterPage
|
|
245
|
+
The map cells that hold locations.
|
|
246
|
+
|
|
247
|
+
Examples
|
|
248
|
+
--------
|
|
249
|
+
from evcloud import EvcloudClient
|
|
250
|
+
|
|
251
|
+
client = EvcloudClient(
|
|
252
|
+
token="YOUR_TOKEN",
|
|
253
|
+
)
|
|
254
|
+
client.emsp.locations.cluster(
|
|
255
|
+
zoom_level=7,
|
|
256
|
+
bounding_box="3.3,50.7,7.2,53.6",
|
|
257
|
+
)
|
|
258
|
+
"""
|
|
259
|
+
_response = self._raw_client.cluster(
|
|
260
|
+
zoom_level=zoom_level,
|
|
261
|
+
network_id=network_id,
|
|
262
|
+
token_group_id=token_group_id,
|
|
263
|
+
bounding_box=bounding_box,
|
|
264
|
+
request_options=request_options,
|
|
265
|
+
)
|
|
266
|
+
return _response.data
|
|
267
|
+
|
|
268
|
+
def list_facilities(
|
|
269
|
+
self,
|
|
270
|
+
*,
|
|
271
|
+
countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
272
|
+
network_id: typing.Optional[int] = None,
|
|
273
|
+
token_group_id: typing.Optional[int] = None,
|
|
274
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
275
|
+
) -> FacilityPage:
|
|
276
|
+
"""
|
|
277
|
+
Each OCPI facility present, with how many locations have it, most common first.
|
|
278
|
+
|
|
279
|
+
Parameters
|
|
280
|
+
----------
|
|
281
|
+
countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
282
|
+
ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
|
|
283
|
+
|
|
284
|
+
network_id : typing.Optional[int]
|
|
285
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
286
|
+
|
|
287
|
+
token_group_id : typing.Optional[int]
|
|
288
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
289
|
+
|
|
290
|
+
request_options : typing.Optional[RequestOptions]
|
|
291
|
+
Request-specific configuration.
|
|
292
|
+
|
|
293
|
+
Returns
|
|
294
|
+
-------
|
|
295
|
+
FacilityPage
|
|
296
|
+
Facility counts, most common first.
|
|
297
|
+
|
|
298
|
+
Examples
|
|
299
|
+
--------
|
|
300
|
+
from evcloud import EvcloudClient
|
|
301
|
+
|
|
302
|
+
client = EvcloudClient(
|
|
303
|
+
token="YOUR_TOKEN",
|
|
304
|
+
)
|
|
305
|
+
client.emsp.locations.list_facilities(
|
|
306
|
+
network_id=21,
|
|
307
|
+
)
|
|
308
|
+
"""
|
|
309
|
+
_response = self._raw_client.list_facilities(
|
|
310
|
+
countries=countries, network_id=network_id, token_group_id=token_group_id, request_options=request_options
|
|
311
|
+
)
|
|
312
|
+
return _response.data
|
|
313
|
+
|
|
314
|
+
def map_(
|
|
315
|
+
self,
|
|
316
|
+
*,
|
|
317
|
+
bbox: str,
|
|
318
|
+
zoom: int,
|
|
319
|
+
connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
320
|
+
cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
321
|
+
network_id: typing.Optional[int] = None,
|
|
322
|
+
token_group_id: typing.Optional[int] = None,
|
|
323
|
+
min_power: typing.Optional[float] = None,
|
|
324
|
+
available_only: typing.Optional[bool] = None,
|
|
325
|
+
own: typing.Optional[bool] = None,
|
|
326
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
327
|
+
) -> MapPage:
|
|
328
|
+
"""
|
|
329
|
+
Pins (up to 500 location summaries) when ``zoom`` >= 13 or the box holds 500 locations or fewer; otherwise clusters on web-mercator tiles. ``tile_versions`` change when a tile's content changes. Answers are cached for a few seconds per workspace and query.
|
|
330
|
+
|
|
331
|
+
Parameters
|
|
332
|
+
----------
|
|
333
|
+
bbox : str
|
|
334
|
+
The viewport as ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
|
|
335
|
+
|
|
336
|
+
zoom : int
|
|
337
|
+
Map zoom level (0 = whole world, 22 = street).
|
|
338
|
+
|
|
339
|
+
connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
340
|
+
Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
|
|
341
|
+
|
|
342
|
+
cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
343
|
+
Only these CPOs, as ``CC*PID``. Repeat for more than one.
|
|
344
|
+
|
|
345
|
+
network_id : typing.Optional[int]
|
|
346
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
347
|
+
|
|
348
|
+
token_group_id : typing.Optional[int]
|
|
349
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
350
|
+
|
|
351
|
+
min_power : typing.Optional[float]
|
|
352
|
+
Minimum connector power in kW.
|
|
353
|
+
|
|
354
|
+
available_only : typing.Optional[bool]
|
|
355
|
+
Only locations with an EVSE free right now.
|
|
356
|
+
|
|
357
|
+
own : typing.Optional[bool]
|
|
358
|
+
true: only your own OCPP chargers. false: only partner (roaming) locations.
|
|
359
|
+
|
|
360
|
+
request_options : typing.Optional[RequestOptions]
|
|
361
|
+
Request-specific configuration.
|
|
362
|
+
|
|
363
|
+
Returns
|
|
364
|
+
-------
|
|
365
|
+
MapPage
|
|
366
|
+
Clusters (zoomed out) or pins (zoomed in) for the viewport.
|
|
367
|
+
|
|
368
|
+
Examples
|
|
369
|
+
--------
|
|
370
|
+
from evcloud import EvcloudClient
|
|
371
|
+
|
|
372
|
+
client = EvcloudClient(
|
|
373
|
+
token="YOUR_TOKEN",
|
|
374
|
+
)
|
|
375
|
+
client.emsp.locations.map_(
|
|
376
|
+
bbox="4.7,52.2,5.0,52.5",
|
|
377
|
+
zoom=11,
|
|
378
|
+
available_only=True,
|
|
379
|
+
)
|
|
380
|
+
"""
|
|
381
|
+
_response = self._raw_client.map_(
|
|
382
|
+
bbox=bbox,
|
|
383
|
+
zoom=zoom,
|
|
384
|
+
connector_types=connector_types,
|
|
385
|
+
cpo_ids=cpo_ids,
|
|
386
|
+
network_id=network_id,
|
|
387
|
+
token_group_id=token_group_id,
|
|
388
|
+
min_power=min_power,
|
|
389
|
+
available_only=available_only,
|
|
390
|
+
own=own,
|
|
391
|
+
request_options=request_options,
|
|
392
|
+
)
|
|
393
|
+
return _response.data
|
|
394
|
+
|
|
395
|
+
def search(
|
|
396
|
+
self,
|
|
397
|
+
*,
|
|
398
|
+
q: typing.Optional[str] = None,
|
|
399
|
+
evse_id: typing.Optional[str] = None,
|
|
400
|
+
lat: typing.Optional[float] = None,
|
|
401
|
+
lon: typing.Optional[float] = None,
|
|
402
|
+
limit: typing.Optional[int] = None,
|
|
403
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
404
|
+
) -> LocationList:
|
|
405
|
+
"""
|
|
406
|
+
Text search on name, address and city (``q``), EVSE id lookup (``evse_id``, as printed on the QR code; ``*`` and case are ignored), or both. Nearest first when ``lat`` and ``lon`` are given. Returns at most ``limit`` matches with no next page: refine the query to narrow it.
|
|
407
|
+
|
|
408
|
+
Parameters
|
|
409
|
+
----------
|
|
410
|
+
q : typing.Optional[str]
|
|
411
|
+
Text in name, address or city.
|
|
412
|
+
|
|
413
|
+
evse_id : typing.Optional[str]
|
|
414
|
+
eMI3 EVSE id as printed on the QR code, e.g. ``NL*ABC*E1001*1``.
|
|
415
|
+
|
|
416
|
+
lat : typing.Optional[float]
|
|
417
|
+
Your latitude (WGS84); send with lon.
|
|
418
|
+
|
|
419
|
+
lon : typing.Optional[float]
|
|
420
|
+
Your longitude (WGS84); send with lat.
|
|
421
|
+
|
|
422
|
+
limit : typing.Optional[int]
|
|
423
|
+
Maximum results (default 10, max 50).
|
|
424
|
+
|
|
425
|
+
request_options : typing.Optional[RequestOptions]
|
|
426
|
+
Request-specific configuration.
|
|
427
|
+
|
|
428
|
+
Returns
|
|
429
|
+
-------
|
|
430
|
+
LocationList
|
|
431
|
+
Matching locations, nearest first when lat/lon are given.
|
|
432
|
+
|
|
433
|
+
Examples
|
|
434
|
+
--------
|
|
435
|
+
from evcloud import EvcloudClient
|
|
436
|
+
|
|
437
|
+
client = EvcloudClient(
|
|
438
|
+
token="YOUR_TOKEN",
|
|
439
|
+
)
|
|
440
|
+
client.emsp.locations.search(
|
|
441
|
+
evse_id="NL*ABC*E1001*1",
|
|
442
|
+
lat=52.37,
|
|
443
|
+
lon=4.89,
|
|
444
|
+
)
|
|
445
|
+
"""
|
|
446
|
+
_response = self._raw_client.search(
|
|
447
|
+
q=q, evse_id=evse_id, lat=lat, lon=lon, limit=limit, request_options=request_options
|
|
448
|
+
)
|
|
449
|
+
return _response.data
|
|
450
|
+
|
|
451
|
+
def route(
|
|
452
|
+
self,
|
|
453
|
+
*,
|
|
454
|
+
polyline: str,
|
|
455
|
+
connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
456
|
+
cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
457
|
+
buffer_km: typing.Optional[float] = None,
|
|
458
|
+
limit: typing.Optional[int] = None,
|
|
459
|
+
network_id: typing.Optional[int] = None,
|
|
460
|
+
token_group_id: typing.Optional[int] = None,
|
|
461
|
+
min_power: typing.Optional[float] = None,
|
|
462
|
+
available_only: typing.Optional[bool] = None,
|
|
463
|
+
own: typing.Optional[bool] = None,
|
|
464
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
465
|
+
) -> LocationList:
|
|
466
|
+
"""
|
|
467
|
+
Locations within ``buffer_km`` of an encoded polyline (Google format, precision 5), in order along the route. Same filters as the map. Returns at most ``limit`` locations with no next page: shorten the route or ``buffer_km`` to narrow it.
|
|
468
|
+
|
|
469
|
+
Parameters
|
|
470
|
+
----------
|
|
471
|
+
polyline : str
|
|
472
|
+
The route as a Google encoded polyline, precision 5.
|
|
473
|
+
|
|
474
|
+
connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
475
|
+
Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
|
|
476
|
+
|
|
477
|
+
cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
478
|
+
Only these CPOs, as ``CC*PID``. Repeat for more than one.
|
|
479
|
+
|
|
480
|
+
buffer_km : typing.Optional[float]
|
|
481
|
+
Distance from the route in km (default 2, max 20).
|
|
482
|
+
|
|
483
|
+
limit : typing.Optional[int]
|
|
484
|
+
Maximum results (default 50, max 200).
|
|
485
|
+
|
|
486
|
+
network_id : typing.Optional[int]
|
|
487
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
488
|
+
|
|
489
|
+
token_group_id : typing.Optional[int]
|
|
490
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
491
|
+
|
|
492
|
+
min_power : typing.Optional[float]
|
|
493
|
+
Minimum connector power in kW.
|
|
494
|
+
|
|
495
|
+
available_only : typing.Optional[bool]
|
|
496
|
+
Only locations with an EVSE free right now.
|
|
497
|
+
|
|
498
|
+
own : typing.Optional[bool]
|
|
499
|
+
true: only your own OCPP chargers. false: only partner (roaming) locations.
|
|
500
|
+
|
|
501
|
+
request_options : typing.Optional[RequestOptions]
|
|
502
|
+
Request-specific configuration.
|
|
503
|
+
|
|
504
|
+
Returns
|
|
505
|
+
-------
|
|
506
|
+
LocationList
|
|
507
|
+
Locations near the route, in order along it.
|
|
508
|
+
|
|
509
|
+
Examples
|
|
510
|
+
--------
|
|
511
|
+
from evcloud import EvcloudClient
|
|
512
|
+
|
|
513
|
+
client = EvcloudClient(
|
|
514
|
+
token="YOUR_TOKEN",
|
|
515
|
+
)
|
|
516
|
+
client.emsp.locations.route(
|
|
517
|
+
polyline="_p~iF~ps|U_ulLnnqC_mqNvxq`@",
|
|
518
|
+
buffer_km=2.0,
|
|
519
|
+
min_power=50.0,
|
|
520
|
+
)
|
|
521
|
+
"""
|
|
522
|
+
_response = self._raw_client.route(
|
|
523
|
+
polyline=polyline,
|
|
524
|
+
connector_types=connector_types,
|
|
525
|
+
cpo_ids=cpo_ids,
|
|
526
|
+
buffer_km=buffer_km,
|
|
527
|
+
limit=limit,
|
|
528
|
+
network_id=network_id,
|
|
529
|
+
token_group_id=token_group_id,
|
|
530
|
+
min_power=min_power,
|
|
531
|
+
available_only=available_only,
|
|
532
|
+
own=own,
|
|
533
|
+
request_options=request_options,
|
|
534
|
+
)
|
|
535
|
+
return _response.data
|
|
536
|
+
|
|
537
|
+
def batch(
|
|
538
|
+
self,
|
|
539
|
+
*,
|
|
540
|
+
keys: typing.Optional[typing.Sequence[LocationKeyInput]] = OMIT,
|
|
541
|
+
uids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
542
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
543
|
+
) -> BatchResponse:
|
|
544
|
+
"""
|
|
545
|
+
Up to 500 locations by OCPI key or by ``uid`` (one of the two). Keys or uids that are unknown or out of scope come back in ``missing``.
|
|
546
|
+
|
|
547
|
+
Parameters
|
|
548
|
+
----------
|
|
549
|
+
keys : typing.Optional[typing.Sequence[LocationKeyInput]]
|
|
550
|
+
|
|
551
|
+
uids : typing.Optional[typing.Sequence[str]]
|
|
552
|
+
|
|
553
|
+
request_options : typing.Optional[RequestOptions]
|
|
554
|
+
Request-specific configuration.
|
|
555
|
+
|
|
556
|
+
Returns
|
|
557
|
+
-------
|
|
558
|
+
BatchResponse
|
|
559
|
+
The locations found, and the keys or uids that were not.
|
|
560
|
+
|
|
561
|
+
Examples
|
|
562
|
+
--------
|
|
563
|
+
from evcloud import EvcloudClient, LocationKeyInput
|
|
564
|
+
|
|
565
|
+
client = EvcloudClient(
|
|
566
|
+
token="YOUR_TOKEN",
|
|
567
|
+
)
|
|
568
|
+
client.emsp.locations.batch(
|
|
569
|
+
keys=[
|
|
570
|
+
LocationKeyInput(
|
|
571
|
+
country_code="NL",
|
|
572
|
+
party_id="ABC",
|
|
573
|
+
location_id="LOC-AMS-001",
|
|
574
|
+
),
|
|
575
|
+
LocationKeyInput(
|
|
576
|
+
country_code="NL",
|
|
577
|
+
party_id="ABC",
|
|
578
|
+
location_id="LOC-GONE",
|
|
579
|
+
),
|
|
580
|
+
],
|
|
581
|
+
)
|
|
582
|
+
"""
|
|
583
|
+
_response = self._raw_client.batch(keys=keys, uids=uids, request_options=request_options)
|
|
584
|
+
return _response.data
|
|
585
|
+
|
|
586
|
+
def get_by_uid(self, uid: str, *, request_options: typing.Optional[RequestOptions] = None) -> LocationDetail:
|
|
587
|
+
"""
|
|
588
|
+
One location with its EVSEs, connectors and tariff summary, by its stable ``uid``.
|
|
589
|
+
|
|
590
|
+
Parameters
|
|
591
|
+
----------
|
|
592
|
+
uid : str
|
|
593
|
+
The location's stable ``uid``.
|
|
594
|
+
|
|
595
|
+
request_options : typing.Optional[RequestOptions]
|
|
596
|
+
Request-specific configuration.
|
|
597
|
+
|
|
598
|
+
Returns
|
|
599
|
+
-------
|
|
600
|
+
LocationDetail
|
|
601
|
+
The location with its EVSEs, connectors and tariff summary.
|
|
602
|
+
|
|
603
|
+
Examples
|
|
604
|
+
--------
|
|
605
|
+
from evcloud import EvcloudClient
|
|
606
|
+
|
|
607
|
+
client = EvcloudClient(
|
|
608
|
+
token="YOUR_TOKEN",
|
|
609
|
+
)
|
|
610
|
+
client.emsp.locations.get_by_uid(
|
|
611
|
+
uid="3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f0b7c34",
|
|
612
|
+
)
|
|
613
|
+
"""
|
|
614
|
+
_response = self._raw_client.get_by_uid(uid, request_options=request_options)
|
|
615
|
+
return _response.data
|
|
616
|
+
|
|
617
|
+
def get(
|
|
618
|
+
self,
|
|
619
|
+
location_id: str,
|
|
620
|
+
*,
|
|
621
|
+
country_code: str,
|
|
622
|
+
party_id: str,
|
|
623
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
624
|
+
) -> LocationDetail:
|
|
625
|
+
"""
|
|
626
|
+
One own or partner location with its EVSEs, connectors and tariff summary, addressed by the CPO's country code and party id.
|
|
627
|
+
|
|
628
|
+
Parameters
|
|
629
|
+
----------
|
|
630
|
+
location_id : str
|
|
631
|
+
OCPI location id.
|
|
632
|
+
|
|
633
|
+
country_code : str
|
|
634
|
+
The CPO's OCPI country code, e.g. NL.
|
|
635
|
+
|
|
636
|
+
party_id : str
|
|
637
|
+
The CPO's OCPI party id, e.g. ABC.
|
|
638
|
+
|
|
639
|
+
request_options : typing.Optional[RequestOptions]
|
|
640
|
+
Request-specific configuration.
|
|
641
|
+
|
|
642
|
+
Returns
|
|
643
|
+
-------
|
|
644
|
+
LocationDetail
|
|
645
|
+
The location with its EVSEs, connectors and tariff summary.
|
|
646
|
+
|
|
647
|
+
Examples
|
|
648
|
+
--------
|
|
649
|
+
from evcloud import EvcloudClient
|
|
650
|
+
|
|
651
|
+
client = EvcloudClient(
|
|
652
|
+
token="YOUR_TOKEN",
|
|
653
|
+
)
|
|
654
|
+
client.emsp.locations.get(
|
|
655
|
+
location_id="LOC-AMS-001",
|
|
656
|
+
country_code="NL",
|
|
657
|
+
party_id="ABC",
|
|
658
|
+
)
|
|
659
|
+
"""
|
|
660
|
+
_response = self._raw_client.get(
|
|
661
|
+
location_id, country_code=country_code, party_id=party_id, request_options=request_options
|
|
662
|
+
)
|
|
663
|
+
return _response.data
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
class AsyncLocationsClient:
|
|
667
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
668
|
+
self._raw_client = AsyncRawLocationsClient(client_wrapper=client_wrapper)
|
|
669
|
+
|
|
670
|
+
@property
|
|
671
|
+
def with_raw_response(self) -> AsyncRawLocationsClient:
|
|
672
|
+
"""
|
|
673
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
674
|
+
|
|
675
|
+
Returns
|
|
676
|
+
-------
|
|
677
|
+
AsyncRawLocationsClient
|
|
678
|
+
"""
|
|
679
|
+
return self._raw_client
|
|
680
|
+
|
|
681
|
+
async def list(
|
|
682
|
+
self,
|
|
683
|
+
*,
|
|
684
|
+
cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
685
|
+
countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
686
|
+
connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
687
|
+
facilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
688
|
+
parking_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
689
|
+
network_id: typing.Optional[int] = None,
|
|
690
|
+
token_group_id: typing.Optional[int] = None,
|
|
691
|
+
bounding_box: typing.Optional[str] = None,
|
|
692
|
+
after: typing.Optional[str] = None,
|
|
693
|
+
limit: typing.Optional[int] = None,
|
|
694
|
+
q: typing.Optional[str] = None,
|
|
695
|
+
lat: typing.Optional[float] = None,
|
|
696
|
+
lon: typing.Optional[float] = None,
|
|
697
|
+
radius_km: typing.Optional[float] = None,
|
|
698
|
+
availability: typing.Optional[bool] = None,
|
|
699
|
+
min_power: typing.Optional[float] = None,
|
|
700
|
+
own: typing.Optional[bool] = None,
|
|
701
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
702
|
+
) -> AsyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]:
|
|
703
|
+
"""
|
|
704
|
+
Your own OCPP chargers and roaming CPOs' locations, filtered by area, text, CPO, connector, power, facilities and parking type, optionally scoped to a network or a token group's networks. Each row carries a stable ``uid`` and its ``source`` (``OWN_OCPP`` or ``PARTNER_OCPI``).
|
|
705
|
+
|
|
706
|
+
Parameters
|
|
707
|
+
----------
|
|
708
|
+
cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
709
|
+
Only these CPOs, as ``CC*PID``. Repeat for more than one.
|
|
710
|
+
|
|
711
|
+
countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
712
|
+
ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
|
|
713
|
+
|
|
714
|
+
connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
715
|
+
Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
|
|
716
|
+
|
|
717
|
+
facilities : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
718
|
+
OCPI facilities, e.g. ``CAFE``. A location must list every one. Repeat for more than one.
|
|
719
|
+
|
|
720
|
+
parking_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
721
|
+
OCPI parking types, e.g. ``PARKING_GARAGE``. Any one matches. Repeat for more than one.
|
|
722
|
+
|
|
723
|
+
network_id : typing.Optional[int]
|
|
724
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
725
|
+
|
|
726
|
+
token_group_id : typing.Optional[int]
|
|
727
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
728
|
+
|
|
729
|
+
bounding_box : typing.Optional[str]
|
|
730
|
+
Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
|
|
731
|
+
|
|
732
|
+
after : typing.Optional[str]
|
|
733
|
+
Cursor: the previous page's ``pagination.end_cursor`` (``country_code:party_id:location_id``). Omit it for the first page.
|
|
734
|
+
|
|
735
|
+
limit : typing.Optional[int]
|
|
736
|
+
Maximum rows per page (default 50, max 200).
|
|
737
|
+
|
|
738
|
+
q : typing.Optional[str]
|
|
739
|
+
Text in name, address or city.
|
|
740
|
+
|
|
741
|
+
lat : typing.Optional[float]
|
|
742
|
+
Search centre latitude (WGS84); send with lon.
|
|
743
|
+
|
|
744
|
+
lon : typing.Optional[float]
|
|
745
|
+
Search centre longitude (WGS84); send with lat.
|
|
746
|
+
|
|
747
|
+
radius_km : typing.Optional[float]
|
|
748
|
+
Search radius around lat/lon in km (default 10).
|
|
749
|
+
|
|
750
|
+
availability : typing.Optional[bool]
|
|
751
|
+
Only locations with an EVSE free right now.
|
|
752
|
+
|
|
753
|
+
min_power : typing.Optional[float]
|
|
754
|
+
Minimum connector power in kW.
|
|
755
|
+
|
|
756
|
+
own : typing.Optional[bool]
|
|
757
|
+
true: only your own OCPP chargers. false: only partner (roaming) locations.
|
|
758
|
+
|
|
759
|
+
request_options : typing.Optional[RequestOptions]
|
|
760
|
+
Request-specific configuration.
|
|
761
|
+
|
|
762
|
+
Returns
|
|
763
|
+
-------
|
|
764
|
+
AsyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]
|
|
765
|
+
One page of own and partner locations.
|
|
766
|
+
|
|
767
|
+
Examples
|
|
768
|
+
--------
|
|
769
|
+
import asyncio
|
|
770
|
+
|
|
771
|
+
from evcloud import AsyncEvcloudClient
|
|
772
|
+
|
|
773
|
+
client = AsyncEvcloudClient(
|
|
774
|
+
token="YOUR_TOKEN",
|
|
775
|
+
)
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
async def main() -> None:
|
|
779
|
+
response = await client.emsp.locations.list(
|
|
780
|
+
limit=50,
|
|
781
|
+
lat=52.37,
|
|
782
|
+
lon=4.89,
|
|
783
|
+
radius_km=5.0,
|
|
784
|
+
availability=True,
|
|
785
|
+
min_power=50.0,
|
|
786
|
+
)
|
|
787
|
+
async for item in response:
|
|
788
|
+
yield item
|
|
789
|
+
|
|
790
|
+
# alternatively, you can paginate page-by-page
|
|
791
|
+
async for page in response.iter_pages():
|
|
792
|
+
yield page
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
asyncio.run(main())
|
|
796
|
+
"""
|
|
797
|
+
return await self._raw_client.list(
|
|
798
|
+
cpo_ids=cpo_ids,
|
|
799
|
+
countries=countries,
|
|
800
|
+
connector_types=connector_types,
|
|
801
|
+
facilities=facilities,
|
|
802
|
+
parking_types=parking_types,
|
|
803
|
+
network_id=network_id,
|
|
804
|
+
token_group_id=token_group_id,
|
|
805
|
+
bounding_box=bounding_box,
|
|
806
|
+
after=after,
|
|
807
|
+
limit=limit,
|
|
808
|
+
q=q,
|
|
809
|
+
lat=lat,
|
|
810
|
+
lon=lon,
|
|
811
|
+
radius_km=radius_km,
|
|
812
|
+
availability=availability,
|
|
813
|
+
min_power=min_power,
|
|
814
|
+
own=own,
|
|
815
|
+
request_options=request_options,
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
async def check_availability(
|
|
819
|
+
self,
|
|
820
|
+
*,
|
|
821
|
+
location_ids: typing.Sequence[str],
|
|
822
|
+
network_id: typing.Optional[int] = OMIT,
|
|
823
|
+
token_group_id: typing.Optional[int] = OMIT,
|
|
824
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
825
|
+
) -> AvailabilityPage:
|
|
826
|
+
"""
|
|
827
|
+
Free and total EVSEs per location. Unknown or out-of-scope ids are left out.
|
|
828
|
+
|
|
829
|
+
Parameters
|
|
830
|
+
----------
|
|
831
|
+
location_ids : typing.Sequence[str]
|
|
832
|
+
|
|
833
|
+
network_id : typing.Optional[int]
|
|
834
|
+
|
|
835
|
+
token_group_id : typing.Optional[int]
|
|
836
|
+
|
|
837
|
+
request_options : typing.Optional[RequestOptions]
|
|
838
|
+
Request-specific configuration.
|
|
839
|
+
|
|
840
|
+
Returns
|
|
841
|
+
-------
|
|
842
|
+
AvailabilityPage
|
|
843
|
+
Availability of each location found.
|
|
844
|
+
|
|
845
|
+
Examples
|
|
846
|
+
--------
|
|
847
|
+
import asyncio
|
|
848
|
+
|
|
849
|
+
from evcloud import AsyncEvcloudClient
|
|
850
|
+
|
|
851
|
+
client = AsyncEvcloudClient(
|
|
852
|
+
token="YOUR_TOKEN",
|
|
853
|
+
)
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
async def main() -> None:
|
|
857
|
+
await client.emsp.locations.check_availability(
|
|
858
|
+
location_ids=["LOC-AMS-001", "LOC-AMS-002"],
|
|
859
|
+
)
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
asyncio.run(main())
|
|
863
|
+
"""
|
|
864
|
+
_response = await self._raw_client.check_availability(
|
|
865
|
+
location_ids=location_ids,
|
|
866
|
+
network_id=network_id,
|
|
867
|
+
token_group_id=token_group_id,
|
|
868
|
+
request_options=request_options,
|
|
869
|
+
)
|
|
870
|
+
return _response.data
|
|
871
|
+
|
|
872
|
+
async def cluster(
|
|
873
|
+
self,
|
|
874
|
+
*,
|
|
875
|
+
zoom_level: int,
|
|
876
|
+
network_id: typing.Optional[int] = None,
|
|
877
|
+
token_group_id: typing.Optional[int] = None,
|
|
878
|
+
bounding_box: typing.Optional[str] = None,
|
|
879
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
880
|
+
) -> ClusterPage:
|
|
881
|
+
"""
|
|
882
|
+
Deprecated: use ``GET /emsp/locations/map``. Kept for one minor version. Groups locations into grid cells sized for the zoom level. A cell lists its location ids when it holds 20 or fewer.
|
|
883
|
+
|
|
884
|
+
Parameters
|
|
885
|
+
----------
|
|
886
|
+
zoom_level : int
|
|
887
|
+
Map zoom level (0 = whole world, 22 = street).
|
|
888
|
+
|
|
889
|
+
network_id : typing.Optional[int]
|
|
890
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
891
|
+
|
|
892
|
+
token_group_id : typing.Optional[int]
|
|
893
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
894
|
+
|
|
895
|
+
bounding_box : typing.Optional[str]
|
|
896
|
+
Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
|
|
897
|
+
|
|
898
|
+
request_options : typing.Optional[RequestOptions]
|
|
899
|
+
Request-specific configuration.
|
|
900
|
+
|
|
901
|
+
Returns
|
|
902
|
+
-------
|
|
903
|
+
ClusterPage
|
|
904
|
+
The map cells that hold locations.
|
|
905
|
+
|
|
906
|
+
Examples
|
|
907
|
+
--------
|
|
908
|
+
import asyncio
|
|
909
|
+
|
|
910
|
+
from evcloud import AsyncEvcloudClient
|
|
911
|
+
|
|
912
|
+
client = AsyncEvcloudClient(
|
|
913
|
+
token="YOUR_TOKEN",
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
async def main() -> None:
|
|
918
|
+
await client.emsp.locations.cluster(
|
|
919
|
+
zoom_level=7,
|
|
920
|
+
bounding_box="3.3,50.7,7.2,53.6",
|
|
921
|
+
)
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
asyncio.run(main())
|
|
925
|
+
"""
|
|
926
|
+
_response = await self._raw_client.cluster(
|
|
927
|
+
zoom_level=zoom_level,
|
|
928
|
+
network_id=network_id,
|
|
929
|
+
token_group_id=token_group_id,
|
|
930
|
+
bounding_box=bounding_box,
|
|
931
|
+
request_options=request_options,
|
|
932
|
+
)
|
|
933
|
+
return _response.data
|
|
934
|
+
|
|
935
|
+
async def list_facilities(
|
|
936
|
+
self,
|
|
937
|
+
*,
|
|
938
|
+
countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
939
|
+
network_id: typing.Optional[int] = None,
|
|
940
|
+
token_group_id: typing.Optional[int] = None,
|
|
941
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
942
|
+
) -> FacilityPage:
|
|
943
|
+
"""
|
|
944
|
+
Each OCPI facility present, with how many locations have it, most common first.
|
|
945
|
+
|
|
946
|
+
Parameters
|
|
947
|
+
----------
|
|
948
|
+
countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
949
|
+
ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
|
|
950
|
+
|
|
951
|
+
network_id : typing.Optional[int]
|
|
952
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
953
|
+
|
|
954
|
+
token_group_id : typing.Optional[int]
|
|
955
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
956
|
+
|
|
957
|
+
request_options : typing.Optional[RequestOptions]
|
|
958
|
+
Request-specific configuration.
|
|
959
|
+
|
|
960
|
+
Returns
|
|
961
|
+
-------
|
|
962
|
+
FacilityPage
|
|
963
|
+
Facility counts, most common first.
|
|
964
|
+
|
|
965
|
+
Examples
|
|
966
|
+
--------
|
|
967
|
+
import asyncio
|
|
968
|
+
|
|
969
|
+
from evcloud import AsyncEvcloudClient
|
|
970
|
+
|
|
971
|
+
client = AsyncEvcloudClient(
|
|
972
|
+
token="YOUR_TOKEN",
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
async def main() -> None:
|
|
977
|
+
await client.emsp.locations.list_facilities(
|
|
978
|
+
network_id=21,
|
|
979
|
+
)
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
asyncio.run(main())
|
|
983
|
+
"""
|
|
984
|
+
_response = await self._raw_client.list_facilities(
|
|
985
|
+
countries=countries, network_id=network_id, token_group_id=token_group_id, request_options=request_options
|
|
986
|
+
)
|
|
987
|
+
return _response.data
|
|
988
|
+
|
|
989
|
+
async def map_(
|
|
990
|
+
self,
|
|
991
|
+
*,
|
|
992
|
+
bbox: str,
|
|
993
|
+
zoom: int,
|
|
994
|
+
connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
995
|
+
cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
996
|
+
network_id: typing.Optional[int] = None,
|
|
997
|
+
token_group_id: typing.Optional[int] = None,
|
|
998
|
+
min_power: typing.Optional[float] = None,
|
|
999
|
+
available_only: typing.Optional[bool] = None,
|
|
1000
|
+
own: typing.Optional[bool] = None,
|
|
1001
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1002
|
+
) -> MapPage:
|
|
1003
|
+
"""
|
|
1004
|
+
Pins (up to 500 location summaries) when ``zoom`` >= 13 or the box holds 500 locations or fewer; otherwise clusters on web-mercator tiles. ``tile_versions`` change when a tile's content changes. Answers are cached for a few seconds per workspace and query.
|
|
1005
|
+
|
|
1006
|
+
Parameters
|
|
1007
|
+
----------
|
|
1008
|
+
bbox : str
|
|
1009
|
+
The viewport as ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
|
|
1010
|
+
|
|
1011
|
+
zoom : int
|
|
1012
|
+
Map zoom level (0 = whole world, 22 = street).
|
|
1013
|
+
|
|
1014
|
+
connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1015
|
+
Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
|
|
1016
|
+
|
|
1017
|
+
cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1018
|
+
Only these CPOs, as ``CC*PID``. Repeat for more than one.
|
|
1019
|
+
|
|
1020
|
+
network_id : typing.Optional[int]
|
|
1021
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
1022
|
+
|
|
1023
|
+
token_group_id : typing.Optional[int]
|
|
1024
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
1025
|
+
|
|
1026
|
+
min_power : typing.Optional[float]
|
|
1027
|
+
Minimum connector power in kW.
|
|
1028
|
+
|
|
1029
|
+
available_only : typing.Optional[bool]
|
|
1030
|
+
Only locations with an EVSE free right now.
|
|
1031
|
+
|
|
1032
|
+
own : typing.Optional[bool]
|
|
1033
|
+
true: only your own OCPP chargers. false: only partner (roaming) locations.
|
|
1034
|
+
|
|
1035
|
+
request_options : typing.Optional[RequestOptions]
|
|
1036
|
+
Request-specific configuration.
|
|
1037
|
+
|
|
1038
|
+
Returns
|
|
1039
|
+
-------
|
|
1040
|
+
MapPage
|
|
1041
|
+
Clusters (zoomed out) or pins (zoomed in) for the viewport.
|
|
1042
|
+
|
|
1043
|
+
Examples
|
|
1044
|
+
--------
|
|
1045
|
+
import asyncio
|
|
1046
|
+
|
|
1047
|
+
from evcloud import AsyncEvcloudClient
|
|
1048
|
+
|
|
1049
|
+
client = AsyncEvcloudClient(
|
|
1050
|
+
token="YOUR_TOKEN",
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
async def main() -> None:
|
|
1055
|
+
await client.emsp.locations.map_(
|
|
1056
|
+
bbox="4.7,52.2,5.0,52.5",
|
|
1057
|
+
zoom=11,
|
|
1058
|
+
available_only=True,
|
|
1059
|
+
)
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
asyncio.run(main())
|
|
1063
|
+
"""
|
|
1064
|
+
_response = await self._raw_client.map_(
|
|
1065
|
+
bbox=bbox,
|
|
1066
|
+
zoom=zoom,
|
|
1067
|
+
connector_types=connector_types,
|
|
1068
|
+
cpo_ids=cpo_ids,
|
|
1069
|
+
network_id=network_id,
|
|
1070
|
+
token_group_id=token_group_id,
|
|
1071
|
+
min_power=min_power,
|
|
1072
|
+
available_only=available_only,
|
|
1073
|
+
own=own,
|
|
1074
|
+
request_options=request_options,
|
|
1075
|
+
)
|
|
1076
|
+
return _response.data
|
|
1077
|
+
|
|
1078
|
+
async def search(
|
|
1079
|
+
self,
|
|
1080
|
+
*,
|
|
1081
|
+
q: typing.Optional[str] = None,
|
|
1082
|
+
evse_id: typing.Optional[str] = None,
|
|
1083
|
+
lat: typing.Optional[float] = None,
|
|
1084
|
+
lon: typing.Optional[float] = None,
|
|
1085
|
+
limit: typing.Optional[int] = None,
|
|
1086
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1087
|
+
) -> LocationList:
|
|
1088
|
+
"""
|
|
1089
|
+
Text search on name, address and city (``q``), EVSE id lookup (``evse_id``, as printed on the QR code; ``*`` and case are ignored), or both. Nearest first when ``lat`` and ``lon`` are given. Returns at most ``limit`` matches with no next page: refine the query to narrow it.
|
|
1090
|
+
|
|
1091
|
+
Parameters
|
|
1092
|
+
----------
|
|
1093
|
+
q : typing.Optional[str]
|
|
1094
|
+
Text in name, address or city.
|
|
1095
|
+
|
|
1096
|
+
evse_id : typing.Optional[str]
|
|
1097
|
+
eMI3 EVSE id as printed on the QR code, e.g. ``NL*ABC*E1001*1``.
|
|
1098
|
+
|
|
1099
|
+
lat : typing.Optional[float]
|
|
1100
|
+
Your latitude (WGS84); send with lon.
|
|
1101
|
+
|
|
1102
|
+
lon : typing.Optional[float]
|
|
1103
|
+
Your longitude (WGS84); send with lat.
|
|
1104
|
+
|
|
1105
|
+
limit : typing.Optional[int]
|
|
1106
|
+
Maximum results (default 10, max 50).
|
|
1107
|
+
|
|
1108
|
+
request_options : typing.Optional[RequestOptions]
|
|
1109
|
+
Request-specific configuration.
|
|
1110
|
+
|
|
1111
|
+
Returns
|
|
1112
|
+
-------
|
|
1113
|
+
LocationList
|
|
1114
|
+
Matching locations, nearest first when lat/lon are given.
|
|
1115
|
+
|
|
1116
|
+
Examples
|
|
1117
|
+
--------
|
|
1118
|
+
import asyncio
|
|
1119
|
+
|
|
1120
|
+
from evcloud import AsyncEvcloudClient
|
|
1121
|
+
|
|
1122
|
+
client = AsyncEvcloudClient(
|
|
1123
|
+
token="YOUR_TOKEN",
|
|
1124
|
+
)
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
async def main() -> None:
|
|
1128
|
+
await client.emsp.locations.search(
|
|
1129
|
+
evse_id="NL*ABC*E1001*1",
|
|
1130
|
+
lat=52.37,
|
|
1131
|
+
lon=4.89,
|
|
1132
|
+
)
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
asyncio.run(main())
|
|
1136
|
+
"""
|
|
1137
|
+
_response = await self._raw_client.search(
|
|
1138
|
+
q=q, evse_id=evse_id, lat=lat, lon=lon, limit=limit, request_options=request_options
|
|
1139
|
+
)
|
|
1140
|
+
return _response.data
|
|
1141
|
+
|
|
1142
|
+
async def route(
|
|
1143
|
+
self,
|
|
1144
|
+
*,
|
|
1145
|
+
polyline: str,
|
|
1146
|
+
connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
1147
|
+
cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
1148
|
+
buffer_km: typing.Optional[float] = None,
|
|
1149
|
+
limit: typing.Optional[int] = None,
|
|
1150
|
+
network_id: typing.Optional[int] = None,
|
|
1151
|
+
token_group_id: typing.Optional[int] = None,
|
|
1152
|
+
min_power: typing.Optional[float] = None,
|
|
1153
|
+
available_only: typing.Optional[bool] = None,
|
|
1154
|
+
own: typing.Optional[bool] = None,
|
|
1155
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1156
|
+
) -> LocationList:
|
|
1157
|
+
"""
|
|
1158
|
+
Locations within ``buffer_km`` of an encoded polyline (Google format, precision 5), in order along the route. Same filters as the map. Returns at most ``limit`` locations with no next page: shorten the route or ``buffer_km`` to narrow it.
|
|
1159
|
+
|
|
1160
|
+
Parameters
|
|
1161
|
+
----------
|
|
1162
|
+
polyline : str
|
|
1163
|
+
The route as a Google encoded polyline, precision 5.
|
|
1164
|
+
|
|
1165
|
+
connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1166
|
+
Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
|
|
1167
|
+
|
|
1168
|
+
cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
1169
|
+
Only these CPOs, as ``CC*PID``. Repeat for more than one.
|
|
1170
|
+
|
|
1171
|
+
buffer_km : typing.Optional[float]
|
|
1172
|
+
Distance from the route in km (default 2, max 20).
|
|
1173
|
+
|
|
1174
|
+
limit : typing.Optional[int]
|
|
1175
|
+
Maximum results (default 50, max 200).
|
|
1176
|
+
|
|
1177
|
+
network_id : typing.Optional[int]
|
|
1178
|
+
Only locations this network reaches. Not together with token_group_id.
|
|
1179
|
+
|
|
1180
|
+
token_group_id : typing.Optional[int]
|
|
1181
|
+
Only locations the group's networks reach. Not together with network_id.
|
|
1182
|
+
|
|
1183
|
+
min_power : typing.Optional[float]
|
|
1184
|
+
Minimum connector power in kW.
|
|
1185
|
+
|
|
1186
|
+
available_only : typing.Optional[bool]
|
|
1187
|
+
Only locations with an EVSE free right now.
|
|
1188
|
+
|
|
1189
|
+
own : typing.Optional[bool]
|
|
1190
|
+
true: only your own OCPP chargers. false: only partner (roaming) locations.
|
|
1191
|
+
|
|
1192
|
+
request_options : typing.Optional[RequestOptions]
|
|
1193
|
+
Request-specific configuration.
|
|
1194
|
+
|
|
1195
|
+
Returns
|
|
1196
|
+
-------
|
|
1197
|
+
LocationList
|
|
1198
|
+
Locations near the route, in order along it.
|
|
1199
|
+
|
|
1200
|
+
Examples
|
|
1201
|
+
--------
|
|
1202
|
+
import asyncio
|
|
1203
|
+
|
|
1204
|
+
from evcloud import AsyncEvcloudClient
|
|
1205
|
+
|
|
1206
|
+
client = AsyncEvcloudClient(
|
|
1207
|
+
token="YOUR_TOKEN",
|
|
1208
|
+
)
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
async def main() -> None:
|
|
1212
|
+
await client.emsp.locations.route(
|
|
1213
|
+
polyline="_p~iF~ps|U_ulLnnqC_mqNvxq`@",
|
|
1214
|
+
buffer_km=2.0,
|
|
1215
|
+
min_power=50.0,
|
|
1216
|
+
)
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
asyncio.run(main())
|
|
1220
|
+
"""
|
|
1221
|
+
_response = await self._raw_client.route(
|
|
1222
|
+
polyline=polyline,
|
|
1223
|
+
connector_types=connector_types,
|
|
1224
|
+
cpo_ids=cpo_ids,
|
|
1225
|
+
buffer_km=buffer_km,
|
|
1226
|
+
limit=limit,
|
|
1227
|
+
network_id=network_id,
|
|
1228
|
+
token_group_id=token_group_id,
|
|
1229
|
+
min_power=min_power,
|
|
1230
|
+
available_only=available_only,
|
|
1231
|
+
own=own,
|
|
1232
|
+
request_options=request_options,
|
|
1233
|
+
)
|
|
1234
|
+
return _response.data
|
|
1235
|
+
|
|
1236
|
+
async def batch(
|
|
1237
|
+
self,
|
|
1238
|
+
*,
|
|
1239
|
+
keys: typing.Optional[typing.Sequence[LocationKeyInput]] = OMIT,
|
|
1240
|
+
uids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
1241
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1242
|
+
) -> BatchResponse:
|
|
1243
|
+
"""
|
|
1244
|
+
Up to 500 locations by OCPI key or by ``uid`` (one of the two). Keys or uids that are unknown or out of scope come back in ``missing``.
|
|
1245
|
+
|
|
1246
|
+
Parameters
|
|
1247
|
+
----------
|
|
1248
|
+
keys : typing.Optional[typing.Sequence[LocationKeyInput]]
|
|
1249
|
+
|
|
1250
|
+
uids : typing.Optional[typing.Sequence[str]]
|
|
1251
|
+
|
|
1252
|
+
request_options : typing.Optional[RequestOptions]
|
|
1253
|
+
Request-specific configuration.
|
|
1254
|
+
|
|
1255
|
+
Returns
|
|
1256
|
+
-------
|
|
1257
|
+
BatchResponse
|
|
1258
|
+
The locations found, and the keys or uids that were not.
|
|
1259
|
+
|
|
1260
|
+
Examples
|
|
1261
|
+
--------
|
|
1262
|
+
import asyncio
|
|
1263
|
+
|
|
1264
|
+
from evcloud import AsyncEvcloudClient, LocationKeyInput
|
|
1265
|
+
|
|
1266
|
+
client = AsyncEvcloudClient(
|
|
1267
|
+
token="YOUR_TOKEN",
|
|
1268
|
+
)
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
async def main() -> None:
|
|
1272
|
+
await client.emsp.locations.batch(
|
|
1273
|
+
keys=[
|
|
1274
|
+
LocationKeyInput(
|
|
1275
|
+
country_code="NL",
|
|
1276
|
+
party_id="ABC",
|
|
1277
|
+
location_id="LOC-AMS-001",
|
|
1278
|
+
),
|
|
1279
|
+
LocationKeyInput(
|
|
1280
|
+
country_code="NL",
|
|
1281
|
+
party_id="ABC",
|
|
1282
|
+
location_id="LOC-GONE",
|
|
1283
|
+
),
|
|
1284
|
+
],
|
|
1285
|
+
)
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
asyncio.run(main())
|
|
1289
|
+
"""
|
|
1290
|
+
_response = await self._raw_client.batch(keys=keys, uids=uids, request_options=request_options)
|
|
1291
|
+
return _response.data
|
|
1292
|
+
|
|
1293
|
+
async def get_by_uid(self, uid: str, *, request_options: typing.Optional[RequestOptions] = None) -> LocationDetail:
|
|
1294
|
+
"""
|
|
1295
|
+
One location with its EVSEs, connectors and tariff summary, by its stable ``uid``.
|
|
1296
|
+
|
|
1297
|
+
Parameters
|
|
1298
|
+
----------
|
|
1299
|
+
uid : str
|
|
1300
|
+
The location's stable ``uid``.
|
|
1301
|
+
|
|
1302
|
+
request_options : typing.Optional[RequestOptions]
|
|
1303
|
+
Request-specific configuration.
|
|
1304
|
+
|
|
1305
|
+
Returns
|
|
1306
|
+
-------
|
|
1307
|
+
LocationDetail
|
|
1308
|
+
The location with its EVSEs, connectors and tariff summary.
|
|
1309
|
+
|
|
1310
|
+
Examples
|
|
1311
|
+
--------
|
|
1312
|
+
import asyncio
|
|
1313
|
+
|
|
1314
|
+
from evcloud import AsyncEvcloudClient
|
|
1315
|
+
|
|
1316
|
+
client = AsyncEvcloudClient(
|
|
1317
|
+
token="YOUR_TOKEN",
|
|
1318
|
+
)
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
async def main() -> None:
|
|
1322
|
+
await client.emsp.locations.get_by_uid(
|
|
1323
|
+
uid="3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f0b7c34",
|
|
1324
|
+
)
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
asyncio.run(main())
|
|
1328
|
+
"""
|
|
1329
|
+
_response = await self._raw_client.get_by_uid(uid, request_options=request_options)
|
|
1330
|
+
return _response.data
|
|
1331
|
+
|
|
1332
|
+
async def get(
|
|
1333
|
+
self,
|
|
1334
|
+
location_id: str,
|
|
1335
|
+
*,
|
|
1336
|
+
country_code: str,
|
|
1337
|
+
party_id: str,
|
|
1338
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1339
|
+
) -> LocationDetail:
|
|
1340
|
+
"""
|
|
1341
|
+
One own or partner location with its EVSEs, connectors and tariff summary, addressed by the CPO's country code and party id.
|
|
1342
|
+
|
|
1343
|
+
Parameters
|
|
1344
|
+
----------
|
|
1345
|
+
location_id : str
|
|
1346
|
+
OCPI location id.
|
|
1347
|
+
|
|
1348
|
+
country_code : str
|
|
1349
|
+
The CPO's OCPI country code, e.g. NL.
|
|
1350
|
+
|
|
1351
|
+
party_id : str
|
|
1352
|
+
The CPO's OCPI party id, e.g. ABC.
|
|
1353
|
+
|
|
1354
|
+
request_options : typing.Optional[RequestOptions]
|
|
1355
|
+
Request-specific configuration.
|
|
1356
|
+
|
|
1357
|
+
Returns
|
|
1358
|
+
-------
|
|
1359
|
+
LocationDetail
|
|
1360
|
+
The location with its EVSEs, connectors and tariff summary.
|
|
1361
|
+
|
|
1362
|
+
Examples
|
|
1363
|
+
--------
|
|
1364
|
+
import asyncio
|
|
1365
|
+
|
|
1366
|
+
from evcloud import AsyncEvcloudClient
|
|
1367
|
+
|
|
1368
|
+
client = AsyncEvcloudClient(
|
|
1369
|
+
token="YOUR_TOKEN",
|
|
1370
|
+
)
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
async def main() -> None:
|
|
1374
|
+
await client.emsp.locations.get(
|
|
1375
|
+
location_id="LOC-AMS-001",
|
|
1376
|
+
country_code="NL",
|
|
1377
|
+
party_id="ABC",
|
|
1378
|
+
)
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
asyncio.run(main())
|
|
1382
|
+
"""
|
|
1383
|
+
_response = await self._raw_client.get(
|
|
1384
|
+
location_id, country_code=country_code, party_id=party_id, request_options=request_options
|
|
1385
|
+
)
|
|
1386
|
+
return _response.data
|