NotesMixin#
- class NotesMixin#
Bases:
object
Notes API
Methods Summary
create_note
(project_id, item_id, clip[, ...])Create a new Note.
create_note_comment
(project_id, note_id, text)Create a new Comment for the Note.
delete_note
(project_id, note_id)Delete an existing Note.
delete_note_comment
(project_id, note_id, ...)Delete the Comment of the Note.
edit_note
(project_id, note_id[, color, ...])Edit the Note.
edit_note_comment
(project_id, note_id, ...)Edit the Comment of the Note.
query_notes
(project_id[, query, ...])- type project_id
Methods Documentation
- create_note(project_id, item_id, clip, color=None, comment=None, communities=None, facets=None)#
Create a new Note.
- Parameters
project_id (
str
) – the ID of the project in which the note will be created.item_id (
str
) – the ID of the Squirro Item for which the note is created.clip (
dict
) – a dict which contains the information to locate the selected passage for the note. If it is a document-level note (i.e., a note for the whole item, not for a specific part of it), then only the field key with value item needs to be supplied.color (
Optional
[str
]) – the color to use to highlight the note (selected text passage) on the UI.comment (
Optional
[str
]) – an initial comment along with the creation of the note.communities (
Optional
[List
[dict
]]) – a list of communities assigned to the note.facets (
Optional
[List
[dict
]]) – a list of facets assigned to the note.
- create_note_comment(project_id, note_id, text)#
Create a new Comment for the Note.
- delete_note(project_id, note_id)#
Delete an existing Note.
- delete_note_comment(project_id, note_id, comment_id)#
Delete the Comment of the Note.
- edit_note(project_id, note_id, color=None, communities=None, facets=None)#
Edit the Note.
- Parameters
project_id (
str
) – the ID of the project that the note belongs to.note_id (
str
) – the ID of the Note which will be edited.color (
Optional
[str
]) – the color to use to highlight the note (selected text passage) on the UI.communities (
Optional
[List
[dict
]]) – a list of communities assigned to the note.facets (
Optional
[List
[dict
]]) – a list of facets assigned to the note.
- edit_note_comment(project_id, note_id, comment_id, text)#
Edit the Comment of the Note.
- query_notes(project_id, query=None, group_by_item=False, item_fields=None)#
- Parameters
project_id (
str
) – the ID of the project from which notes will be queried.query (
Optional
[str
]) – Squirro syntax query to run against notes. Only notes that match the given search criteria will be returned.group_by_item (
bool
) – whether in the response the notes are grouped by the item they belong. Certain item fields can be requested when this is enabled.item_fields (
Optional
[str
]) – comma-separated list of item fields to return. It is only applicable when the group_by_item parameter is True.