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() {
49
49
private MergeRequestApi mergeRequestApi ;
50
50
private MilestonesApi milestonesApi ;
51
51
private NamespaceApi namespaceApi ;
52
+ private NotificationSettingsApi notificationSettingsApi ;
52
53
private PipelineApi pipelineApi ;
53
54
private ProjectApi projectApi ;
54
55
private RepositoryApi repositoryApi ;
@@ -848,6 +849,25 @@ public NotesApi getNotesApi() {
848
849
return (notesApi );
849
850
}
850
851
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
+
851
871
/**
852
872
* Gets the PipelineApi instance owned by this GitLabApi instance. The PipelineApi is used
853
873
* to perform all pipeline related API calls.
Original file line number Diff line number Diff line change 48
48
import org .gitlab4j .api .models .MergeRequest ;
49
49
import org .gitlab4j .api .models .Milestone ;
50
50
import org .gitlab4j .api .models .Note ;
51
+ import org .gitlab4j .api .models .NotificationSettings ;
51
52
import org .gitlab4j .api .models .OauthTokenResponse ;
52
53
import org .gitlab4j .api .models .Pipeline ;
53
54
import org .gitlab4j .api .models .Project ;
@@ -331,6 +332,17 @@ public void testNote() {
331
332
}
332
333
}
333
334
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
+
334
346
@ Test
335
347
public void testProject () {
336
348
You can’t perform that action at this time.
0 commit comments