public async Task <IEnumerable <GroupProject> > GetGroupProjects() { var route = new GroupProjectRoute(); RestSharpBase restSharpBase = new RestSharpBase(route.GetUrl, Method.GET); var response = await _client.ExecuteAsync <IEnumerable <GroupProject> >(restSharpBase.Request); switch ((int)response.StatusCode) { case 200: return(response.Data); default: throw new System.Exception(response.StatusDescription); } }
public async Task <IEnumerable <Model> > GetModels(string projectId) { var route = new ModelRoute(projectId); RestSharpBase restSharpBase = new RestSharpBase(route.GetProjectsUrl, Method.GET); IRestResponse <IEnumerable <Model> > response = await _client.ExecuteAsync <IEnumerable <Model> >(restSharpBase.Request); switch ((int)response.StatusCode) { case 200: return(response.Data); default: throw new System.Exception(response.StatusDescription); } }