1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 15:27:14 +03:00

191 Commits

Author SHA1 Message Date
David Muckle
317d9fa32b Revert "Remove extra newline"
This reverts commit 529cf68db0825373762691ed100ef417790028ff.
2025-02-23 11:31:11 -05:00
David Muckle
529cf68db0 Remove extra newline 2025-02-23 10:57:09 -05:00
David Muckle
3c22aad254 Update PLUGINS.md with new info about Powerplay in state 2025-02-22 17:52:22 -05:00
Connor
583ee4fa50
Update PLUGINS.md
update state table to match newly added values from loadout events
2024-12-27 20:40:41 +00:00
aussig
2dba5e4365 Merge branch 'develop' into enhancement/2188/translation-override 2024-05-12 13:34:42 +01:00
David Sangrey
91e4e7998b
[1812] Update Docs and Fix Compat Layer 2024-04-22 19:18:01 -04:00
David Sangrey
10be2c2031
[Docs] Update Plugin Docs 2024-04-22 18:32:19 -04:00
aussig
a863cebc66 [2188] Add optional lang parameter to l10n.Translations.translate() to allow language to be overridden. 2024-04-01 07:48:15 +01:00
Athanasius
27e39a05d8
PLUGINS: Document using config.user_agent for User-Agent
And, really, just use `timeout_session` anyway, which does this.
2023-01-18 11:48:27 +00:00
Athanasius
8b9379a89e
PLUGINS: Document that they should use requests, not urllib, and why 2023-01-18 11:44:51 +00:00
Athanasius
650b43cc3c
PLUGINS: Document monitor.is_live_galaxy() as sanctioned for use 2023-01-18 11:30:28 +00:00
Athanasius
ef1642181a
monitor/tracking: Move .stationtype to state['StationType']
* Nothing outside of monitor.py uses this, but it's of the same nature as
  StationName and MarketID, so do this for consistency.

For now we'll leave monitor.stationservices as-is.
2023-01-11 19:44:45 +00:00
Athanasius
31e8d0372d
monitor/tracking: Move .station_marketid to state['MarketID']
1. plugins/eddb.py uses this for MarketID-based station URLs.

* So do the 'rename'.
* Remove EDDB tracking in favour of this.
* Update PLUGINS.md
2023-01-11 19:44:44 +00:00
Athanasius
dde0cf876c
monitor/tracking: Move .station to state['StationName']
1. EDDB tracks this.

* So move monitor.station to monitor.state['StationName'].
* PLUGINS.md updated to cite this.
2023-01-11 19:44:41 +00:00
Athanasius
df5eb5b270
monitor/tracking: Switch .systempopulation to state['SystemPopulation']
1. EDDB plugin tracked this for keeping the Station link text up to date.

* So moved it to monitor.state['SystemPopulation'].
* PLUGINS.md updated to cite this.
* PLUGINS.md also updated to note state entries that are set to None if
  remote multi-crew is detected.
2023-01-11 19:44:14 +00:00
Athanasius
b1308e4f28
PLUGINS.md: Document addition of Bodt(ID|Type) and the caveats about use 2023-01-11 19:43:24 +00:00
Athanasius
86b0aa4550
monitor: Track all System and Body state in monitor.state
* Minor grammar edit only in PLUGINS.md (I was checking if it explicitly
  stated what data is expected in the synthetic 'StartUp' event, it doesn't).
* First changes to move some monitor properties into the monitor.state
  dictionary.  This is for system or body data.
* Re-factored the generation of 'StartUp' event into
  `EDLogs.synthesize_startup_event()`.  It's done in two places, so was
  anti-DRY.
* In general any bulk setting of system & body data is now done in the
  same order for comparison clarity.
* A little of the location tracking has been duplicated from plugins/eddn.py.
  This is with a view to switching *it* to using the state version.
2023-01-11 19:43:14 +00:00
Athanasius
991f69044c
PLUGINS.md: Avoid an example implying plugins can set main status text
The 'Error messages' section lays out how to get a message into the main
UI status area, and it does *not* say to try setting it directly.
2022-12-31 17:20:30 +00:00
aussig
16055a311f Typo in plugins docs 2022-12-26 11:23:44 +00:00
aussig
f6f122072b Tweaks to plugins docs for fleetcarrier CAPI, including headings, typos and clarity on legacy galaxy 2022-12-26 11:20:37 +00:00
aussig
e22fa7c23b Store cmdr name at request time in CAPIData instead of passing into EDMCCAPIRequest and EDMCCAPIResponse 2022-12-24 09:32:45 +00:00
aussig
3c8eca16af Revert unnoticed whitespace modifications to PLUGINS.py 2022-12-23 13:01:47 +00:00
aussig
7e726e606a Store original request cmdr name in 'request_cmdr' in CAPIData 2022-12-23 12:47:35 +00:00
aussig
9e17c46b25 Implement suggestions from PR #1773. 2022-12-22 16:21:42 +00:00
aussig
a551da59a3 Documentation for capi_fleetcarrier() plugin callback function 2022-12-22 08:57:50 +00:00
Athanasius
ba68397b3f
CAPI killswitches: endpoint killswitches & eddn export ones too
* Added `capi.request.<endpoint>` killswitches at appropriate call points.
* Added `eddn.capi_export.<type>` killswitches.  This allows for killing
  just the EDDN export of such CAPI-derived data, without stopping the actual
  queries, as other plugins/functionality might still have harmless use of
  the data.
* PLUGINS.md: Actually describe the contents of `data` passed to plugins, and
  point out it might not always contain market or shipyard data.  This is
  not only because of the new killswitches, but could already have happened
  if the station/port docked at didn't have the services.
* Some misc typing cleanups.
2022-12-16 15:06:01 +00:00
Athanasius
e2f4f8f665
PLUGINS.md: Slightly improve CAPI Legacy/Live doc 2022-12-14 13:51:29 +00:00
Athanasius
605ad07aac
Merge pull request #1747 from EDCD/enhancement/1728/capi-for-legacy
CAPI: Enable use of Legacy host when applicable.
2022-12-14 10:42:05 +00:00
Athanasius
84615db839
PLUGINS.md: Allow use of CAPIData.source_host
* Additional Allowed Imports `from companion ...`.

* Plugin authors will still need to chain `cmdr_data_legacy()` to calling
  `cmdr_data()`, but with sanctioned access to `data.source_host` they can
  then determine the galaxy data source.

* Re-worked the documentation for CAPI data a little to make all of this as
  clear as possible.
2022-12-08 13:17:13 +00:00
Athanasius
af5d998464
PLUGINS.md: Correct the statement about python stdlib 2022-12-08 12:59:36 +00:00
Athanasius
a3a52055d3
CAPI/PLUGINS.md: Document cmdr_data_legacy()
For now warn against trying to use extra CAPIData properties to determine
the galaxy.
2022-12-08 12:53:31 +00:00
Athanasius
3e15aa0fe6
PLUGINS.md: More fully document state['NavRoute'
This includes the "catching up" load of the data.
2022-12-06 15:42:59 +00:00
Athanasius
b4c4e44cb7
eddn/CAPI: Use a common function for game_version strings
* This did, however, remind me that the `data` passed into `cmdr_data()`
  is an amalgam of `/profile`, `/market` and `/shipyard` queries.

  This means that the data.source_endpoint is **not correct for all of
  the data and its use**.  As such I had to pass 'hard coded' values into
  the function from the various CAPI export functions.  They know what it
  is they're exporting.

* As this reminded me that "CAPI `data` is actually a `CAPIDATA`", I've
  documented that in PLUGINS.md, but with a dire warning against relying on
  any of the extra properties.
2022-12-01 16:42:06 +00:00
Athanasius
b06e579754
PLUGINS.md: Emphasise limited use of from config import config 2022-12-01 12:14:49 +00:00
Athanasius
0eb33e011b
PLUGINS.md: Document new IsDocked state flag. 2022-11-23 15:57:25 +00:00
Athanasius
fa834daaca
PLUGINS.md: Fix example return type hint for journal_entry()
It's `Optional[str]` for possible error string being returned.
2022-08-15 08:39:34 +01:00
Athanasius
1bb0bf9f74
PLUGINS.md: Document NavRouteClear behaviour 2022-08-10 11:47:51 +01:00
Athanasius
7116964dba
PLUGINS: Call out keeping an eye on Discussions 2022-02-17 12:19:36 +00:00
Athanasius
785f9a3235
PLUGINS.md: We don't currently include all of Python stdlib 2021-11-16 11:07:32 +00:00
Athanasius
945baf7f53
Merge branch 'stable' 2021-10-25 11:12:39 +01:00
Athanasius
cf5806021e
PLUGINS.md: capi_is_horizons() now 2021-10-18 12:33:11 +01:00
Chris
5e5169da51
Fix shutting_down example in plugins.md 2021-08-25 15:03:19 -04:00
Chris
705d2dd4f1
Fix game_runnning() doc in PLUGINS.md 2021-08-24 14:52:10 -04:00
Athanasius
f977ad6716
PLUGINS.md: General PyCharm alerts pass
A few bits of example code tweaked to be more correct, but to make
PyCharm truly happy about the file we'd need to expand the examples to
stupid proportions (extra imports, indent changes etc).
2021-08-13 13:50:46 +01:00
Athanasius
6c34ceaba9
PLUGINS.md: s/EDMC/EDMarketConnector/ almost everywhere & reflow
The reflow is on *all* non-code/table text to be within 80 columns,
excepting if a link just makes that impossible.
2021-08-13 13:32:36 +01:00
Athanasius
411bd0edf2
journal/CQC: Minor documentation tweaks for language/grammar 2021-08-13 13:19:46 +01:00
c65ef0a4d6
PLUGINS.md: deduplicate content table for state in journal_entry_cqc 2021-08-13 14:41:35 +03:00
29df3869cd
PLUGINS.md: update first EDMC version with journal_entry_cqc 2021-08-13 14:15:46 +03:00
28f7a2b2fe
PLUGINS.md: add ref link for systems to CQC maps mapping 2021-08-13 14:07:50 +03:00
30048ded88
PLUGINS.md: initial update for journal_entry_cqc 2021-08-11 17:47:06 +03:00