The following requests relate to getting information about users' training performance from different points of view via the Schoox Academy API. Note: All requests must be Authenticated. Access Level for all requests: Administrators, Training Managers, Region and Location Managers. Depending on the role the requests return data either for all users (Access level: Administrators and Training Managers) or for users that belong to a certain region or location (Access Level: Region Managers, Local Managers). You can simulate a user's view by his/her SchooX ID.
Inheritance: SchooxApiBase
Esempio n. 1
0
        static void Main(string[] args)
        {
            //note the App.config file that has the values for auto loading the configuration
            var schooxService = new SchooxService();

            var dashboard = new Dashboard(schooxService);
            var courses = new Courses(schooxService);

            //lets get the courses
            var coursesResponse = dashboard.GetCourses(Roles.SchooxInternalEmployee);

            if (coursesResponse.RequestSuccessful && coursesResponse.Data != null)
            {
                Console.WriteLine("Request from\n{0}\n{1} courses returned:", coursesResponse.Response.ResponseUri,
                    coursesResponse.Data.Count);

                foreach (var course in coursesResponse.Data)
                {
                    Console.WriteLine("#{0} - {1} - # of Students: {2}", course.Id, course.Title, course.Students);
                }

                //now that we have the courses, let's pull details for the first one
                var firstCourse = coursesResponse.Data.FirstOrDefault();

                if (firstCourse != null)
                {
                    var courseDetail = courses.GetDetailsForCourse(firstCourse.Id);
                    Console.WriteLine("\nDetails for Course:\n{0}", courseDetail.Data);
                }
            }
            else
            {
                Console.WriteLine("No courses found or data null for \"{0}\" courses, check the URL\n{1}.", Roles.SchooxInternalEmployee,
                    coursesResponse.Response.ResponseUri);
            }

            Console.Read();
        }
Esempio n. 2
0
 public void Initialize()
 {
     _dashboard = new Dashboard(new SchooxService("schoox", 386));
 }