Code Monkey home page Code Monkey logo

Comments (6)

chrisparsons83 avatar chrisparsons83 commented on July 29, 2024

Season leaderboard now exists at https://www.flexspotff.com/leagues/leaderboards.

  • Still need to create the graphQL endpoint to update this.
  • Still need to create a job that will automatically run that endpoint to update this. (low priority since I can just run it on Monday/Tuesday night manually)
  • Still need the weekly leaderboard version of this.

from flexspotff.com.

chrisparsons83 avatar chrisparsons83 commented on July 29, 2024

Leaving thoughts here on what we need to build the weekly leaderboard. Totally not finished, but this is kind of a start. Mainly I'm messing around with the idea of how we want to keep the games. I think we want to keep them as their own entities so it's easy to aggregate them for a team, but I'm struggling with the thoughts of keeping track of the actual median. Keeping the pointsFor weekly rank would let us do neat things like calculate it on the fly in the future, and also do things like display an allPlay, but I don't know if I'm over-engineering that.

Entities

Week

  • Week Number: number
  • Season: season
  • Start Date: Tuesday of week
  • End Date: Monday of week
  • Games: games[]

Weekly Score

  • Week number: week
  • Matchup ID: number
  • Roster ID: string
  • Points: number
  • Is Above Median: boolean
  • Is Winning: boolean
  • Game Completed: boolean
  • Points For Weekly Rank in League: number

Resolvers

Mutation loadWeek

  • Parameter: Week (maybe defaults to current week?)
  • Result: It loops through all active leagues and upserts all team records.

Query weeklyScores

  • Parameters: Week
  • Result: Returns all scores for that week, in a table that looks similar to /leagues/leaderboards

from flexspotff.com.

chrisparsons83 avatar chrisparsons83 commented on July 29, 2024

updateAllTeams now works for the season long.

from flexspotff.com.

chrisparsons83 avatar chrisparsons83 commented on July 29, 2024

Okay, weekly scoreboard now works, just need to write the script that updates both this and the season-long leaderboard.

from flexspotff.com.

chrisparsons83 avatar chrisparsons83 commented on July 29, 2024

Testing out how cron runs on updating weekly scores for TNF this week. Need to make it more general but at least this will be a start.

from flexspotff.com.

chrisparsons83 avatar chrisparsons83 commented on July 29, 2024

Following back up on this, this is clearly working now, need to do two things and I can close this out:

  1. Update the updateWeeklyScores mutation so that week is an optional parameter, and the default parameter would be the current week.
  2. Update the authentication mechanism so that either I can create an API key or some setup so that I don't have to update the crontab weekly.

from flexspotff.com.

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.