Skip to content

Commit

Permalink
feat(spec): add /v2/account/luck
Browse files Browse the repository at this point in the history
Closes #15
  • Loading branch information
TheMrMilchmann committed Jan 19, 2021
1 parent 2142512 commit f744afd
Show file tree
Hide file tree
Showing 4 changed files with 22 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 @@ -6,6 +6,7 @@ _Not Released Yet_

- Endpoints:
- Added support for `/v2/account/home`. [[GH-11](https://github.com/GW2ToolBelt/api-generator/issues/11)]
- Added support for `/v2/account/luck`. [[GH-15](https://github.com/GW2ToolBelt/api-generator/issues/15)]
- Added support for `/v2/account/mounts`. [[GH-23](https://github.com/GW2ToolBelt/api-generator/issues/23)]
- Added support for `/v2/achievements`. [[GH-35](https://github.com/GW2ToolBelt/api-generator/issues/35)]
- Added support for `/v2/achievements/categories`. [[GH-36](https://github.com/GW2ToolBelt/api-generator/issues/36)]
Expand Down
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 @@ -185,6 +185,18 @@ internal val GW2v2 = GW2APIVersion {
}
))
}
"/Account/Luck" {
summary = "Returns information about a player's luck."
security = setOf(ACCOUNT, PROGRESSION, UNLOCKS)

schema(array(
description = "the account's luck",
items = record(name = "Luck", description = "Information about a plyer's luck.") {
CamelCase("id").."ID"(INTEGER, "the type of luck (always \"luck\")")
"Value"(INTEGER, "the amount of luck")
}
))
}
"/Account/Mailcarriers" {
summary = "Returns information about a player's unlocked mail carriers."
security = setOf(ACCOUNT, UNLOCKS)
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/com/gw2tb/apigen/v2_account_luck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"id": "luck",
"value": 2300780
}
]
3 changes: 3 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 @@ -67,6 +67,9 @@ class GW2v2 : SpecTest(
expectEndpoint("/Account/Inventory")
.security(ACCOUNT, INVENTORIES)

expectEndpoint("/Account/Luck")
.security(ACCOUNT, PROGRESSION, UNLOCKS)

expectEndpoint("/Account/Mailcarriers")
.security(ACCOUNT, UNLOCKS)

Expand Down

0 comments on commit f744afd

Please sign in to comment.