This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 105
Bookmarks Plugin
Bernhard Posselt edited this page Nov 23, 2015
·
10 revisions
This should be implemented using a clientside plugin, see https://github.com/owncloud/news/wiki/How-to-write-Plugins#clientside-plugin
After clicking a bookmarks icon button (first idea: simply copy the bookmarks app's icon) it should send a request to the bookmarks app looking like this:
POST /apps/bookmarks/bookmarks
{
"url": article.url,
"name": article.title
}
The following cases for the response exist:
- Success (HTTP 200-299)
- Error (HTTP 400-599)
A successful request should probably show a notification using the notification API (I'm not sure about this yet).
Error messages should be shown using the ownCloud notification API:
var text = $('<p>').text('error message goes here').html();
OC.Notification.showHtml(text);
The Bookmarks app does not expose an API for this yet but there is an open issue:https://github.com/owncloud/bookmarks/issues/215
The URL to the bookmarks app can be generated like this:
OC.generateUrl('/apps/bookmarks');