Skip to content

Commit

Permalink
feat(spec): add /v2/mailcarriers
Browse files Browse the repository at this point in the history
Closes #99
  • Loading branch information
TheMrMilchmann committed Jan 16, 2021
1 parent b57d6b6 commit 018620c
Show file tree
Hide file tree
Showing 3 changed files with 21 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 @@ -15,6 +15,7 @@ _Not Released Yet_
- Added support for `/v2/home`. [[GH-93](https://github.com/GW2ToolBelt/api-generator/issues/93)]
- Added support for `/v2/home/cats`. [[GH-94](https://github.com/GW2ToolBelt/api-generator/issues/94)]
- Added support for `/v2/home/nodes`. [[GH-95](https://github.com/GW2ToolBelt/api-generator/issues/95)]
- Added support for `/v2/mailcarriers`. [[GH-99](https://github.com/GW2ToolBelt/api-generator/issues/99)]
- 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)]
Expand Down
15 changes: 15 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 @@ -1030,6 +1030,21 @@ internal val GW2v2 = GW2APIVersion {
)
})
}
"/Mailcarriers" {
summary = "Returns information about mailcarriers."
cache = 1.hours
isLocalized = true

supportedQueries(BY_ID, BY_IDS, BY_PAGE)
schema(record(name = "Mailcarrier", description = "Information about a mailcarrier.") {
CamelCase("id").."ID"(INTEGER, "the mailcarrier's ID")
"Icon"(STRING, "the URL for the mailcarrier's icon")
"Name"(STRING, "the mailcarrier's name")
"Order"(INTEGER, "a number that can be used to sort the list of mailcarriers")
SerialName("unlock_items").."UnlockItems"(array(INTEGER), "an array containing the IDs of the items used to unlock the mailcarrier")
"Flags"(array(STRING), "additional flags describing the mailcarrier")
})
}
"/MapChests" {
summary = "Returns information about the Hero's Choice Chests that can be acquired once per day."
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 @@ -258,6 +258,11 @@ class GW2v2 : SpecTest(
.cacheTime(1.hours)
.queryTypes(BY_ID, BY_IDS, BY_PAGE)

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

expectEndpoint("/MapChests")
.cacheTime(1.hours)
.queryTypes(BY_ID, BY_IDS, BY_PAGE)
Expand Down

0 comments on commit 018620c

Please sign in to comment.