mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 08:40:34 +03:00
PLUGINS.md: Slightly improve CAPI Legacy/Live doc
This commit is contained in:
parent
281703aa99
commit
e2f4f8f665
14
PLUGINS.md
14
PLUGINS.md
@ -970,8 +970,22 @@ def cmdr_data_legacy(data, is_beta):
|
|||||||
then you *may* simply:
|
then you *may* simply:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
from companion import SERVER_BETA, SERVER_LEGACY, SERVER_LIVE
|
||||||
|
|
||||||
def cmdr_data_legacy(data, is_beta):
|
def cmdr_data_legacy(data, is_beta):
|
||||||
return cmdr_data(data, is_beta)
|
return cmdr_data(data, is_beta)
|
||||||
|
|
||||||
|
def cmdr_data(data, is_beta):
|
||||||
|
if data.source_host == SERVER_LEGACY:
|
||||||
|
...
|
||||||
|
elif data.source_host == SERVER_LIVE:
|
||||||
|
...
|
||||||
|
elif data.source_host == SERVER_BETA:
|
||||||
|
# Would also be indicated by `is_beta == True`
|
||||||
|
...
|
||||||
|
else:
|
||||||
|
# Unknown source galaxy !
|
||||||
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
The core 'eddn' plugin might contain some useful hints about how to handle the
|
The core 'eddn' plugin might contain some useful hints about how to handle the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user