Esempio n. 1
0
        public void testCreateClient()
        {
            var client = new Wonde.Client(System.Configuration.ConfigurationManager.AppSettings["API_TOKEN"]);
            var school = client.school(System.Configuration.ConfigurationManager.AppSettings["SCHOOL_ID"]);

            Assert.IsInstanceOfType(school, typeof(Wonde.EndPoints.Schools), "Object assertion fails.");
        }
Esempio n. 2
0
        public void tests_schools()
        {
            var client = new Wonde.Client(System.Configuration.ConfigurationManager.AppSettings["API_TOKEN"]);

            foreach (Dictionary <string, object> row in client.schools.all())
            {
                Assert.IsInstanceOfType(row["name"], typeof(string));
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            var client = new Wonde.Client(System.Configuration.ConfigurationManager.AppSettings["API_TOKEN"]);
            var school = client.school(System.Configuration.ConfigurationManager.AppSettings["SCHOOL_ID"]);

            var students = school.students.all();

            iterate(students);
            if (students.nextPage())
            {
                iterate(students);
            }
            if (students.previousPage())
            {
                iterate(students);
            }
        }