public Task <List <Types.Pipeline> > Get(PipelinesRequest request = null)
        {
            Dictionary <string, string> queryParameters = null;

            if (request != null)
            {
                queryParameters = JsonConvert.DeserializeObject <Dictionary <string, string> >(JsonConvert.SerializeObject(request));
            }

            return(_api.Get <List <Types.Pipeline> >($"/projects/{ProjectId}/pipelines", queryParameters));
        }
 public async Task <Project> Get()
 {
     try
     {
         return(await _api.Get <Project>($"/projects/{ProjectId}"));
     }
     catch (ApiRequestException ex)
     {
         if (ex.StatusCode == HttpStatusCode.NotFound)
         {
             return(null);
         }
         throw;
     }
 }
Example #3
0
        public Task <List <Types.Job> > Get(JobsRequest request = null)
        {
            Dictionary <string, string> queryParameters = null;

            if (request != null)
            {
                queryParameters = JsonConvert.DeserializeObject <Dictionary <string, string> >(JsonConvert.SerializeObject(request));
            }

            var url = _pipeline != null
                ? $"/projects/{ProjectId}/pipelines/{_pipeline.PipelineId}/jobs"
                : $"/projects/{ProjectId}/jobs";

            return(_api.Get <List <Types.Job> >(url,
                                                queryParameters));
        }
 public Task <Types.Pipeline> Get()
 {
     return(_api.Get <Types.Pipeline>($"/projects/{ProjectId}/pipelines/{PipelineId}"));
 }
Example #5
0
 public Task <Types.Job> Get()
 {
     return(_api.Get <Types.Job>($"/projects/{ProjectId}/jobs/{JobId}"));
 }