95 lines
1.9 KiB
Python
95 lines
1.9 KiB
Python
"""
|
|
EU-Utility - Core APIs
|
|
======================
|
|
|
|
A comprehensive three-tier API architecture for EU-Utility.
|
|
|
|
Three APIs:
|
|
-----------
|
|
1. PluginAPI (core.api.plugin_api) - For plugin development
|
|
2. WidgetAPI (core.api.widget_api) - For widget management
|
|
3. ExternalAPI (core.api.external_api) - For external integrations
|
|
|
|
Quick Reference:
|
|
---------------
|
|
|
|
PluginAPI - Access core services:
|
|
>>> from core.api import get_api
|
|
>>> api = get_api()
|
|
>>> api.show_notification("Hello", "World!")
|
|
>>> window = api.get_eu_window()
|
|
|
|
WidgetAPI - Manage overlay widgets:
|
|
>>> from core.api import get_widget_api
|
|
>>> widget_api = get_widget_api()
|
|
>>> widget = widget_api.create_widget("tracker", "Loot Tracker")
|
|
>>> widget.show()
|
|
|
|
ExternalAPI - Third-party integrations:
|
|
>>> from core.api import get_external_api
|
|
>>> ext = get_external_api()
|
|
>>> ext.start_server(port=8080)
|
|
>>> ext.register_webhook("/discord", handler)
|
|
|
|
See individual API modules for full documentation.
|
|
"""
|
|
|
|
# Import all three APIs
|
|
from core.api.plugin_api import (
|
|
PluginAPI,
|
|
get_api,
|
|
PluginAPIError,
|
|
ServiceNotAvailableError
|
|
)
|
|
|
|
from core.api.widget_api import (
|
|
WidgetAPI,
|
|
get_widget_api,
|
|
Widget,
|
|
WidgetConfig,
|
|
WidgetType,
|
|
WidgetAnchor
|
|
)
|
|
|
|
from core.api.external_api import (
|
|
ExternalAPI,
|
|
get_external_api,
|
|
ExternalAPIError,
|
|
WebhookError,
|
|
ServerError,
|
|
WebhookConfig,
|
|
APIEndpoint
|
|
)
|
|
|
|
# Convenience re-exports
|
|
__all__ = [
|
|
# PluginAPI
|
|
'PluginAPI',
|
|
'get_api',
|
|
'PluginAPIError',
|
|
'ServiceNotAvailableError',
|
|
|
|
# WidgetAPI
|
|
'WidgetAPI',
|
|
'get_widget_api',
|
|
'Widget',
|
|
'WidgetConfig',
|
|
'WidgetType',
|
|
'WidgetAnchor',
|
|
|
|
# ExternalAPI
|
|
'ExternalAPI',
|
|
'get_external_api',
|
|
'ExternalAPIError',
|
|
'WebhookError',
|
|
'ServerError',
|
|
'WebhookConfig',
|
|
'APIEndpoint'
|
|
]
|
|
|
|
# Version
|
|
__version__ = "2.2.0"
|
|
|
|
# API compatibility version
|
|
API_VERSION = "2.2"
|