-
-
Notifications
You must be signed in to change notification settings - Fork 428
-
Classes contain a leveling attribute, which details any new features, spells, and otherwise obtained at each level. It details both information for that class and all of its subclasses. One example is Warlock. Warlock's leveling endpoint is https://www.dnd5eapi.co/api/classes/warlock/levels.
You'll see that there are two leveling sets for level 1. The first is the features that all level one warlocks receive. The second specifies the rewards that exclusively warlocks of the fiend subclass obtain. I feel that this subclass specific information should be contained within a separate endpoint specifically for that subclass. This way the warlock leveling endpoint would only contain perks that ALL warlocks get.
This would mean adding a new subclass_levels attribute to warlock, which would be a string for the leveling endpoint URL.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
There's already an issue that discusses this, #366.
In a comment on that issue, I suggest modifying the /classes/{index}/levels endpoint to only include base class levels. Note that /subclasses/{index}/levels already exists, and only includes subclass levels.
However, I also note that there is value to having a combined list, as class levels and subclass levels are identical in structure, and would be treated the same way by the consumer.
If we removed subclass levels from the /classes/{index}/levels endpoint, I would suggest adding an optional subclass query parameter that allows the consumer to include subclass levels for a particular subclass. That way, all the level documents needed to level a (single classed) character can be included in the same request. See the linked issue for an example.
Beta Was this translation helpful? Give feedback.
All reactions
-
That way, all the level documents needed to level a (single classed) character can be included in the same request. See the linked issue for an example.
I do see the value in being a able to get all levels for a particular subclass (including base class) with only one query. However in that sense I definitely also see value in being able to do get only base class levels with one query.
I think the idea you proposed on having an additional subclass parameter in the query would be best.
Beta Was this translation helpful? Give feedback.
All reactions
-
I also think that's a solid suggestion.
Beta Was this translation helpful? Give feedback.