diff --git a/docs/changelog/0.3.0.md b/docs/changelog/0.3.0.md index 51e44541..5ce8ce59 100644 --- a/docs/changelog/0.3.0.md +++ b/docs/changelog/0.3.0.md @@ -7,6 +7,7 @@ _Not Released Yet_ - Endpoints: - Added support for `/v2/account/buildstorage`. [[GH-4](https://github.com/GW2ToolBelt/api-generator/issues/4)] - Added support for `/v2/account/home`. [[GH-11](https://github.com/GW2ToolBelt/api-generator/issues/11)] + - Added support for `/v2/account/home/cats`. [[GH-12](https://github.com/GW2ToolBelt/api-generator/issues/12)] - Added support for `/v2/account/luck`. [[GH-15](https://github.com/GW2ToolBelt/api-generator/issues/15)] - Added support for `/v2/account/mounts`. [[GH-23](https://github.com/GW2ToolBelt/api-generator/issues/23)] - Added support for `/v2/achievements`. [[GH-35](https://github.com/GW2ToolBelt/api-generator/issues/35)] 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 e7bcdc7a..27dc4514 100644 --- a/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt +++ b/src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt @@ -188,6 +188,21 @@ internal val GW2v2 = GW2APIVersion { schema(array(STRING, "the available sub-endpoints")) } + "/Account/Home/Cats" { + summary = "Returns information about a player's unlock home instance cats." + security = setOf(ACCOUNT, PROGRESSION, UNLOCKS) + + schema( + V2_SCHEMA_CLASSIC to array( + description = "the IDs of the player's unlocked home instance cats", + items = record(name = "AccountHomeInstanceCat", description = "Information about a player's unlocked home-instance cat.") { + CamelCase("id").."ID"(INTEGER, "the cat's ID") + "Hint"(STRING, "the unlock hint") + } + ), + V2_SCHEMA_2019_03_22T00_00_00_000Z to array(INTEGER, "the IDs of the player's unlocked home instance cats") + ) + } "/Account/Home/Nodes" { summary = "Returns information about a player's unlocked home instance nodes." security = setOf(ACCOUNT, PROGRESSION) diff --git a/src/main/resources/com/gw2tb/apigen/v2_account_home_cats+2019-03-22T00_00_00.000Z.json b/src/main/resources/com/gw2tb/apigen/v2_account_home_cats+2019-03-22T00_00_00.000Z.json new file mode 100644 index 00000000..7dbcccbd --- /dev/null +++ b/src/main/resources/com/gw2tb/apigen/v2_account_home_cats+2019-03-22T00_00_00.000Z.json @@ -0,0 +1,6 @@ +[ + 2, + 24, + 1, + 20 +] \ No newline at end of file diff --git a/src/main/resources/com/gw2tb/apigen/v2_account_home_cats.json b/src/main/resources/com/gw2tb/apigen/v2_account_home_cats.json new file mode 100644 index 00000000..a4df9506 --- /dev/null +++ b/src/main/resources/com/gw2tb/apigen/v2_account_home_cats.json @@ -0,0 +1,18 @@ +[ + { + "id": 2, + "hint": "grilled_chicken" + }, + { + "id": 24, + "hint": "snow_leopard" + }, + { + "id": 1, + "hint": "chicken" + }, + { + "id": 20, + "hint": "necromancer" + } +] \ 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 839ae752..3e7ac8f3 100644 --- a/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt +++ b/src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt @@ -64,6 +64,9 @@ class GW2v2 : SpecTest( expectEndpoint("/Account/Home") .cacheTime(DURATION_INFINITE) + expectEndpoint("/Account/Home/Cats") + .security(ACCOUNT, PROGRESSION, UNLOCKS) + expectEndpoint("/Account/Home/Nodes") .security(ACCOUNT, PROGRESSION)