diff --git a/Api/ApiConnection.cs b/Api/ApiConnection.cs index 15caa3fe9f29..b3ffa8923799 100644 --- a/Api/ApiConnection.cs +++ b/Api/ApiConnection.cs @@ -30,6 +30,7 @@ public class ApiConnection { private readonly static JsonSerializerSettings _jsonSettings = new() { Converters = { new LiveAlgorithmResultsJsonConverter(), new OrderJsonConverter() } }; + /// /// Authorized client to use for requests. /// public RestClient Client; diff --git a/Common/Api/Project.cs b/Common/Api/Project.cs index d708989c6710..8713f44031d5 100644 --- a/Common/Api/Project.cs +++ b/Common/Api/Project.cs @@ -1,4 +1,4 @@ -/* +/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * @@ -13,8 +13,8 @@ * limitations under the License. */ using System; -using System.Collections.Generic; using Newtonsoft.Json; +using System.Collections.Generic; namespace QuantConnect.Api { @@ -52,6 +52,12 @@ public class Project : RestResponse /// [JsonProperty(PropertyName = "language")] public Language Language { get; set; } + + /// + /// The projects owner id + /// + [JsonProperty(PropertyName = "ownerId")] + public int OwnerId { get; set; } } /// @@ -65,4 +71,4 @@ public class ProjectResponse : RestResponse [JsonProperty(PropertyName = "projects")] public List Projects { get; set; } } -} \ No newline at end of file +} diff --git a/Tests/Api/ProjectTests.cs b/Tests/Api/ProjectTests.cs index 52a97e099a42..c8ebda9d204c 100644 --- a/Tests/Api/ProjectTests.cs +++ b/Tests/Api/ProjectTests.cs @@ -29,6 +29,17 @@ namespace QuantConnect.Tests.API [TestFixture, Explicit("Requires configured api access and available backtest node to run on")] public class ProjectTests : ApiTestBase { + [Test] + public void ReadProject() + { + var readProject = ApiClient.ReadProject(16408347); + Assert.IsTrue(readProject.Success); + Assert.AreEqual(1, readProject.Projects.Count); + + var project = readProject.Projects[0]; + Assert.AreNotEqual(0, project.OwnerId); + } + /// /// Test creating and deleting projects with the Api ///