diff --git a/docs/changelog/0.5.0.md b/docs/changelog/0.5.0.md index d6d9b2cd..700e5819 100644 --- a/docs/changelog/0.5.0.md +++ b/docs/changelog/0.5.0.md @@ -5,4 +5,5 @@ _Not Released Yet_ #### Improvements - Endpoints: + - Added support for `/v2/account/legendaryarmory`. [[GH-179](https://github.com/GW2ToolBelt/api-generator/issues/179)] - Added support for `/v2/legendaryarmory`. [[GH-178](https://github.com/GW2ToolBelt/api-generator/issues/178)] \ No newline at end of file diff --git a/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt b/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt index 843c5c86..e34f9850 100644 --- a/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt +++ b/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt @@ -249,6 +249,18 @@ internal val GW2v2 = GW2APIVersion({ APIVersionBuilder.V2() }) { } )) } + "/Account/LegendaryArmory" { + summary = "Returns information about a player's legendary armory." + security = setOf(ACCOUNT, INVENTORIES, UNLOCKS) + + schema(array( + description = "the account's legendary armory unlocks.", + items = record(name = "AccountLegendaryArmoryUnlock", description = "Information about a player's legendary armory item unlock.") { + CamelCase("id").."ID"(INTEGER, "the item's ID") + "Count"(INTEGER, "the number of copies unlocked") + } + )) + } "/Account/Luck" { summary = "Returns information about a player's luck." security = setOf(ACCOUNT, PROGRESSION, UNLOCKS) diff --git a/src/main/resources/com/gw2tb/apigen/v2_account_legendaryarmory.json b/src/main/resources/com/gw2tb/apigen/v2_account_legendaryarmory.json new file mode 100644 index 00000000..ed855ff9 --- /dev/null +++ b/src/main/resources/com/gw2tb/apigen/v2_account_legendaryarmory.json @@ -0,0 +1,18 @@ +[ + { + "id": 30689, + "count": 1 + }, + { + "id": 30703, + "count": 1 + }, + { + "id": 30699, + "count": 1 + }, + { + "id": 30704, + "count": 1 + } +] \ No newline at end of file diff --git a/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt b/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt index 402bf3f0..8e29b12a 100644 --- a/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt +++ b/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt @@ -106,6 +106,11 @@ class GW2v2 : SpecTest( security = setOf(ACCOUNT, INVENTORIES) ) + expectQuery( + "/Account/LegendaryArmory", + security = setOf(ACCOUNT, INVENTORIES, UNLOCKS) + ) + expectQuery( "/Account/Luck", security = setOf(ACCOUNT, PROGRESSION, UNLOCKS)