I like to have my sketches in source control. That is fine for all our code, but the app definition is not bidirectional.
We can fetch a text representation of an app via the HTTP Get project API and we can toss that into source control, but the utility of that is limited since we cannot roll back to an earlier state and import it back into the app to get back to where we were previously. We would have to read the json and manually change the widgets.
What I suggest is two things, one an enhancement to the Get Project and the other, a way to submit a project.
- The enhancement, in the same way that we can have the authorization token emailed to use from the app properties screen, it would be nice to have an option to email us the json file of the project.
- The more important step is being able to to bring such a json project file into the app builder.
This could be via an import gesture in the app, or perhaps by an HTTP PUT. I think having a local import in the app would make issues of adjusting energy easier to handle. Downside of a local import is that file handling of mobile devices is rather cumbersome, but doable.
If the project file could be submitted via HTTP, I think it would be best if there was a Blynk URL we could visit, paste in the project json and click a button to have that definition become the new app definition. We would have to authenticate and the auth token would need to match.
Existing and new energy use of the app could be compared and any net increase compared against our balance before it could succeed.