-
Notifications
You must be signed in to change notification settings - Fork 7
Add import support to Fantasy Premier League plugin (v2) #120
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
Open
TimWheeler-SQUP
wants to merge
15
commits into
main
Choose a base branch
from
work/tw/fpl-import
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d7e393c
Updated validation of manager ID and robust naming conventions
TimWheeler-SQUP d22dbec
Claude feedback updates
TimWheeler-SQUP bce4b56
Update import
TimWheeler-SQUP a0787d1
Move plugin to v2 folder
TimWheeler-SQUP 796a24d
Clean-up of names and values
TimWheeler-SQUP e8d5bd6
Revert stray v1 changes superseded by v2
TimWheeler-SQUP 2621d74
Fix REVIEW.md convention violations in v2
TimWheeler-SQUP 701b03e
Final doc-compliance pass on v2
TimWheeler-SQUP 4407c3e
Fix H2H League Summary 404 caused by thousands-separator formatting
TimWheeler-SQUP 69b6c9a
Remove committed personal Claude Code settings file
TimWheeler-SQUP ed7d5b1
Fix manager-dependent column bloat and align budget/value formatting
TimWheeler-SQUP fdc702a
Align Gameweek Data column order with v2 stream shape
TimWheeler-SQUP 9c11e8e
Note allowlist requirement for FPL summary embed image
TimWheeler-SQUP d432e98
Add screenshot of the FPL Summary dashboard
TimWheeler-SQUP 39c0b80
Replace Summary dashboard screenshot
TimWheeler-SQUP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "steps": [ | ||
| { | ||
| "displayName": "FPL manager ID", | ||
| "dataStream": { "name": "managerInformation" }, | ||
| "success": "Successfully connected to FPL", | ||
| "error": "Can't find this FPL Manager ID β check the URL on the FPL website", | ||
| "required": true | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "words": [ | ||
| "FPL", | ||
| "Gameweek", | ||
| "bboost", | ||
| "freehit", | ||
| "favourite" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [ | ||
| { | ||
| "name": "FPL Gameweek", | ||
| "sourceType": "Gameweek", | ||
| "icon": "calendar", | ||
| "singular": "Gameweek", | ||
| "plural": "Gameweeks" | ||
| }, | ||
| { | ||
| "name": "FPL Classic League", | ||
| "sourceType": "Classic League", | ||
| "icon": "trophy", | ||
| "singular": "Classic League", | ||
| "plural": "Classic Leagues" | ||
| }, | ||
| { | ||
| "name": "FPL H2H League", | ||
| "sourceType": "H2H League", | ||
| "icon": "swords", | ||
| "singular": "H2H League", | ||
| "plural": "H2H Leagues" | ||
| } | ||
| ] |
61 changes: 61 additions & 0 deletions
61
plugins/FantasyPremierLeague/v2/dataStreams/classicLeagues.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| { | ||
| "name": "classicLeagues", | ||
| "displayName": "Classic Leagues", | ||
| "description": "Classic leagues the configured manager is a member of", | ||
| "visibility": { "type": "hidden" }, | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "expandInnerObjects": false, | ||
| "endpointPath": "entry/{{dataSource.userID}}", | ||
| "pathToData": "leagues.classic", | ||
| "getArgs": [], | ||
| "headers": [] | ||
| }, | ||
| "manualConfigApply": true, | ||
| "rowPath": [], | ||
| "metadata": [ | ||
| { | ||
| "shape": "string", | ||
| "name": "id", | ||
| "displayName": "League ID", | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "name", | ||
| "displayName": "League Name", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "short_name", | ||
| "displayName": "Short Name" | ||
| }, | ||
| { | ||
| "name": "league_type", | ||
| "displayName": "League Type" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "entry_rank", | ||
| "displayName": "Current Rank" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "entry_last_rank", | ||
| "displayName": "Last Rank" | ||
| } | ||
| ], | ||
| "timeframes": false, | ||
| "matches": "none", | ||
| "tags": ["Leagues"] | ||
| } |
137 changes: 137 additions & 0 deletions
137
plugins/FantasyPremierLeague/v2/dataStreams/gameweekData.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| { | ||
| "timeframes": false, | ||
| "name": "gameweekData", | ||
| "description": "Details and statistics for each gameweek in the season", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "expandInnerObjects": true, | ||
| "endpointPath": "bootstrap-static", | ||
| "postRequestScript": "gameweekData.js", | ||
| "getArgs": [], | ||
| "headers": [] | ||
| }, | ||
| "manualConfigApply": true, | ||
| "rowPath": [], | ||
| "metadata": [ | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "id" | ||
| }, | ||
| { | ||
| "displayName": "Gameweek", | ||
| "name": "name" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "date", | ||
| { | ||
| "timeZone": "Etc/UTC" | ||
| } | ||
| ], | ||
| "name": "deadline_time" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "highest_score" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "average_entry_score" | ||
| }, | ||
| { | ||
| "displayName": "BB Chip Played", | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "chip_plays.bboost" | ||
| }, | ||
| { | ||
| "displayName": "TC Chip Played", | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "chip_plays.3xc" | ||
| }, | ||
| { | ||
| "displayName": "Wildcard Chip Played", | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "chip_plays.wildcard" | ||
| }, | ||
| { | ||
| "displayName": "Free Hit Chip Played", | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "chip_plays.freehit" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "most_transferred_in" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "most_captained" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "most_vice_captained" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "transfers_made" | ||
| } | ||
| ], | ||
| "displayName": "Gameweek Data", | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "matches": "none", | ||
| "tags": ["Game Info"] | ||
| } |
135 changes: 135 additions & 0 deletions
135
plugins/FantasyPremierLeague/v2/dataStreams/h2hLeagueSummary.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| { | ||
| "timeframes": false, | ||
| "name": "h2hLeagueSummary", | ||
| "description": "Standings for a selected head-to-head league", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "expandInnerObjects": true, | ||
| "endpointPath": "leagues-h2h/{{leagueID}}/standings/", | ||
| "pathToData": "standings.results", | ||
| "getArgs": [], | ||
| "headers": [] | ||
| }, | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "manualConfigApply": true, | ||
| "rowPath": [], | ||
| "metadata": [ | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "points_for", | ||
| "displayName": "Points For" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "rank", | ||
| "expand": [ | ||
| { | ||
| "compareTo": "last_rank", | ||
| "shape": "number", | ||
| "comparisonName": "compare1", | ||
| "comparisonType": "absolute", | ||
| "displayName": "Rank Change" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "last_rank" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "matches_won", | ||
| "displayName": "Won" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "matches_drawn", | ||
| "displayName": "Drawn" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "matches_lost", | ||
| "displayName": "Lost" | ||
| }, | ||
| { | ||
| "shape": [ | ||
| "number", | ||
| { | ||
| "decimalPlaces": 0 | ||
| } | ||
| ], | ||
| "name": "total", | ||
| "displayName": "Total Points" | ||
| }, | ||
| { | ||
| "displayName": "Team Name", | ||
| "name": "entry_name" | ||
| }, | ||
| { | ||
| "displayName": "Player Name", | ||
| "name": "player_name" | ||
| } | ||
| ], | ||
| "defaultShaping": { | ||
| "sort": { | ||
| "by": [ | ||
| [ | ||
| "rank", | ||
| "asc" | ||
| ] | ||
| ] | ||
| } | ||
| }, | ||
| "displayName": "H2H League Summary", | ||
| "matches": "none", | ||
| "tags": ["Leagues"], | ||
| "ui": [ | ||
| { | ||
| "name": "leagueID", | ||
| "label": "H2H League", | ||
| "placeholder": "Select an H2H league", | ||
| "type": "autocomplete", | ||
| "allowCustomValues": false, | ||
| "isMulti": false, | ||
| "validation": { | ||
| "required": true, | ||
| "message": "You must select an H2H league" | ||
| }, | ||
| "data": { | ||
| "source": "dataStream", | ||
| "dataStreamName": "h2hLeagues", | ||
| "dataSourceConfig": {} | ||
| } | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.