File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
main/java/org/gitlab4j/api
test/java/org/gitlab4j/api Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ public String getApiNamespace() {
4949 private MergeRequestApi mergeRequestApi ;
5050 private MilestonesApi milestonesApi ;
5151 private NamespaceApi namespaceApi ;
52+ private NotificationSettingsApi notificationSettingsApi ;
5253 private PipelineApi pipelineApi ;
5354 private ProjectApi projectApi ;
5455 private RepositoryApi repositoryApi ;
@@ -848,6 +849,25 @@ public NotesApi getNotesApi() {
848849 return (notesApi );
849850 }
850851
852+ /**
853+ * Gets the NotesApi instance owned by this GitLabApi instance. The NotesApi is used
854+ * to perform all notes related API calls.
855+ *
856+ * @return the NotesApi instance owned by this GitLabApi instance
857+ */
858+ public NotificationSettingsApi getNotificationSettingsApi () {
859+
860+ if (notificationSettingsApi == null ) {
861+ synchronized (this ) {
862+ if (notificationSettingsApi == null ) {
863+ notificationSettingsApi = new NotificationSettingsApi (this );
864+ }
865+ }
866+ }
867+
868+ return (notificationSettingsApi );
869+ }
870+
851871 /**
852872 * Gets the PipelineApi instance owned by this GitLabApi instance. The PipelineApi is used
853873 * to perform all pipeline related API calls.
Original file line number Diff line number Diff line change 4848import org .gitlab4j .api .models .MergeRequest ;
4949import org .gitlab4j .api .models .Milestone ;
5050import org .gitlab4j .api .models .Note ;
51+ import org .gitlab4j .api .models .NotificationSettings ;
5152import org .gitlab4j .api .models .OauthTokenResponse ;
5253import org .gitlab4j .api .models .Pipeline ;
5354import org .gitlab4j .api .models .Project ;
@@ -331,6 +332,17 @@ public void testNote() {
331332 }
332333 }
333334
335+ @ Test
336+ public void testNotificationSettings () {
337+
338+ try {
339+ NotificationSettings settings = makeFakeApiCall (NotificationSettings .class , "notification-settings" );
340+ assertTrue (compareJson (settings , "notification-settings" ));
341+ } catch (Exception e ) {
342+ e .printStackTrace ();
343+ }
344+ }
345+
334346 @ Test
335347 public void testProject () {
336348
You can’t perform that action at this time.
0 commit comments