Coder Social home page Coder Social logo

Live points notifications about fpl HOT 14 OPEN

amosbastian avatar amosbastian commented on June 2, 2024
Live points notifications

from fpl.

Comments (14)

krishh-konar avatar krishh-konar commented on June 2, 2024 1

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.

from fpl.

amosbastian avatar amosbastian commented on June 2, 2024 1

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

from fpl.

amosbastian avatar amosbastian commented on June 2, 2024

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

from fpl.

gringorichards avatar gringorichards commented on June 2, 2024

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.

from fpl.

krishh-konar avatar krishh-konar commented on June 2, 2024

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.

from fpl.

amosbastian avatar amosbastian commented on June 2, 2024

@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?

from fpl.

krishh-konar avatar krishh-konar commented on June 2, 2024

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?

from fpl.

amosbastian avatar amosbastian commented on June 2, 2024

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).

from fpl.

krishh-konar avatar krishh-konar commented on June 2, 2024

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?

from fpl.

krishh-konar avatar krishh-konar commented on June 2, 2024

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?

from fpl.

amosbastian avatar amosbastian commented on June 2, 2024

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.

from fpl.

johnmadden86 avatar johnmadden86 commented on June 2, 2024

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

from fpl.

krishh-konar avatar krishh-konar commented on June 2, 2024

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.

from fpl.

krishh-konar avatar krishh-konar commented on June 2, 2024

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

from fpl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.