Class NotesApi

    • Constructor Detail

      • NotesApi

        public NotesApi​(GitLabApi gitLabApi)
    • Method Detail

      • getNotes

        @Deprecated
        public List<Note> getNotes​(Object projectIdOrPath,
                                   Integer issueIid)
                            throws GitLabApiException
        Deprecated.
        As of release 4.7.0, replaced by getIssueNotes(Object, Integer)
        Get a list of the issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue ID to get the notes for
        Returns:
        a list of the issues's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getNotes

        @Deprecated
        public List<Note> getNotes​(Object projectIdOrPath,
                                   Integer issueIid,
                                   int page,
                                   int perPage)
                            throws GitLabApiException
        Deprecated.
        As of release 4.7.0, replaced by getIssueNotes(Object, Integer, int, int)
        Get a list of the issue's notes using the specified page and per page settings.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        page - the page to get
        perPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getNotes

        @Deprecated
        public Pager<Note> getNotes​(Object projectIdOrPath,
                                    Integer issueIid,
                                    int itemsPerPage)
                             throws GitLabApiException
        Deprecated.
        As of release 4.7.0, replaced by getIssueNotes(Object, Integer, int)
        Get a Pager of issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        itemsPerPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNotes

        public List<Note> getIssueNotes​(Object projectIdOrPath,
                                        Integer issueIid)
                                 throws GitLabApiException
        Get a list of the issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue ID to get the notes for
        Returns:
        a list of the issues's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNotes

        public List<Note> getIssueNotes​(Object projectIdOrPath,
                                        Integer issueIid,
                                        int page,
                                        int perPage)
                                 throws GitLabApiException
        Get a list of the issue's notes using the specified page and per page settings.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        page - the page to get
        perPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNotes

        public Pager<Note> getIssueNotes​(Object projectIdOrPath,
                                         Integer issueIid,
                                         int itemsPerPage)
                                  throws GitLabApiException
        Get a Pager of issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        itemsPerPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNotesStream

        public Stream<Note> getIssueNotesStream​(Object projectIdOrPath,
                                                Integer issueIid)
                                         throws GitLabApiException
        Get a Stream of the issues's notes.
        GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue ID to get the notes for
        Returns:
        a Stream of the issues's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getIssueNote

        public Note getIssueNote​(Object projectIdOrPath,
                                 Integer issueIid,
                                 Integer noteId)
                          throws GitLabApiException
        Get the specified issues's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to get the notes for
        noteId - the ID of the Note to get
        Returns:
        a Note instance for the specified IDs
        Throws:
        GitLabApiException - if any exception occurs
      • createIssueNote

        public Note createIssueNote​(Object projectIdOrPath,
                                    Integer issueIid,
                                    String body)
                             throws GitLabApiException
        Create a issues's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance @param projectIdOrPath the project ID to create the issues for
        issueIid - the issue IID to create the notes for
        body - the content of note
        Returns:
        the created Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • createIssueNote

        public Note createIssueNote​(Object projectIdOrPath,
                                    Integer issueIid,
                                    String body,
                                    Date createdAt)
                             throws GitLabApiException
        Create a issues's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to create the notes for
        body - the content of note
        createdAt - the created time of note
        Returns:
        the created Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • updateIssueNote

        public Note updateIssueNote​(Object projectIdOrPath,
                                    Integer issueIid,
                                    Integer noteId,
                                    String body)
                             throws GitLabApiException
        Update the specified issues's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to update the notes for
        noteId - the ID of the node to update
        body - the update content for the Note
        Returns:
        the modified Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • deleteIssueNote

        public void deleteIssueNote​(Object projectIdOrPath,
                                    Integer issueIid,
                                    Integer noteId)
                             throws GitLabApiException
        Delete the specified issues's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        issueIid - the issue IID to delete the notes for
        noteId - the ID of the node to delete
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public List<Note> getMergeRequestNotes​(Object projectIdOrPath,
                                               Integer mergeRequestIid)
                                        throws GitLabApiException
        Gets a list of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        Returns:
        a list of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public List<Note> getMergeRequestNotes​(Object projectIdOrPath,
                                               Integer mergeRequestIid,
                                               Constants.SortOrder sortOrder,
                                               Note.OrderBy orderBy)
                                        throws GitLabApiException
        Gets a list of all notes for a single merge request.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        Returns:
        a list of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public List<Note> getMergeRequestNotes​(Object projectIdOrPath,
                                               Integer mergeRequestIid,
                                               int page,
                                               int perPage)
                                        throws GitLabApiException
        Gets a list of all notes for a single merge request using the specified page and per page settings.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        page - the page to get
        perPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public List<Note> getMergeRequestNotes​(Object projectIdOrPath,
                                               Integer mergeRequestIid,
                                               Constants.SortOrder sortOrder,
                                               Note.OrderBy orderBy,
                                               int page,
                                               int perPage)
                                        throws GitLabApiException
        Gets a list of all notes for a single merge request using the specified page and per page settings.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        page - the page to get
        perPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public Pager<Note> getMergeRequestNotes​(Object projectIdOrPath,
                                                Integer mergeRequestIid,
                                                int itemsPerPage)
                                         throws GitLabApiException
        Get a Pager of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        itemsPerPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotesStream

        public Stream<Note> getMergeRequestNotesStream​(Object projectIdOrPath,
                                                       Integer mergeRequestIid)
                                                throws GitLabApiException
        Gets a Stream of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        Returns:
        a Stream of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotes

        public Pager<Note> getMergeRequestNotes​(Object projectIdOrPath,
                                                Integer mergeRequestIid,
                                                Constants.SortOrder sortOrder,
                                                Note.OrderBy orderBy,
                                                int itemsPerPage)
                                         throws GitLabApiException
        Get a Pager of all notes for a single merge request
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        itemsPerPage - the number of notes per page
        Returns:
        the list of notes in the specified range
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNotesStream

        public Stream<Note> getMergeRequestNotesStream​(Object projectIdOrPath,
                                                       Integer mergeRequestIid,
                                                       Constants.SortOrder sortOrder,
                                                       Note.OrderBy orderBy)
                                                throws GitLabApiException
        Gets a Stream of all notes for a single merge request.
        GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/notes
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the issue ID to get the notes for
        sortOrder - return merge request notes sorted in the specified sort order, default is DESC
        orderBy - return merge request notes ordered by CREATED_AT or UPDATED_AT, default is CREATED_AT
        Returns:
        a Stream of the merge request's notes
        Throws:
        GitLabApiException - if any exception occurs
      • getMergeRequestNote

        public Note getMergeRequestNote​(Object projectIdOrPath,
                                        Integer mergeRequestIid,
                                        Integer noteId)
                                 throws GitLabApiException
        Get the specified merge request's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to get the notes for
        noteId - the ID of the Note to get
        Returns:
        a Note instance for the specified IDs
        Throws:
        GitLabApiException - if any exception occurs
      • createMergeRequestNote

        public Note createMergeRequestNote​(Object projectIdOrPath,
                                           Integer mergeRequestIid,
                                           String body)
                                    throws GitLabApiException
        Create a merge request's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to create the notes for
        body - the content of note
        Returns:
        the created Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • updateMergeRequestNote

        public Note updateMergeRequestNote​(Object projectIdOrPath,
                                           Integer mergeRequestIid,
                                           Integer noteId,
                                           String body)
                                    throws GitLabApiException
        Update the specified merge request's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to update the notes for
        noteId - the ID of the node to update
        body - the update content for the Note
        Returns:
        the modified Note instance
        Throws:
        GitLabApiException - if any exception occurs
      • deleteMergeRequestNote

        public void deleteMergeRequestNote​(Object projectIdOrPath,
                                           Integer mergeRequestIid,
                                           Integer noteId)
                                    throws GitLabApiException
        Delete the specified merge request's note.
        Parameters:
        projectIdOrPath - the project in the form of an Integer(ID), String(path), or Project instance
        mergeRequestIid - the merge request IID to delete the notes for
        noteId - the ID of the node to delete
        Throws:
        GitLabApiException - if any exception occurs