Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live location API #90

Open
DJTommek opened this issue Apr 28, 2022 · 0 comments
Open

Live location API #90

DJTommek opened this issue Apr 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@DJTommek
Copy link
Owner

DJTommek commented Apr 28, 2022

Create new API endpoint which will return list of live locations, that are shared into specific chat using Telegram's Live location.

Specific usecase

tldr stop using Glympse and replace it with Telegram.

Since Glympse is focused on location sharing, is great and much more powerful for more complex usages, but it takes little bit time to setup on both user-end (connect to tag, start sharing) and admin-end (logic for loading tag, list of users and then user data itself must be programmed).

On the other hand, Telegram is much more friendly to use and it is probably already installed on target device. Also, it should be more secure than sharing just using Glympse code and Glympse tag because access is granted only to users with secure token.

Needs testing

  • if location is refreshing "often enough"
  • precision is great even if display is off

Expected behavior

  1. Admin of chat will generate token for API access
  2. Users start sharing live locations into this chat
  3. Admin will access this API endpoint which will return list of users, that are sharing live location

Notes

  • endpoint example /api/live-location/<chat-id>/<token>
    • token should be random and re-generable in case of leak
  • output example: users[userName1: [lat1, lon1, elevation1, address1, precision1], userName2: [lat2, lon2, ...], ...]
    • history could be returned too
    • add support for GET parameters as defined for lat,lon?format=json (load address, datetimezone, elevation, ...)
  • Bot needs to save live locations from that chat, where this feature is enabled.
    • Maybe table telegram_updates could be used, after support to Live location is added.
@DJTommek DJTommek added the enhancement New feature or request label Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant