DJTommek / better-location

Telegram bot for parsing and generating various of location formats.
https://t.me/BetterLocationBot
MIT License
7 stars 2 forks source link

Generating optional location (Ingress) #99

Closed DJTommek closed 2 years ago

DJTommek commented 2 years ago

History and background

Ingress Intel has service (IngressIntelService), which is parsing and generating link to intel.ingress.com based on coordinates. It could be any place on earth (opens map) and if it point's to specific portal, it will also open and load that portal information.

Recently there has been added IngressPrimeService, which is used for parsing portal link generated from Ingress Prime mobile application, eg. this monstrosity https://link.ingress.com/?link=https%3A%2F%2Fintel.ingress.com%2Fportal%2F3902903a1bc448a4b5e76203c396ebd0.16&apn=com.nianticproject.ingress&isi=576505181&ibi=com.google.ingress&ifl=https%3A%2F%2Fapps.apple.com%2Fapp%2Fingress%2Fid576505181&ofl=https%3A%2F%2Fintel.ingress.com%2Fintel%3Fpll%3D50.087805%2C14.42116 into 50.087805,14.42116.

Link is representing specific portal by GUID (3902903a1bc448a4b5e76203c396ebd0.16) and that GUID must be in link available thus link cannot be generated for coordinates, if portal does not exists (GUID is not provided).

Task

Refactor application to be able to generate IngressPrime links only if there is portal on provided location coordinates. Eventually also show portal info (name, picture) but separate task can be created for that.

Note after implementation

implemented not as full separate service, but if portal is available on exactly given coordinates, portal info is loaded and displayed as description as can be seen on screenshot.

image

In case of Ingress-related service might not be used description, but prefix section because it is probably info that should be visible on first glance instead of searching in description below, see screenshot for Ingress Prime or Ingress Intel services.

Ingress Intel service

image

Ingress Prime service

image

Bannergress service

image

FevGames service (FirstSaturday events)

image