ContentSync.API()
ContentSync can also be used from other Sketch plugins too. Use ContentSync.API() within Sketch plugin code to integrate and extend ContentSync.
ContentSync.API().versions(callback(ok, data))
Function Definition
{
name: string,
syncable: boolean
}Example
function withV(v){
console.log(v);
}
// Fetch ContentSync versions and print them out
ContentSync.API().versions((ok, data) => {
if(ok) data.map(withV);
if(!ok) console.log("Error: ", data);
});ContentSync.API().pull(versions, callback(ok, data))
ContentSync.API().syncSelection(version_name, data, selection, callback(ok, data))
Development
Last updated