Class NotificationSettingsApi

    • Constructor Detail

      • NotificationSettingsApi

        public NotificationSettingsApi​(GitLabApi gitLabApi)
    • Method Detail

      • getGlobalNotificationSettings

        public NotificationSettings getGlobalNotificationSettings()
                                                           throws GitLabApiException
        Get the global notification settings.
        GitLab Endpoint: GET /notification_settings
        Returns:
        a NotificationSettings instance containing the global notification settings
        Throws:
        GitLabApiException - if any exception occurs
      • updateGlobalNotificationSettings

        public NotificationSettings updateGlobalNotificationSettings​(NotificationSettings settings)
                                                              throws GitLabApiException
        Update the global notification settings.
        GitLab Endpoint: PUT /notification_settings
        Parameters:
        settings - a NotificationSettings instance with the new settings
        Returns:
        a NotificationSettings instance containing the updated global notification settings
        Throws:
        GitLabApiException - if any exception occurs
      • getGroupNotificationSettings

        public NotificationSettings getGroupNotificationSettings​(int groupId)
                                                          throws GitLabApiException
        Get the notification settings for a group.
        GitLab Endpoint: GET /groups/:id/notification_settings
        Parameters:
        groupId - the group ID to get the notification settings for
        Returns:
        a NotificationSettings instance containing the specified group's notification settings
        Throws:
        GitLabApiException - if any exception occurs
      • updateGroupNotificationSettings

        public NotificationSettings updateGroupNotificationSettings​(int groupId,
                                                                    NotificationSettings settings)
                                                             throws GitLabApiException
        Update the notification settings for a group
        GitLab Endpoint: PUT /groups/:id/notification_settings
        Parameters:
        groupId - the group ID to update the notification settings for
        settings - a NotificationSettings instance with the new settings
        Returns:
        a NotificationSettings instance containing the updated group notification settings
        Throws:
        GitLabApiException - if any exception occurs
      • getProjectNotificationSettings

        public NotificationSettings getProjectNotificationSettings​(int projectId)
                                                            throws GitLabApiException
        Get the notification settings for a project.
        GitLab Endpoint: GET /projects/:id/notification_settings
        Parameters:
        projectId - the project ID to get the notification settings for
        Returns:
        a NotificationSettings instance containing the specified project's notification settings
        Throws:
        GitLabApiException - if any exception occurs
      • updateProjectNotificationSettings

        public NotificationSettings updateProjectNotificationSettings​(int projectId,
                                                                      NotificationSettings settings)
                                                               throws GitLabApiException
        Update the notification settings for a project
        GitLab Endpoint: PUT /projects/:id/notification_settings
        Parameters:
        projectId - the project ID to update the notification settings for
        settings - a NotificationSettings instance with the new settings
        Returns:
        a NotificationSettings instance containing the updated project notification settings
        Throws:
        GitLabApiException - if any exception occurs