Closed dbrody closed 3 years ago
This initial version has been added as of 8.3.0.
Thank you so much @dbrody for adding this, very helpful! And apologies for not replying earlier. May I ask if this is the single API command available in 8.3.0? Based on the data returned by the versions command, I'd like to do:
for each (d in data){
if(d.syncable){
//omitted: duplicate a page in Sketch, name it by the value of d.name, and select all objects on that page
ContentSync.API().syncSelection(d.name, selection);
}
}
Edit: I've added this as a feature request – #129
Request
Feature request by user to get ContentSync versions from a run script or other plugin code.
Proposed Solution
With the Sketch ContentSync plugin installed, on the run script of sketch you can now do something like this:
The return value of
data
onok=true
is an array of ContentSync versions on the active project.Each version is of shape:
Example