diff --git a/docs/changelog/0.5.0.md b/docs/changelog/0.5.0.md index 15246995..d6d9b2cd 100644 --- a/docs/changelog/0.5.0.md +++ b/docs/changelog/0.5.0.md @@ -1,3 +1,8 @@ ### 0.5.0 -_Not Released Yet_ \ No newline at end of file +_Not Released Yet_ + +#### Improvements + +- Endpoints: + - 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 d9438fd2..843c5c86 100644 --- a/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt +++ b/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt @@ -1641,6 +1641,16 @@ internal val GW2v2 = GW2APIVersion({ APIVersionBuilder.V2() }) { ) }) } + "/LegendaryArmory" { + summary = "Returns information about what can be stored in the legendary armory." + cache = 1.hours + + supportedQueries(BY_ID, BY_IDS, BY_PAGE) + schema(record(name = "LegendaryArmorySlot", description = "Information about an item that can be stored in the legendary armory.") { + CamelCase("id").."ID"(INTEGER, "the item's ID") + SerialName("max_count").."MaxCount"(INTEGER, "the maximum number of copies of this item that can be stored in the armory for an account") + }) + } "/Legends" { summary = "Returns information about the Revenant legends." cache = 1.hours diff --git a/src/main/resources/com/gw2tb/apigen/v2_legendaryarmory.json b/src/main/resources/com/gw2tb/apigen/v2_legendaryarmory.json new file mode 100644 index 00000000..31c45559 --- /dev/null +++ b/src/main/resources/com/gw2tb/apigen/v2_legendaryarmory.json @@ -0,0 +1,14 @@ +[ + { + "id": 30704, + "max_count": 2 + }, + { + "id": 30689, + "max_count": 2 + }, + { + "id": 30703, + "max_count": 2 + } +] \ 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 a081aec7..402bf3f0 100644 --- a/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt +++ b/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt @@ -1161,6 +1161,33 @@ class GW2v2 : SpecTest( queryDetails = QueryByPage(INTEGER) ) + expectQuery( + "/LegendaryArmory", + cache = 1.hours, + queryDetails = QueryIDs(INTEGER) + ) + expectQuery( + "/LegendaryArmory", + cache = 1.hours, + queryParameters = listOf(ExpectedQueryParameter("id", INTEGER)), + queryDetails = QueryByID(INTEGER) + ) + expectQuery( + "/LegendaryArmory", + cache = 1.hours, + queryParameters = listOf(ExpectedQueryParameter("ids", INTEGER.array)), + queryDetails = QueryByIDs(INTEGER) + ) + expectQuery( + "/LegendaryArmory", + cache = 1.hours, + queryParameters = listOf( + ExpectedQueryParameter("page", INTEGER), + ExpectedQueryParameter("page_size", INTEGER, isOptional = true) + ), + queryDetails = QueryByPage(INTEGER) + ) + expectQuery( "/Legends", cache = 1.hours,