Skip to content

Commit

Permalink
feat(spec): add /v2/mounts/types
Browse files Browse the repository at this point in the history
Closes #107
  • Loading branch information
TheMrMilchmann committed Jan 16, 2021
1 parent 90d15e2 commit aa0172f
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 @@ -12,6 +12,7 @@ _Not Released Yet_
- 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/mounts/types`. [[GH-107](https://github.com/GW2ToolBelt/api-generator/issues/107)]
- 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 @@ -1069,6 +1069,26 @@ internal val GW2v2 = GW2APIVersion {
)
})
}
"/Mounts/Types" {
summary = "Returns information about mount types."
cache = 1.hours
isLocalized = true

supportedQueries(BY_ID, BY_IDS, BY_PAGE)
schema(record(name = "MountType", description = "Information about a mount type.") {
CamelCase("id").."ID"(INTEGER, "the mount type's ID")
"Name"(STRING, "the mount type's name")
SerialName("default_skin").."DefaultSkin"(INTEGER, "the ID of the mount type's default skin")
"Skins"(array(INTEGER), "the IDs of the skins available for the mount type")
"Skills"(
description = "the mount type's skills",
type = array(record(name = "Skill", description = "Information about a mount skill.") {
CamelCase("id").."ID"(INTEGER, "the mount skill's ID")
"Slot"(INTEGER, "the mount skill's slot")
})
)
})
}
"/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 @@ -265,6 +265,11 @@ class GW2v2 : SpecTest(
.localized()
.queryTypes(BY_ID, BY_IDS, BY_PAGE)

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

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

0 comments on commit aa0172f

Please sign in to comment.