irongut / EDlib

A .Net Standard library for creating companion apps for the game Elite Dangerous by Frontier Developments.
MIT License
4 stars 0 forks source link

Add EDSM & Elite Status api #10

Closed irongut closed 3 years ago

irongut commented 4 years ago

Port GalNet EDSM & Elite Status api from EliteALD. Add more EDSM api methods. Allow new services consuming code to add new EDSM api methods.

Elite Status

Docs

Requires:

irongut commented 3 years ago

Systems

Docs

System Info

Provides system coords, star info, permit requirement and basic system info.

Systems

Provides info for a list of systems from a list of system names.

Systems in Sphere

Lists systems within a radius of a given system, can include all the details from System info.

Systems in Cube

Lists systems within a cube centered on a given system, can include all the details from System info.

irongut commented 3 years ago

System

Docs

Stations

Provides information about the stations in a system.

Market

Provides market information from a market id or system name & station name.

Shipyard

Provides shipyard information from a market id or system name & station name.

Outfitting

Provides outfitting information from a market id or system name & station name.

Factions

Provides BGS information for the factions in a system.

irongut commented 3 years ago

Cache Rework

Memory Cache

Cache last result and options. Return cached result if parameters (e.g. system name) & options match and the data has not expired.

Storage Cache

Currently handled at the lowest level by DownloadService.

Ideas

  1. Add a method to DownloadService that downloads without caching and move caching to EdsmService. This would be significantly different to the other APIs in the library.
  2. Add a method to DownloadService that implements the new cache strategy and use where relevant. This would keep the caching code in the same class.
  3. Replace the current caching code in DownloadService with the new strategy & use it everywhere. Method calls will change & EliteALD will lose any cached data after upgrade to the new code but all apis would be consistent.

Strategy

Cache result & last updated using the method parameters (EdsmService) or request URL (DownloadService) in the key names. Return cached result if keys exist and have not expired.

Concerns