Esempio n. 1
0
        public IObservable <ITask> Create(ITask task)
        {
            var endPoint   = endPoints.Post(task.WorkspaceId, task.ProjectId);
            var taskCopy   = task as Task ?? new Task(task);
            var observable = CreateObservable(endPoint, AuthHeader, taskCopy, SerializationReason.Post);

            return(observable);
        }
Esempio n. 2
0
        public Task <ITask> Create(ITask task)
        {
            var endPoint = endPoints.Post(task.WorkspaceId, task.ProjectId);
            var taskCopy = task as TogglTask ?? new TogglTask(task);

            return(SendRequest(endPoint, AuthHeader, taskCopy, SerializationReason.Post)
                   .Upcast <ITask, TogglTask>());
        }