| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/Struct/Player.elm')
| -rw-r--r-- | src/Struct/Player.elm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Struct/Player.elm b/src/Struct/Player.elm index 7221fb9..6a81daf 100644 --- a/src/Struct/Player.elm +++ b/src/Struct/Player.elm @@ -2,8 +2,13 @@ module Struct.Player exposing ( Type, get_ix, + set_ix, get_id, + set_id, + get_url_prefix, + set_url_prefix, get_username, + set_username, get_campaigns, get_invasions, get_events, @@ -26,6 +31,7 @@ type alias Type = ix : Int, id : String, name : String, + url_prefix : String, campaigns : (List Struct.BattleSummary.Type), invasions : (List Struct.BattleSummary.Type), events : (List Struct.BattleSummary.Type) @@ -41,12 +47,27 @@ type alias Type = get_ix : Type -> Int get_ix t = t.ix +set_ix : Int -> Type -> Type +set_ix val t = {t | ix = val} + get_id : Type -> String get_id t = t.id +set_id : String -> Type -> Type +set_id str t = {t | id = str} + get_username : Type -> String get_username t = t.name +set_username : String -> Type -> Type +set_username str t = {t | name = str} + +get_url_prefix : Type -> String +get_url_prefix t = t.url_prefix + +set_url_prefix : String -> Type -> Type +set_url_prefix str t = {t | url_prefix = str} + get_campaigns : Type -> (List Struct.BattleSummary.Type) get_campaigns t = t.campaigns |


