-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I saw there is already an API part in this repository, but I wonder how much should we really expose as API. For example, in the first step I would suggest we define a read-only API and handle all the writing/updating from inside this module.
For Read we should I think only have a single function which returns active/inactive, and handle everything else in the background.
In the next step we can think what kind of People we want to target. Only Developers working on a full Shop, or also module developers. Should other module developers be able to have a soft dependency?
But I dont really see a reason why module developers should need it, so we probably only want to support full shops as target group.
Adding a new Toggle should be easy, and its probably good to default new toggles to "deactivated" to keep the API most simple.
Starting with this, adding a new FeatureToggle should only have a single parameter, its Id/Name. It should be easy to add. The most easy way would be adding on first request, so as soon someone asks if an featureToggle is active, it would be created if not found yet. An alternative would be via setup script, but thats always kind of annoying.
Any comments/opinions for this?