Esempio n. 1
0
        internal static Quarter Build()
        {
            String             parameter           = PARAMETER_CURRENT_QUARTER;
            String             jsonQuarter         = BuilderAPI.GetJsonFromAPI(API, parameter);
            DeserializeQuarter deserializedQuarter = JsonConvert.DeserializeObject <DeserializeQuarter>(jsonQuarter);
            Quarter            quarter             = deserializedQuarter.quarter;

            return(quarter);
        }
Esempio n. 2
0
        internal static List <Subject> Build(string quarterCode)
        {
            String parameter    = GetParemeterSubjects(quarterCode);
            String jsonSubjects = BuilderAPI.GetJsonFromAPI(API, parameter);
            DeserializeSubjects deserializedSubjects = JsonConvert.DeserializeObject <DeserializeSubjects>(jsonSubjects);
            List <Subject>      subjects             = deserializedSubjects.subjects;

            return(subjects);
        }
        internal static List <Section> Build(string subjectAcronym, string quarterCode)
        {
            String             parameter          = GetParameterClasses(subjectAcronym, quarterCode);
            String             jsonCurrentQuarter = BuilderAPI.GetJsonFromAPI(API, parameter);
            DeserializeClasses deserializeClasses = JsonConvert.DeserializeObject <DeserializeClasses>(jsonCurrentQuarter);

            if (deserializeClasses == null)
            {
                return(new List <Section>());
            }
            else
            {
                List <Section> classes = deserializeClasses.classes;
                return(classes);
            }
        }