Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugins/FantasyPremierLeague/v1/configValidation.json
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
}
]
}
4 changes: 3 additions & 1 deletion plugins/FantasyPremierLeague/v1/cspell.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"words": [
"FPL",
"Gameweek"
"Gameweek",
"bboost",
"freehit"
]
}
23 changes: 23 additions & 0 deletions plugins/FantasyPremierLeague/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"name": "FPL Gameweek",
"sourceType": "fpl-gameweek",
"icon": "calendar",
"singular": "Gameweek",
"plural": "Gameweeks"
},
{
"name": "FPL Classic League",
"sourceType": "fpl-classic-league",
"icon": "trophy",
"singular": "Classic League",
"plural": "Classic Leagues"
},
{
"name": "FPL H2H League",
"sourceType": "fpl-h2h-league",
"icon": "swords",
"singular": "H2H League",
"plural": "H2H Leagues"
}
]
63 changes: 63 additions & 0 deletions plugins/FantasyPremierLeague/v1/dataStreams/classicLeagues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "classicLeagues",
"displayName": "Classic Leagues",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"expandInnerObjects": false,
"endpointPath": "entry/{{userID}}",
"pathToData": "leagues.classic",
"getArgs": [],
"headers": []

Check warning on line 11 in plugins/FantasyPremierLeague/v1/dataStreams/classicLeagues.json

View check run for this annotation

Claude / Claude Code Review

Missing tags field in new data streams

The three new data streams (classicLeagues.json, h2hLeagues.json, h2hLeagueSummary.json) are missing the required tags field, which the repo guidelines mark as mandatory. Adding a tags field (e.g., "tags": ["Fun"]) to each new stream would bring them in line with the stated guideline.
Comment thread
TimWheeler-SQUP marked this conversation as resolved.
},
"manualConfigApply": true,
"rowPath": [],
"metadata": [
{
"shape": [
"number",
{
"decimalPlaces": 0
}
],
"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"
}
24 changes: 10 additions & 14 deletions plugins/FantasyPremierLeague/v1/dataStreams/gameweekData.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"httpMethod": "get",
"expandInnerObjects": true,
"endpointPath": "bootstrap-static",
"pathToData": "events",
"postRequestScript": "gameweekData.js",
"getArgs": [],
"headers": []
},
Expand Down Expand Up @@ -53,44 +53,44 @@
"name": "average_entry_score"
},
{
"displayName": "BB chip played",
"displayName": "BB Chip Played",
"shape": [
"number",
{
"decimalPlaces": 0
}
],
"name": "chip_plays.0.num_played"
"name": "chip_plays.bboost"
},
{
"displayName": "TC chip played",
"displayName": "TC Chip Played",
"shape": [
"number",
{
"decimalPlaces": 2
"decimalPlaces": 0
}
],
"name": "chip_plays.1.num_played"
"name": "chip_plays.3xc"
},
{
"displayName": "Free Hit played",
"displayName": "Wildcard Chip Played",
"shape": [
"number",
{
"decimalPlaces": 0
}
],
"name": "chip_plays.3.num_played"
"name": "chip_plays.wildcard"
},
{
"displayName": "Wildcard chip played",
"displayName": "Free Hit Chip Played",
"shape": [
"number",
{
"decimalPlaces": 0
}
],
"name": "chip_plays.2.num_played"
"name": "chip_plays.freehit"
},
{
"shape": [
Expand Down Expand Up @@ -119,10 +119,6 @@
],
"name": "most_vice_captained"
},
{
"displayName": "TC chip played",
"name": "chip_plays.3.chip_name"
},
{
"shape": [
"number",
Expand Down
134 changes: 134 additions & 0 deletions plugins/FantasyPremierLeague/v1/dataStreams/h2hLeagueSummary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"timeframes": false,
"name": "h2hLeagueSummary",
"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",
"ui": [
{
"name": "leagueID",
"label": "H2H League",
"placeholder": "Select an H2H league",
"title": "H2H League",
"type": "autocomplete",
"allowCustomValues": false,
"isMulti": false,
"validation": {
"required": true,
"message": "You must select an H2H league"
},
"data": {
"source": "dataStream",
"dataStreamName": "h2hLeagues",
"dataSourceConfig": {}
}
}
]

Check warning on line 133 in plugins/FantasyPremierLeague/v1/dataStreams/h2hLeagueSummary.json

View check run for this annotation

Claude / Claude Code Review

Prohibited title attribute in UI fields

Both new/modified UI fields in this PR include a prohibited `title` attribute: `h2hLeagueSummary.json` has `"title": "H2H League"` and `leagueSummary.json` has `"title": "Classic League"`. Per repo guidelines, the `title` attribute should not be specified on any fields β€” both should be removed.
Comment thread
TimWheeler-SQUP marked this conversation as resolved.
}
59 changes: 59 additions & 0 deletions plugins/FantasyPremierLeague/v1/dataStreams/h2hLeagues.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "h2hLeagues",
"displayName": "H2H Leagues",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"expandInnerObjects": false,
"endpointPath": "entry/{{userID}}",
"pathToData": "leagues.h2h",
"getArgs": [],
"headers": []
},
"manualConfigApply": true,
"rowPath": [],
"metadata": [
{
"shape": [
"number",
{
"decimalPlaces": 0
}
],
"name": "id",
"displayName": "League ID",
"role": "value"
},
{
"name": "name",
"displayName": "League Name",
"role": "label"
},
{
"name": "short_name",
"displayName": "Short Name"
},
{
"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"
}
Loading