/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { ActiveStudentsExternal = new ActiveStudentsExternal(this); BulkStudentsExternal = new BulkStudentsExternal(this); StudentMarksExternal = new StudentMarksExternal(this); BaseUri = new System.Uri("https://gateway.kmdlogic.io/studica/students/v1"); SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='studentIds'> /// A list of students to get marks for /// </param> /// <param name='onlyIncludeMarksForExamPaper'> /// Flag to indicate if service should only return marks that should be /// included on exam paper /// </param> /// <param name='pageNumber'> /// The number of the page to return (1 is the first page). /// </param> /// <param name='pageSize'> /// Number of objects per page. /// </param> /// <param name='inlineCount'> /// A flag indicating if total number of items should be included. /// </param> /// <param name='schoolCode'> /// The school code for which to get data. /// </param> /// <param name='xSelectedSchoolCode'> /// Selected school code, used when multiple impersonation permissions are /// available on the token /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PagedResponseStudentMarksExternalResponse> GetAsync(this IStudentMarksExternal operations, IList <System.Guid> studentIds, bool onlyIncludeMarksForExamPaper, int pageNumber, int pageSize, bool inlineCount, string schoolCode, string xSelectedSchoolCode = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(studentIds, onlyIncludeMarksForExamPaper, pageNumber, pageSize, inlineCount, schoolCode, xSelectedSchoolCode, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='studentIds'> /// A list of students to get marks for /// </param> /// <param name='onlyIncludeMarksForExamPaper'> /// Flag to indicate if service should only return marks that should be /// included on exam paper /// </param> /// <param name='pageNumber'> /// The number of the page to return (1 is the first page). /// </param> /// <param name='pageSize'> /// Number of objects per page. /// </param> /// <param name='inlineCount'> /// A flag indicating if total number of items should be included. /// </param> /// <param name='schoolCode'> /// The school code for which to get data. /// </param> /// <param name='xSelectedSchoolCode'> /// Selected school code, used when multiple impersonation permissions are /// available on the token /// </param> public static PagedResponseStudentMarksExternalResponse Get(this IStudentMarksExternal operations, IList <System.Guid> studentIds, bool onlyIncludeMarksForExamPaper, int pageNumber, int pageSize, bool inlineCount, string schoolCode, string xSelectedSchoolCode = default(string)) { return(operations.GetAsync(studentIds, onlyIncludeMarksForExamPaper, pageNumber, pageSize, inlineCount, schoolCode, xSelectedSchoolCode).GetAwaiter().GetResult()); }