Content Hub documentation is missing various pieces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Client Developer Experience |
New
|
Undecided
|
Unassigned | ||
Ubuntu Developer Portal |
Triaged
|
Medium
|
Ken VanDine |
Bug Description
https:/
Most of these issues are found in the "App registration as source or destination" section, which I will dissect below. Things which need clarification are in between ---8<--- sections.
-------
It’s done with Click package hooks. These are declared in a Click package’s manifest.json file. Specially, the json object has a “Hooks” item that carries the needed info. It may look like like this:
{
[...]
"hooks": {
"APPONE": {
},
"APPTWO": {
}
},
[...]
}
Each app that wants to declare itself as a source or destination sets the content-hub hook to equal the filename of the json file (in the app source tree) that contains the required information.
-------
What should the content-hub click hook json file be called? It obviously can't be named <myapp>.json; the apparmor click hook is already called that. Can it be named anything I like as long as it's correctly linked from the manifest, or does it have to be named something relevant? Can I combine the apparmor and content-hub json files into one single file?
-------
Let’s look at one of these, APPONE.json:
{
"source": [
"pictures"
]
}
With this, when the click package is installed, Content Hub learns that APPONE is registered as a source (an exporter) of pictures.
-------
What's the opposite of "source", if I want to be an *importer* of pictures? What are the allowed content-types? https:/
Changed in developer-ubuntu-com: | |
assignee: | nobody → Ken VanDine (ken-vandine) |
status: | New → Triaged |
importance: | Undecided → Medium |
Also, there is a "share" option in my content-hub json file; in addition to "source" and "destination", there's "share"! http:// bazaar. launchpad. net/~ken- vandine/ +junk/hub- importer/ view/head: /content- hub/hub- importer. json makes this clear, but the docs don't mention it at all.