示例#1
0
        public void GetSingleObjectTest()
        {
            var singleDataObject = _serviceObject.GetSingle($"projects/{_configData.ProjectId}");

            Assert.IsNotNull(singleDataObject);
            Assert.AreEqual(singleDataObject.Data.Id, _configData.ProjectId);
        }
示例#2
0
        public void GetSingleObject_InvalidCredential()
        {
            _serviceObject = new GcDataRepository <GcProject>("123", "abc");
            var singleDataObject = _serviceObject.GetSingle($"projects/{_configData.ProjectId}");

            Assert.IsNotNull(singleDataObject);
            Assert.AreEqual(singleDataObject.Data, null);
        }
示例#3
0
        /* Get methods for Accounts end. */

        /* Get methods for Projects start. */

        public GcProject GetProjectById(int projectId)
        {
            var urlPath = $"projects/{projectId}";

            return(_projectClient.GetSingle(urlPath).Data);
        }
示例#4
0
        /* Get method for Me ends. */

        /* Get methods  for Accounts start. */

        public GcAccount GetAccountById(int accountId)
        {
            var urlPath = $"accounts/{accountId}";

            return(_accountClient.GetSingle(urlPath).Data);
        }
示例#5
0
 /* Get method for Me starts. */
 public GcMe GetMe()
 {
     return(_meClient.GetSingle("me").Data);
 }
示例#6
0
        /* Get method for Files of Items ends. */

        /* Get methods for Templates start. */

        public GcTemplate GetTemplateById(int templateId)
        {
            var urlPath = $"templates/{templateId}";

            return(_templateClient.GetSingle(urlPath).Data);
        }
示例#7
0
        /* Get methods for Statuses of Projects end. */

        /* Get methods for Items start. */

        public GcItem GetItemById(string itemId)
        {
            var urlPath = $"items/{itemId}";

            return(_itemClient.GetSingle(urlPath).Data);
        }
示例#8
0
        /* Get methods for Projects end. */

        /* Get methods for Statuses of Projects start. */

        public GcStatus GetStatusById(int projectId, int statusId)
        {
            var urlPath = $"projects/{projectId}/statuses/{statusId}";

            return(_statusClient.GetSingle(urlPath).Data);
        }