Skip to content

Commit

Permalink
feat(spec): add /v2/account/legendaryarmory
Browse files Browse the repository at this point in the history
Closes #179
  • Loading branch information
TheMrMilchmann committed Jul 14, 2021
1 parent f6eb3a4 commit bccb7b0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/changelog/0.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ _Not Released Yet_
#### Improvements

- Endpoints:
- Added support for `/v2/account/legendaryarmory`. [[GH-179](https://github.com/GW2ToolBelt/api-generator/issues/179)]
- Added support for `/v2/legendaryarmory`. [[GH-178](https://github.com/GW2ToolBelt/api-generator/issues/178)]
12 changes: 12 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 @@ -249,6 +249,18 @@ internal val GW2v2 = GW2APIVersion({ APIVersionBuilder.V2() }) {
}
))
}
"/Account/LegendaryArmory" {
summary = "Returns information about a player's legendary armory."
security = setOf(ACCOUNT, INVENTORIES, UNLOCKS)

schema(array(
description = "the account's legendary armory unlocks.",
items = record(name = "AccountLegendaryArmoryUnlock", description = "Information about a player's legendary armory item unlock.") {
CamelCase("id").."ID"(INTEGER, "the item's ID")
"Count"(INTEGER, "the number of copies unlocked")
}
))
}
"/Account/Luck" {
summary = "Returns information about a player's luck."
security = setOf(ACCOUNT, PROGRESSION, UNLOCKS)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"id": 30689,
"count": 1
},
{
"id": 30703,
"count": 1
},
{
"id": 30699,
"count": 1
},
{
"id": 30704,
"count": 1
}
]
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 @@ -106,6 +106,11 @@ class GW2v2 : SpecTest<APIQuery.V2, APIType.V2, GW2v2.ExpectedAPIv2Query>(
security = setOf(ACCOUNT, INVENTORIES)
)

expectQuery(
"/Account/LegendaryArmory",
security = setOf(ACCOUNT, INVENTORIES, UNLOCKS)
)

expectQuery(
"/Account/Luck",
security = setOf(ACCOUNT, PROGRESSION, UNLOCKS)
Expand Down

0 comments on commit bccb7b0

Please sign in to comment.