/// <summary> /// Changes the name and/or the report id of a job. /// </summary> /// <param name="jobId">Job ID to be edited</param> /// <param name="job">Updated job information</param> /// <param name="title">Sets whether the id given is the current title. By default, the value is "false"</param> /// <returns>SchooxResponse with status information</returns> public SchooxResponse EditJob(int jobId, NewJob job, string title = null) { //PUT /jobs/:jobid //https://www.schoox.com/api/v1/jobs/$d?apikey=schoox&acadId=386 var request = SService.GenerateBaseRequest("/jobs/{jobId}"); request.Method = Method.PUT; request.AddUrlSegment("jobId", jobId.ToString(CultureInfo.InvariantCulture)); request.AddNonBlankQueryString("title", title); request.AddJsonBody(job); return Execute(request); }
/// <summary> /// Creates a new job /// </summary> /// <param name="job">Job name, and report_id</param> /// <returns>SchooxResponse with status information</returns> public SchooxResponse AddNewJob(NewJob job) { //POST /jobs //https://www.schoox.com/api/v1/jobs?apikey=schoox&acadId=386 var request = SService.GenerateBaseRequest("/jobs"); request.Method = Method.POST; request.AddJsonBody(job); return Execute(request); }