Skip to content

Commit

Permalink
feat(spec): add /v2/minis
Browse files Browse the repository at this point in the history
Closes #104
  • Loading branch information
TheMrMilchmann committed Jan 16, 2021
1 parent 6b6a95c commit 1b6b979
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 @@ -7,6 +7,7 @@ _Not Released Yet_
- Endpoints:
- Added support for `/v2/finishers`. [[GH-79](https://github.com/GW2ToolBelt/api-generator/issues/79)]
- 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/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
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 @@ -969,6 +969,21 @@ internal val GW2v2 = GW2APIVersion {
"Order"(INTEGER, "the category's sorting key")
})
}
"/Minis" {
summary = "Returns information about minis."
cache = 1.hours
isLocalized = true

supportedQueries(BY_ID, BY_IDS, BY_PAGE)
schema(record(name = "Mini", description = "Information about a mini.") {
CamelCase("id").."ID"(STRING, "the mini's ID")
"Name"(STRING, "the mini's name")
optional.."Description"(STRING, "the description of how to unlock the mini")
"Icon"(STRING, "the URL for the mini's icon")
"Order"(INTEGER, "a (non-unique) number that can be used as basis to sort the list of minis")
CamelCase("item_id").."ItemID"(STRING, "the ID of the item which unlocks the mini")
})
}
"/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 @@ -244,6 +244,11 @@ class GW2v2 : SpecTest(
.localized()
.queryTypes(BY_ID, BY_IDS, BY_PAGE)

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

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

0 comments on commit 1b6b979

Please sign in to comment.