Description Public fields Methods Examples
The [FPL$get_user()] method returns an object of class 'User'.
user
A 'list' of user details.
history
A 'list' of 'data.frame's containing the historic gameweek performance data for the user.
cup
A ‘list' of data related to the user’s cup performance.
picks
A ‘list' of the user’s picks information for each gameweek.
transfers
A ‘list' of the user’s weekly transfers.
new()
Instantiate the 'User' class.
User$new(user)
user
'list'. Data for a single FPL user.
An R6 'User' object.
fpl <- FPL$new() user <- fpl$get_user(555690)
get_gameweek_history()
Get the gameweek history for the user.
User$get_gameweek_history(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek history to return (default: 'NULL' returns all gameweeks).
A 'data.frame'.
user$get_gameweek_history()
get_season_history()
Get the seasonal history for the user.
User$get_season_history()
A 'data.frame'.
user$get_season_history()
get_chips_history()
Get the chip history for the user.
User$get_chips_history(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek history to return (default: 'NULL' returns all gameweeks).
A 'data.frame'.
user$get_gameweek_history()
get_picks()
Get the user's picks for the chosen 'gameweek'(s).
User$get_picks(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek picks to return (default: 'NULL' returns all gameweeks).
A ‘list' containing the user’s picks details for the chosen gameweek(s).
user$get_picks()
get_cup_status()
Get the user's cup status.
User$get_cup_status()
A 'list' of cup status information.
user$get_cup_status()
get_cup_matches()
Get the user's cup matches.
User$get_cup_matches(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek history to return (default: 'NULL' returns all gameweeks).
A 'list' of cup match information.
user$get_cup_matches()
get_active_chips()
Get the user's active chip for each gameweek or the active chip of the chosen 'gameweek'(s).
User$get_active_chips(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek history to return (default: 'NULL' returns all gameweeks).
A vector of active chips.
user$get_active_chips()
get_automatic_substitutions()
Get a 'list' of automatic substitutions for the chosen 'gameweek'(s).
User$get_automatic_substitutions(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek history to return (default: 'NULL' returns all gameweeks).
A vector of active chips.
user$get_automatic_substitutions()
get_user_history()
Get a ‘list' of the user’s 'gameweek' history.
User$get_user_history(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek history to return (default: 'NULL' returns all gameweeks).
A ‘list' of 'data.frame's of the user’s gameweek history.
user$get_user_history()
get_transfers()
Get a ‘list' of all the user’s transfers, or a 'list' of transfers made in the given 'gameweek'(s).
User$get_transfers(gameweek = NULL)
gameweek
'numeric(n)'. The gameweek history to return (default: 'NULL' returns all gameweeks).
A ‘list' of the user’s transfers.
user$get_transfers()
print()
Pretty printing of the 'User'.
User$print(...)
...
Not used.
clone()
The objects of this class are cloneable with this method.
User$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | ## ------------------------------------------------
## Method `User$new`
## ------------------------------------------------
fpl <- FPL$new()
user <- fpl$get_user(555690)
## ------------------------------------------------
## Method `User$get_gameweek_history`
## ------------------------------------------------
user$get_gameweek_history()
## ------------------------------------------------
## Method `User$get_season_history`
## ------------------------------------------------
user$get_season_history()
## ------------------------------------------------
## Method `User$get_chips_history`
## ------------------------------------------------
user$get_gameweek_history()
## ------------------------------------------------
## Method `User$get_picks`
## ------------------------------------------------
user$get_picks()
## ------------------------------------------------
## Method `User$get_cup_status`
## ------------------------------------------------
user$get_cup_status()
## ------------------------------------------------
## Method `User$get_cup_matches`
## ------------------------------------------------
user$get_cup_matches()
## ------------------------------------------------
## Method `User$get_active_chips`
## ------------------------------------------------
user$get_active_chips()
## ------------------------------------------------
## Method `User$get_automatic_substitutions`
## ------------------------------------------------
user$get_automatic_substitutions()
## ------------------------------------------------
## Method `User$get_user_history`
## ------------------------------------------------
user$get_user_history()
## ------------------------------------------------
## Method `User$get_transfers`
## ------------------------------------------------
user$get_transfers()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.