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()); }
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)); }
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)); }