Skip to content

Commit

Permalink
feat(spec): add /v2/mounts/skins
Browse files Browse the repository at this point in the history
Closes #106
  • Loading branch information
TheMrMilchmann committed Jan 16, 2021
1 parent 3298522 commit 1e49aeb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changelog/0.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ _Not Released Yet_
- Added support for `/v2/guild/upgrades`. [[GH-92](https://github.com/GW2ToolBelt/api-generator/issues/92)]
- Added support for `/v2/minis`. [[GH-104](https://github.com/GW2ToolBelt/api-generator/issues/104)]
- Added support for `/v2/mounts`. [[GH-105](https://github.com/GW2ToolBelt/api-generator/issues/105)]
- Added support for `/v2/mounts/skins`. [[GH-106](https://github.com/GW2ToolBelt/api-generator/issues/106)]
- Added support for `/v2/pets`. [[GH-110](https://github.com/GW2ToolBelt/api-generator/issues/110)]
- Added support for `/v2/quaggans`. [[GH-122](https://github.com/GW2ToolBelt/api-generator/issues/122)]
- Added support for `/v2/raids`. [[GH-125](https://github.com/GW2ToolBelt/api-generator/issues/125)]
Expand Down
20 changes: 20 additions & 0 deletions src/main/kotlin/com/gw2tb/apigen/internal/spec/GW2v2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,26 @@ internal val GW2v2 = GW2APIVersion {

schema(array(STRING, "the available sub-endpoints"))
}
"/Mounts/Skins" {
summary = "Returns information about mount skins."
cache = 1.hours
isLocalized = true

supportedQueries(BY_ID, BY_IDS, BY_PAGE)
schema(record(name = "MountSkin", description = "Information about a mount skin.") {
CamelCase("id").."ID"(INTEGER, "the mount skin's ID")
"Name"(STRING, "the mount skin's name")
"Icon"(STRING, "a render service URL for the mount skin's icon")
"Mount"(STRING, "the mount type id for the mount skin")
SerialName("dye_slots").."DyeSlots"(
description = "the mount skin's dye slots",
type = array(record(name = "DyeSlot", description = "Information about a dye slot.") {
CamelCase("color_id").."ColorID"(STRING, "the ID of the color")
"Material"(STRING, "the slot's material")
})
)
})
}
"/Outfits" {
summary = "Returns information about outfits."
cache = 1.hours
Expand Down
5 changes: 5 additions & 0 deletions src/test/kotlin/com/gw2tb/apigen/test/spec/GW2v2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ class GW2v2 : SpecTest(
expectEndpoint("/Mounts")
.cacheTime(DURATION_INFINITE)

expectEndpoint("/Mounts/Skins")
.cacheTime(1.hours)
.localized()
.queryTypes(BY_ID, BY_IDS, BY_PAGE)

expectEndpoint("/Outfits")
.cacheTime(1.hours)
.localized()
Expand Down

0 comments on commit 1e49aeb

Please sign in to comment.