diff --git a/src/GitLabApiClient/Models/Projects/Requests/TransferProjectRequest.cs b/src/GitLabApiClient/Models/Projects/Requests/TransferProjectRequest.cs new file mode 100644 index 00000000..489021d3 --- /dev/null +++ b/src/GitLabApiClient/Models/Projects/Requests/TransferProjectRequest.cs @@ -0,0 +1,13 @@ +using Newtonsoft.Json; + +namespace GitLabApiClient.Models.Projects.Requests +{ + public class TransferProjectRequest + { + /// + /// The ID or path of the namespace to transfer to project to + /// + [JsonProperty("namespace")] + public string NameSpace { get; set; } + } +} \ No newline at end of file diff --git a/src/GitLabApiClient/ProjectsClient.cs b/src/GitLabApiClient/ProjectsClient.cs index 4e7abf3a..ff726ed1 100644 --- a/src/GitLabApiClient/ProjectsClient.cs +++ b/src/GitLabApiClient/ProjectsClient.cs @@ -39,7 +39,7 @@ public async Task GetAsync(int projectId) => await _httpFacade.Get($"projects/{projectId}"); /// - /// Get a list of visible projects for authenticated user. + /// Get a list of visible projects for authenticated user. /// When accessed without authentication, only public projects are returned. /// /// Query options. @@ -190,5 +190,11 @@ public async Task ArchiveAsync(int id) => /// Id of the project. public async Task UnArchiveAsync(int id) => await _httpFacade.Post($"projects/{id}/unarchive"); + + public async Task Transfer(string id, TransferProjectRequest request) + { + Guard.NotNull(request, nameof(request)); + return await _httpFacade.Put($"projects/{id}/transfer", request); + } } } \ No newline at end of file