Class NotificationSettingsApi

java.lang.Object
org.gitlab4j.api.AbstractApi
org.gitlab4j.api.NotificationSettingsApi
All Implemented Interfaces:
Constants

public class NotificationSettingsApi extends AbstractApi
  • Constructor Details

    • NotificationSettingsApi

      public NotificationSettingsApi(GitLabApi gitLabApi)
  • Method Details

    • 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(long 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(long 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(long 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(long 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