Skip to content

Commit

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

- Endpoints:
- Added support for `/v2/account/home`. [[GH-11](https://github.com/GW2ToolBelt/api-generator/issues/11)]
- 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
6 changes: 6 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 @@ -142,6 +142,12 @@ internal val GW2v2 = GW2APIVersion {

schema(array(INTEGER, "an array of IDs containing the ID of each glider unlocked by the player"))
}
"/Account/Home" {
summary = "Returns information about the available sub-endpoints."
cache = DURATION_INFINITE // We don't expect this to change. Ever.

schema(array(STRING, "the available sub-endpoints"))
}
"/Account/Home/Nodes" {
summary = "Returns information about a player's unlocked home instance nodes."
security = setOf(ACCOUNT, PROGRESSION)
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/com/gw2tb/apigen/v2_account_home.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"nodes",
"cats"
]
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 @@ -58,6 +58,9 @@ class GW2v2 : SpecTest(
expectEndpoint("/Account/Gliders")
.security(ACCOUNT, UNLOCKS)

expectEndpoint("/Account/Home")
.cacheTime(DURATION_INFINITE)

expectEndpoint("/Account/Home/Nodes")
.security(ACCOUNT, PROGRESSION)

Expand Down

0 comments on commit 2142512

Please sign in to comment.