Skip to content

Instantly share code, notes, and snippets.

@voldyman
Last active December 16, 2015 05:39
Show Gist options
  • Save voldyman/5385932 to your computer and use it in GitHub Desktop.
Save voldyman/5385932 to your computer and use it in GitHub Desktop.
Sample contractor usage
void main () {
var file = "/home/<user>/Downloads/woah_dude.gif";
var mime = "image/gif";
var contractor = new Granite.Services.Contractor.for_mime (mime);
foreach (var contract in contractor.get_contracts ()) {
print ("id: "+contract.id+" name:" +contract.display_name);
}
var option = readline ("Enter id");
contractor.execute (id, file);
//or
contractor.get_contract(id).execute (file);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment