Description

Appkit service for accessing Appkit Collaboration API’s

Methods

delete(annotation, platform, id)

Deletes an annotation
Parameters
ParamTypeDetails
annotationstringThe type of collaboration annotation to delete. Valid values are:
comment - For deleting a comment.
bookmark - For deleting a bookmark.
topic - For deleting a topic.
link - For deleting a like.
saved-query - For deleting a saved-query.
platformstringThe name of the platform.
idstringThe ID of the annotation to be deleted.
Returns
HttpPromiseReturns a promise which will resolve depending on the response from the API.

Example

CollaborationService.delete('comment', 'platform', 123456);

getCommentAddedEventName(target, topic, collection)

Method for returning the event emitted when a comment is added
Parameters
ParamTypeDetails
targetstringThe comment target.
topic
(optional)
stringThe topic associated to the comment.
collection
(optional)
stringThe collection associated to the comment.
Returns
stringThe event name that will be emitted.

Example

CollaborationService.getCommentAddedEventName(target, collection, topic);

post(annotation, platform, data)

Creates an annotation
Parameters
ParamTypeDetails
annotationstringThe type of collaboration annotation to delete. Valid values are:
comment - For creating a comment.
bookmark - For creating a bookmark.
topic - For creating a topic.
link - For creating a like.
saved-query - For creating a saved-query.
platformstringThe name of the platform.
dataobjectThe data object for creating the required annotation.
Returns
HttpPromiseReturns a promise which will resolve depending on the response from the API.

Example

CollaborationService.post('comment', 'platform', data);

query(annotation, platform, target, collection, topic, results)

Gets an array of Collaboration Annotations (comments, likes, topics or bookmarks) based on the options provided.
Parameters
ParamTypeDetails
annotationstringThe type of collaboration annotation you are searching for. Valid values are:
comments - Returns a list of comments
bookmarks - Returns a list of bookmarks
topics - Returns a list of topics
links - Returns a list of likes.
saved-queries - Returns a list of saved-queries.
platformstringThe name of the platform.
target (optional)stringWhen provided it will return only annotations associated with this target (not applicable to topics).
collection (optional)stringWhen provided it will return only annotations associated with this collection (not applicable to topics).
topic (optional)stringWhen provided it will return only annotations associated with this topic (not applicable to topics).
results (optional)numberThe number of annotations to return.
Returns
HttpPromiseReturns a promise which will resolve depending on the response from the API.

Example

CollaborationService.query('comments', 'platform', 'foo-bar');