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."); }
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)); } }
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); } }