mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-03 12:28:13 +03:00
refactor!: rename milestones to quests and milestone-sets to questlines
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# GPT-Target Endpoints
|
||||
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a Game + Playtype. These are things like searching goals or milestones, or retrieving information about a specific ID.
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a Game + Playtype. These are things like searching goals or quests, or retrieving information about a specific ID.
|
||||
|
||||
For user-specific target endpoints, such as subscriptions, see [UGPT-Target Endpoints](./ugpt-targets.md).
|
||||
|
||||
@@ -11,9 +11,9 @@ For user-specific target endpoints, such as subscriptions, see [UGPT-Target Endp
|
||||
`GET /api/v1/games/:game/:playtype/targets/recently-achieved`
|
||||
|
||||
!!! info
|
||||
This endpoint returns the 100 most recently achieved goal subscriptions, and 50 most recently achieved milestone subscriptions.
|
||||
This endpoint returns the 100 most recently achieved goal subscriptions, and 50 most recently achieved quest subscriptions.
|
||||
|
||||
A target is not considered recently achieved if it was [instantly achieved](../../tachi-server/implementation-details/goals-milestones.md#instant-indirect-achievements).
|
||||
A target is not considered recently achieved if it was [instantly achieved](../../tachi-server/implementation-details/goals-quests.md#instant-indirect-achievements).
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -24,9 +24,9 @@ None.
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved. |
|
||||
| `milestones` | Array<MilestoneDocument> | The milestone documents that were recently achieved. |
|
||||
| `quests` | Array<QuestDocument> | The quest documents that were recently achieved. |
|
||||
| `goalSubs` | Array<GoalSubDocument> | User subscriptions to goals that were recently achieved. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | User subscriptions to milestones that were recently achieved. |
|
||||
| `questSubs` | Array<QuestSubDocument> | User subscriptions to quests that were recently achieved. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -44,10 +44,10 @@ GET /api/v1/games/iidx/SP/targets/recently-achieved
|
||||
goalID: "foo"
|
||||
// ... other goal props
|
||||
}],
|
||||
milestones: [{
|
||||
quests: [{
|
||||
name: "Go Beyond Diamond 1",
|
||||
milestoneID: "bar",
|
||||
// ... other milestone props
|
||||
questID: "bar",
|
||||
// ... other quest props
|
||||
}],
|
||||
goalSubs: [{
|
||||
userID: 1,
|
||||
@@ -55,11 +55,11 @@ GET /api/v1/games/iidx/SP/targets/recently-achieved
|
||||
achieved: true,
|
||||
// ... other goalsub props
|
||||
}],
|
||||
milestoneSubs: [{
|
||||
questSubs: [{
|
||||
userID: 3,
|
||||
milestoneID: "bar",
|
||||
questID: "bar",
|
||||
achieved: true,
|
||||
// ... other milestone sub props
|
||||
// ... other quest sub props
|
||||
}]
|
||||
}
|
||||
```
|
||||
@@ -71,7 +71,7 @@ GET /api/v1/games/iidx/SP/targets/recently-achieved
|
||||
`GET /api/v1/games/:game/:playtype/targets/recently-raised`
|
||||
|
||||
!!! info
|
||||
This endpoint returns the 100 most recently interacted-with goal subscriptions, and 50 most recently interacted-with milestone subscriptions.
|
||||
This endpoint returns the 100 most recently interacted-with goal subscriptions, and 50 most recently interacted-with quest subscriptions.
|
||||
|
||||
A recently interacted with target subscription is one where `progress` or `outOf` has changed recently.
|
||||
|
||||
@@ -87,9 +87,9 @@ None.
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved. |
|
||||
| `milestones` | Array<MilestoneDocument> | The milestone documents that were recently achieved. |
|
||||
| `quests` | Array<QuestDocument> | The quest documents that were recently achieved. |
|
||||
| `goalSubs` | Array<GoalSubDocument> | User subscriptions to goals that were recently interacted with. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | User subscriptions to milestones that were recently interacted with. |
|
||||
| `questSubs` | Array<QuestSubDocument> | User subscriptions to quests that were recently interacted with. |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -107,10 +107,10 @@ GET /api/v1/games/iidx/SP/targets/recently-raised
|
||||
goalID: "foo"
|
||||
// ... other goal props
|
||||
}],
|
||||
milestones: [{
|
||||
quests: [{
|
||||
name: "Go Beyond Diamond 1",
|
||||
milestoneID: "bar",
|
||||
// ... other milestone props
|
||||
questID: "bar",
|
||||
// ... other quest props
|
||||
}],
|
||||
goalSubs: [{
|
||||
userID: 1,
|
||||
@@ -119,12 +119,12 @@ GET /api/v1/games/iidx/SP/targets/recently-raised
|
||||
lastInteraction: 1649438990417,
|
||||
// ... other goalsub props
|
||||
}],
|
||||
milestoneSubs: [{
|
||||
questSubs: [{
|
||||
userID: 3,
|
||||
milestoneID: "bar",
|
||||
questID: "bar",
|
||||
achieved: false,
|
||||
lastInteraction: 1649438990415,
|
||||
// ... other milestone sub props
|
||||
// ... other quest sub props
|
||||
}]
|
||||
}
|
||||
```
|
||||
@@ -181,7 +181,7 @@ None.
|
||||
| `goal` | GoalDocument | The goal document at this ID. |
|
||||
| `goalSubs` | Array<GoalSubDocument> | All of the subscriptions to this goal. |
|
||||
| `users` | Array<UserDocument> | All of the users subscribed to this goal. |
|
||||
| `parentMilestones` | Array<MilestoneDocument> | All of the milestones that include this goal. |
|
||||
| `parentQuests` | Array<QuestDocument> | All of the quests that include this goal. |
|
||||
|
||||
*****
|
||||
|
||||
@@ -215,7 +215,7 @@ None.
|
||||
| `results.outOfHuman` | String | A user friendly format for what this goal was out of. |
|
||||
|
||||
!!! info
|
||||
For more info on `progress`/`outOf`, see [Goals](../../tachi-server/implementation-details/goals-milestones.md#evaluating-a-users-progress).
|
||||
For more info on `progress`/`outOf`, see [Goals](../../tachi-server/implementation-details/goals-quests.md#evaluating-a-users-progress).
|
||||
|
||||
### Example
|
||||
|
||||
@@ -250,14 +250,14 @@ GET /api/v1/games/iidx/SP/targets/goals/some_goal_id/evaluate-for?userID=zkldi
|
||||
|
||||
*****
|
||||
|
||||
## Search milestones for this GPT.
|
||||
## Search quests for this GPT.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestones`
|
||||
`GET /api/v1/games/:game/:playtype/targets/quests`
|
||||
|
||||
!!! note
|
||||
You might notice that there's no equivalent endpoint for goals.
|
||||
|
||||
Searching goals for a GPT isn't very interesting, since they can be created by anyone at any time. The only reason goals are stored separately to subscriptions are for deduplication purposes and milestones.
|
||||
Searching goals for a GPT isn't very interesting, since they can be created by anyone at any time. The only reason goals are stored separately to subscriptions are for deduplication purposes and quests.
|
||||
|
||||
As such, searching goals for a GPT is pointless, since technically it should search the set of all possible goals.
|
||||
|
||||
@@ -271,13 +271,13 @@ GET /api/v1/games/iidx/SP/targets/goals/some_goal_id/evaluate-for?userID=zkldi
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `<body>` | Array<MilestoneDocument> | All of the milestones that matched this search criteria. |
|
||||
| `<body>` | Array<QuestDocument> | All of the quests that matched this search criteria. |
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve information about a specific milestone, and who is subscribed to it.
|
||||
## Retrieve information about a specific quest, and who is subscribed to it.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`GET /api/v1/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -287,33 +287,33 @@ N/A
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestone` | MilestoneDocument | The milestone with this milestoneID. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | All of the subscriptions to this milestone. |
|
||||
| `users` | Array<UserDocument> | All of the user's with subscriptions to this milestone. |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this milestone. |
|
||||
| `parentMilestoneSets` | Array<MilestoneSetDocument> | Any milestone sets that contain this milestone. |
|
||||
| `quest` | QuestDocument | The quest with this questID. |
|
||||
| `questSubs` | Array<QuestSubDocument> | All of the subscriptions to this quest. |
|
||||
| `users` | Array<UserDocument> | All of the user's with subscriptions to this quest. |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this quest. |
|
||||
| `parentQuestlines` | Array<QuestlineDocument> | Any questlines that contain this quest. |
|
||||
|
||||
*****
|
||||
|
||||
## Evaluate a milestone for a user, even if they aren't subscribed to it.
|
||||
## Evaluate a quest for a user, even if they aren't subscribed to it.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestones/:milestoneID/evaluate-for`
|
||||
`GET /api/v1/games/:game/:playtype/targets/quests/:questID/evaluate-for`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `userID` | String | The user you wish to evaluate this milestone upon. |
|
||||
| `userID` | String | The user you wish to evaluate this quest upon. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this milestone. |
|
||||
| `goalResults` | Array<EvaluatedGoalResult> | This user's progress on each individual goal in this milestone. |
|
||||
| `achieved` | Boolean | Whether this user has this milestone achieved or not. |
|
||||
| `progress` | Integer | How many goals this user has achieved in this milestone. |
|
||||
| `outOf` | Integer | How many goals need to be achieved in this milestone for it to be marked as achieved. |
|
||||
| `goals` | Array<GoalDocument> | All of the goals in this quest. |
|
||||
| `goalResults` | Array<EvaluatedGoalResult> | This user's progress on each individual goal in this quest. |
|
||||
| `achieved` | Boolean | Whether this user has this quest achieved or not. |
|
||||
| `progress` | Integer | How many goals this user has achieved in this quest. |
|
||||
| `outOf` | Integer | How many goals need to be achieved in this quest for it to be marked as achieved. |
|
||||
|
||||
#### EvaluatedGoalResult
|
||||
|
||||
@@ -328,27 +328,27 @@ N/A
|
||||
|
||||
*****
|
||||
|
||||
## Search Milestone Sets
|
||||
## Search Questlines
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestone-sets`
|
||||
`GET /api/v1/games/:game/:playtype/targets/questlines`
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `search` | String | A name of a milestone set to search for. |
|
||||
| `search` | String | A name of a questline to search for. |
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `<body>` | Array<MilestoneSetDocument> | An array of MilestoneSetDocuments, based on the search parameter. |
|
||||
| `<body>` | Array<QuestlineDocument> | An array of QuestlineDocuments, based on the search parameter. |
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve a milestone set with a specific ID.
|
||||
## Retrieve a questline with a specific ID.
|
||||
|
||||
`GET /api/v1/games/:game/:playtype/targets/milestone-sets/:setID`
|
||||
`GET /api/v1/games/:game/:playtype/targets/questlines/:questlineID`
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -358,6 +358,6 @@ N/A
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestoneSet` | MilestoneSetDocument | The milestone set document at this ID. |
|
||||
| `milestones` | Array<MilestoneDocument> | All of the milestone documents that belong to this set. |
|
||||
| `questline` | QuestlineDocument | The questline document at this ID. |
|
||||
| `quests` | Array<QuestDocument> | All of the quest documents that belong to this set. |
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ scoreData=<file data>
|
||||
"userID": 1,
|
||||
"classDeltas": [],
|
||||
"goalInfo": [],
|
||||
"milestoneInfo": [],
|
||||
"questInfo": [],
|
||||
"userIntent": false, // if X-User-Intent was set, this would be true.
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# UGPT-Target Endpoints
|
||||
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a User, Game and Playtype. These are things like subscribing to a new milestone, or reading info about progress on a specific goal.
|
||||
These endpoints deal with [targets](../../api/terminology.md) for a User, Game and Playtype. These are things like subscribing to a new quest, or reading info about progress on a specific goal.
|
||||
|
||||
For user-specific target endpoints, such as subscriptions, see [UGPT-Target Endpoints](./ugpt-targets.md).
|
||||
|
||||
@@ -22,8 +22,8 @@ None.
|
||||
| :: | :: | :: |
|
||||
| `goalSubs` | Array<GoalSubDocument> | The goal subscriptions that were recently achieved by this user. |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved (if any). |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | The milestone subscriptions that were recently achieved by this user. |
|
||||
| `milestone` | Array<MilestoneDocument> | The milestone documents that were recently achieved (if any). |
|
||||
| `questSubs` | Array<QuestSubDocument> | The quest subscriptions that were recently achieved by this user. |
|
||||
| `quest` | Array<QuestDocument> | The quest documents that were recently achieved (if any). |
|
||||
| `user` | UserDocument | The user you requested this information about. |
|
||||
|
||||
*****
|
||||
@@ -45,15 +45,15 @@ None.
|
||||
| :: | :: | :: |
|
||||
| `goalSubs` | Array<GoalSubDocument> | The goal subscriptions that were recently achieved by this user. |
|
||||
| `goals` | Array<GoalDocument> | The goal documents that were recently achieved (if any). |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | The milestone subscriptions that were recently achieved by this user. |
|
||||
| `milestone` | Array<MilestoneDocument> | The milestone documents that were recently achieved (if any). |
|
||||
| `questSubs` | Array<QuestSubDocument> | The quest subscriptions that were recently achieved by this user. |
|
||||
| `quest` | Array<QuestDocument> | The quest documents that were recently achieved (if any). |
|
||||
| `user` | UserDocument | The user you requested this information about. |
|
||||
|
||||
*****
|
||||
|
||||
## Retrieve this user's milestone subscriptions.
|
||||
## Retrieve this user's quest subscriptions.
|
||||
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/milestones`
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/quests`
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -63,20 +63,20 @@ None.
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestones` | Array<MilestoneDocument> | All of the milestones this user is subscribed to. |
|
||||
| `milestoneSubs` | Array<MilestoneSubDocument> | All of this user's milestone subscriptions. |
|
||||
| `quests` | Array<QuestDocument> | All of the quests this user is subscribed to. |
|
||||
| `questSubs` | Array<QuestSubDocument> | All of this user's quest subscriptions. |
|
||||
|
||||
*****
|
||||
|
||||
## Get a user's progress on a specific milestone they are subscribed to.
|
||||
## Get a user's progress on a specific quest they are subscribed to.
|
||||
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`GET /api/v1/users/:userID/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
!!! info
|
||||
If you're looking to evaluate a milestone against a user, without knowing whether they're
|
||||
subscribed to it or not, you want [GPT/Targets/Milestones/Evaluate-For](gpt-targets.md#evaluate-a-milestone-for-a-user-even-if-they-arent-subscribed-to-it).
|
||||
If you're looking to evaluate a quest against a user, without knowing whether they're
|
||||
subscribed to it or not, you want [GPT/Targets/Quests/Evaluate-For](gpt-targets.md#evaluate-a-quest-for-a-user-even-if-they-arent-subscribed-to-it).
|
||||
|
||||
This endpoint is admittedly in a very strange position, where it overlaps with that `evaluate-for` endpoint quite significantly, but this endpoint is also intended to return the user's `milestoneSub`, so I thought it best to split this into two endpoints.
|
||||
This endpoint is admittedly in a very strange position, where it overlaps with that `evaluate-for` endpoint quite significantly, but this endpoint is also intended to return the user's `questSub`, so I thought it best to split this into two endpoints.
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -86,10 +86,10 @@ None.
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestoneSub` | MilestoneSubDocument | The user's subscription to this milestone. |
|
||||
| `milestone` | MilestoneDocument | The milestone document in question. |
|
||||
| `goals` | Array<GoalDocument> | The goals involved in this milestone. |
|
||||
| `results` | Array<EvaluatedGoalResult> | The user's progress on each goal in this milestone. |
|
||||
| `questSub` | QuestSubDocument | The user's subscription to this quest. |
|
||||
| `quest` | QuestDocument | The quest document in question. |
|
||||
| `goals` | Array<GoalDocument> | The goals involved in this quest. |
|
||||
| `results` | Array<EvaluatedGoalResult> | The user's progress on each goal in this quest. |
|
||||
|
||||
#### EvaluatedGoalResult
|
||||
|
||||
@@ -104,9 +104,9 @@ None.
|
||||
|
||||
*****
|
||||
|
||||
## Subscribe to a milestone.
|
||||
## Subscribe to a quest.
|
||||
|
||||
`PUT /api/v1/users/:userID/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`PUT /api/v1/users/:userID/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
### Permissions
|
||||
|
||||
@@ -121,16 +121,16 @@ None. (All relevant info is in the URL.)
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `goals` | Array<GpalDocument> | The goals involved in this milestone. |
|
||||
| `milestone` | MilestoneDocument | The milestone the user just subscribed to. |
|
||||
| `goalResults` | Array<EvaluatedGoalResults> | The user's progress on each individual goal in this milestone. |
|
||||
| `milestoneSub` | MilestoneSubscriptionDocument | The milestone subscription this user just created |
|
||||
| `goals` | Array<GpalDocument> | The goals involved in this quest. |
|
||||
| `quest` | QuestDocument | The quest the user just subscribed to. |
|
||||
| `goalResults` | Array<EvaluatedGoalResults> | The user's progress on each individual goal in this quest. |
|
||||
| `questSub` | QuestSubscriptionDocument | The quest subscription this user just created |
|
||||
|
||||
*****
|
||||
|
||||
## Unsubscribe from a milestone.
|
||||
## Unsubscribe from a quest.
|
||||
|
||||
`DELETE /api/v1/users/:userID/games/:game/:playtype/targets/milestones/:milestoneID`
|
||||
`DELETE /api/v1/users/:userID/games/:game/:playtype/targets/quests/:questID`
|
||||
|
||||
### Permissions
|
||||
|
||||
@@ -145,4 +145,4 @@ None.
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `milestone` | MilestoneDocument | The milestone you just unsubscribed from. |
|
||||
| `quest` | QuestDocument | The quest you just unsubscribed from. |
|
||||
|
||||
@@ -16,5 +16,5 @@ Refers to "User on Game + Playtype" - A user's "something" on a game and that pl
|
||||
Targets are a bucket term for things a user might set as targets to aim for. This term subsumes the following features:
|
||||
|
||||
- Goals
|
||||
- Milestones
|
||||
- Sets
|
||||
- Quests
|
||||
- Questlines
|
||||
|
||||
@@ -30,4 +30,4 @@ The current Events are:
|
||||
| :: | :: |
|
||||
| `class-update/v1` | Fires whenever a user has had a class update positively, such as going from 9th Dan to 10th Dan. |
|
||||
<!-- | `goal-achieved/v1` | Fires whenever a user has achieved a goal. |
|
||||
| `milestone-achieved/v1` | Fires whenever a user has achieved a milestone. | -->
|
||||
| `quest-achieved/v1` | Fires whenever a user has achieved a quest. | -->
|
||||
|
||||
Reference in New Issue
Block a user