File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Threading . Tasks ;
4
+
4
5
using GitLabApiClient . Internal . Paths ;
5
6
using GitLabApiClient . Models . Job . Requests ;
6
7
using GitLabApiClient . Models . Job . Responses ;
@@ -30,6 +31,13 @@ public interface IProjectsClient
30
31
/// <param name="options">Query options.</param>
31
32
Task < IList < Project > > GetAsync ( Action < ProjectQueryOptions > options = null ) ;
32
33
34
+ /// <summary>
35
+ /// Get a list of projects for specified user
36
+ /// </summary>
37
+ /// <param name="userId">Id of the user.</param>
38
+ /// <returns></returns>
39
+ Task < IList < Project > > GetByUser ( int userId ) ;
40
+
33
41
/// <summary>
34
42
/// Get the users list of a project.
35
43
/// </summary>
Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . Net . Http ;
4
4
using System . Threading . Tasks ;
5
+
5
6
using GitLabApiClient . Internal . Http ;
6
7
using GitLabApiClient . Internal . Paths ;
7
8
using GitLabApiClient . Internal . Queries ;
@@ -61,6 +62,16 @@ public async Task<IList<Project>> GetAsync(Action<ProjectQueryOptions> options =
61
62
return await _httpFacade . GetPagedList < Project > ( url ) ;
62
63
}
63
64
65
+ /// <summary>
66
+ /// Get a list of projects for specified user
67
+ /// </summary>
68
+ /// <param name="userId">Id of the user.</param>
69
+ /// <returns></returns>
70
+ public async Task < IList < Project > > GetByUser ( int userId )
71
+ {
72
+ return await _httpFacade . GetPagedList < Project > ( $ "users/{ userId } /projects") ;
73
+ }
74
+
64
75
/// <summary>
65
76
/// Get the users list of a project.
66
77
/// </summary>
You can’t perform that action at this time.
0 commit comments