The package manager provides a json interface.
Actions consist of a required type and an optinal payload. Responses consit of a success property and optional a payload with additional information.
{
"type": "GETVERSION"
}
{ "payload": { "major": 0, "minor": 0, "patch": 16 }, "success": true }
{
"type": "GETAVAILABLEPACKAGES",
"payload": {
"config": {
"localAddonsPath": "local_addons",
"ofPath": "/Users/thomas.geissl/libs/of_v0.11.0_osx_release/",
"packagesPath": "/Users/thomas.geissl/.ofPackages"
}
}
}
{
"payload": {
"data": []
},
"success": true
}
{
"type": "INSTALLPACKAGEBYID",
"payload": {
"id": "ofxMidi",
"destination": "local_addons",
"config": {
"localAddonsPath": "local_addons",
"ofPath": "/Users/thomas.geissl/libs/of_v0.11.0_osx_release/",
"packagesPath": "/Users/thomas.geissl/.ofPackages"
}
}
}
{
"payload": {
"package": {
"checkout": "f1d92fd8e",
"path": "local_addons/ofxMidi",
"url": "https://github.com/danomatika/ofxMidi.git"
}
},
"success": true
}
{
"type": "INSTALLPACKAGEBYID",
"payload": {
"id": "ofxLua",
"checkout": "1.3.0",
"destination": "local_addons",
"config": {
"localAddonsPath": "local_addons",
"ofPath": "/Users/thomas.geissl/libs/of_v0.11.0_osx_release/",
"packagesPath": "/Users/thomas.geissl/.ofPackages"
}
}
}
{
"payload": {
"package": {
"checkout": "d792bb700",
"path": "local_addons/ofxLua",
"url": "https://github.com/danomatika/ofxLua.git"
}
},
"success": true
}
{
"type": "INSTALL",
"config": {
"localAddonsPath": "local_addons",
"ofPath": "/Users/thomas.geissl/libs/of_v0.11.0_osx_release/",
"packagesPath": "/Users/thomas.geissl/.ofPackages"
}
}
{ "success": true }
{
"type": "ADDPACKAGETOADDONSMAKEFILE",
"payload": {
"package": {
"checkout": "f1d92fd8e",
"path": "local_addons/ofxMidi",
"url": "https://github.com/danomatika/ofxMidi.git"
},
"config": {
"localAddonsPath": "local_addons",
"ofPath": "/Users/thomas.geissl/libs/of_v0.11.0_osx_release/",
"packagesPath": "/Users/thomas.geissl/.ofPackages"
}
}
}
{ "success": true }
{
"type": "SEARCHPACKAGEINDATABASEBYID",
"payload": {
"id": "ofxCv",
"config": {
"localAddonsPath": "local_addons",
"ofPath": "/Users/thomas.geissl/libs/of_v0.11.0_osx_release/",
"packagesPath": "/Users/thomas.geissl/.ofPackages"
}
}
}
{ "payload": { "data": { "items": [] } }, "success": true }
{
"type": "SEARCHPACKAGEONGITHUBBYNAME",
"payload": {
"id": "ofxCv"
}
}
{ "payload": { "data": {} }, "success": true }
{
"type": "SEARCHPACKAGEONGITHUBBYUSER",
"payload": {
"user": "bakercp"
}
}
{ "payload": { "data": {} }, "success": true }
- a node.js example can be found in scripts/test/index.js
- terminal:
ofPackageManager "{\"type\": \"GETVERSION\"}"