Roadmap
Roadmap copied to clipboard
Add votes field to RoadmapFeature
I added a votes field to the RoadmapFeature model type to allow the data source to return the current number of votes with the feature list download and not require separate API calls for each feature. I retained existing functionality by making the votes field optional and defaulting to the previous behavior if the field is not present in the JSON.
For background context, I created my own backend API for managing features for my application. I'm providing the API call as a URLRequest
to the RoadmapConfiguration
object. My API can retrieve all of the feature data including the current vote count for features and return them. This PR eliminates the need to have a separate service or API for managing vote counts. The FeatureVoter
protocol is still being used to up-vote and down-vote features as I have separate REST APIs defined for that.