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 points notifications #79

Open
krishh-konar opened this issue Oct 25, 2019 · 14 comments
Open

Live points notifications #79

krishh-konar opened this issue Oct 25, 2019 · 14 comments

Comments

@krishh-konar
Copy link

This is a feature request. I was looking for a live points notification system which would provide realtime updates about the matchday points. What do you think about the idea? If its okay I would like to work on this.

@amosbastian
Copy link
Owner

Sounds interesting! Do you mean like a stream that would output live points to a terminal or something that would actually send desktop notifications?

@gringorichards
Copy link
Contributor

It does sound interesting! Another option could be a function that takes an FPL entry, and returns the live points for that manager's team.

@krishh-konar
Copy link
Author

I was thinking about actually sending desktop notifications, like when someone scores, it notifies you with the player whose points changed and your current live score.

@krishh-konar
Copy link
Author

It does sound interesting! Another option could be a function that takes an FPL entry, and returns the live points for that manager's team.

Yes, I think this can also be done with a few additions.

@amosbastian
Copy link
Owner

@gringorichards I think that could be done with @johnmadden86's code that he is currently working on #78.

@amosbastian
Copy link
Owner

amosbastian commented Oct 26, 2019

@krishh-konar How do you see someone using it? For example, would they have to run a script that calls a function (that is implemented in the package) that streams updates and sends notifications to them, or would it be built into the CLI or something else etc?

@krishh-konar
Copy link
Author

I think running a script in the background which calls a something like a notify_livescore function is a way to do it, as it would require continuous polling for data while the gameweek is going on. Do you have any other suggestions on how that can be implemented?

@amosbastian
Copy link
Owner

I'm not exactly sure how I'd implement it, but I guess it would be something that calls the /live endpoint e.g. every minute and compares it to the previous call to see if anything changed (and then notifies the user of this). I think it would be best to add this to the CLI so people can just run something like fpl live instead of having to run a script like python live.py, but I'm not sure if the CLI even works anymore lol (so it could be a lot of work).

@krishh-konar
Copy link
Author

But wouldn't a notification system either require something running on the host all the time?
Would cli allow that? i.e. notifications stop as soon as you quit the program right?

@krishh-konar
Copy link
Author

I was thinking maybe just providing a function that would take userid and poll for points continuously and people who want to use it can simple import the module and call the function, and it works until the script is running?

@amosbastian
Copy link
Owner

But wouldn't a notification system either require something running on the host all the time?
Would cli allow that? i.e. notifications stop as soon as you quit the program right?

You'd just leave your terminal open, which you'd have to do with a script as well anyway.

@johnmadden86
Copy link
Contributor

Sounds like it should be separate project, some sort of client side app

@krishh-konar
Copy link
Author

You'd just leave your terminal open, which you'd have to do with a script as well anyway.

Well, you can run it as a background job or a daemon.... but I see you point.

@krishh-konar
Copy link
Author

Sounds like it should be separate project, some sort of client side app

Yes, maybe thats a good idea. I think I'll just start working on it on a different project and maybe just add the generic functions like getting player livescore etc. here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants