public void GetSpecificTableAsJson() { var aaw = new AirtableAPIWrapperBase(ConfigurationManager.AppSettings["apiKey"], ConfigurationManager.AppSettings["baseId"]); var json = aaw.GetTableAsJson("Manufacturers"); Console.WriteLine(json); }
public void GetSpecificTableAsXml() { var aaw = new AirtableAPIWrapperBase(ConfigurationManager.AppSettings["apiKey"], ConfigurationManager.AppSettings["baseId"]); var xmlDoc = aaw.GetTableAsXmlDocument("Manufacturers"); Console.WriteLine(xmlDoc.OuterXml); }
public void GetSpecificTableAsAirtableRows() { var aaw = new AirtableAPIWrapperBase(ConfigurationManager.AppSettings["apiKey"], ConfigurationManager.AppSettings["baseId"]); IEnumerable <AirtableRow> rows = aaw.GetTableAsAirtableRows("Manufacturers"); Console.WriteLine(JsonConvert.SerializeObject(rows, Formatting.Indented)); IEnumerable <Manufacturer> manufacturers = rows.ConvertTo <Manufacturer>(); Console.WriteLine(JsonConvert.SerializeObject(manufacturers, Formatting.Indented)); var manuf = manufacturers.First(); manuf.LastUnitTest = DateTime.Now; manuf.CarModels = null; aaw.UpdateAirtableRow("Manufacturers", manuf); }
public void CreateWrapper() { var aaw = new AirtableAPIWrapperBase(ConfigurationManager.AppSettings["apiKey"], ConfigurationManager.AppSettings["baseId"]); Assert.IsNotNull(aaw); }