예제 #1
0
        public IEnumerable <Project> GetProjects()
        {
            const string path = "/projects";
            var          e    = this.RequestPivotal <ProjectsXmlResponse>(path, null, "GET");

            return(e.projects.Select(p => PivotalProjectRepository.CreateProject(p)).ToList());
        }
예제 #2
0
        public Project GetProject(int id)
        {
            var path = string.Format("/projects/{0}", id);
            var e    = this.RequestPivotal <ProjectXmlResponse>(path, null, "GET");

            return(PivotalProjectRepository.CreateProject(e));
        }
        public async Task <IEnumerable <Project> > GetProjectsAsync()
        {
            const string path = "/projects";
            var          e    = await this.RequestPivotalAsync <ProjectXmlResponse[]>(path, null, "GET");

            return(e.Select(p => PivotalProjectRepository.CreateProject(p)).ToList());
        }
        public async Task <Project> GetProjectAsync(int id)
        {
            var path = string.Format("/projects/{0}", id);
            var e    = await this.RequestPivotalAsync <ProjectXmlResponse>(path, null, "GET");

            return(PivotalProjectRepository.CreateProject(e));
        }
예제 #5
0
        public Project CreateProject(Repository.PivotalProjectRepository.ProjectXmlRequest projectRequest)
        {
            var path = string.Format("/projects");


            var e = this.RequestPivotal <ProjectXmlResponse>(path, projectRequest, "POST");

            return(PivotalProjectRepository.CreateProject(e));
        }
        public async Task <Project> CreateProjectAsync(Repository.PivotalProjectRepository.ProjectXmlRequest projectRequest)
        {
            var path = string.Format("/projects");


            var e = await this.RequestPivotalAsync <ProjectXmlResponse>(path, projectRequest, "POST");

            return(PivotalProjectRepository.CreateProject(e));
        }