# Notes

You can manipulate notes (comments) on group epics, project issues, merge requests and snippets.

## Reference

- v4 API:

  Epics:

  - `gitlab.v4.objects.GroupEpicNote`

  - `gitlab.v4.objects.GroupEpicNoteManager`

  - `gitlab.v4.objects.GroupEpic.notes`

  Issues:

  - `gitlab.v4.objects.ProjectIssueNote`

  - `gitlab.v4.objects.ProjectIssueNoteManager`

  - `gitlab.v4.objects.ProjectIssue.notes`

  MergeRequests:

  - `gitlab.v4.objects.ProjectMergeRequestNote`

  - `gitlab.v4.objects.ProjectMergeRequestNoteManager`

  - `gitlab.v4.objects.ProjectMergeRequest.notes`

  Snippets:

  - `gitlab.v4.objects.ProjectSnippetNote`

  - `gitlab.v4.objects.ProjectSnippetNoteManager`

  - `gitlab.v4.objects.ProjectSnippet.notes`

- GitLab API: https://docs.gitlab.com/ce/api/notes.html

## Examples

List the notes for a resource:

    e_notes = epic.notes.list()
    i_notes = issue.notes.list()
    mr_notes = mr.notes.list()
    s_notes = snippet.notes.list()

Get a note for a resource:

    e_note = epic.notes.get(note_id)
    i_note = issue.notes.get(note_id)
    mr_note = mr.notes.get(note_id)
    s_note = snippet.notes.get(note_id)

Create a note for a resource:

    e_note = epic.notes.create({'body': 'note content'})
    i_note = issue.notes.create({'body': 'note content'})
    mr_note = mr.notes.create({'body': 'note content'})
    s_note = snippet.notes.create({'body': 'note content'})

Update a note for a resource:

    note.body = 'updated note content'
    note.save()

Delete a note for a resource:

    note.delete()