/// <summary> /// AppScript への Get リクエスト /// 戻り値のCSV を string[,] にパースして返す /// </summary> public static void GetAppsScriptCSV( string deployId, Dictionary <string, string> getParams, Action <string[, ]> success = null, Action <ErrorMessage> error = null ) { void Success(string csv) { var data = GoogleSpreadSheetUtil.ParseCSV(csv); success?.Invoke(data); } GetAppsScript(deployId, getParams, Success, e => error?.Invoke(e)); }
/// <summary> /// AppScript への Get リクエスト /// 戻り値のCSV をクラスにパースして返す /// </summary> public static void GetAppsScript <T>( string deployId, Dictionary <string, string> getParams, Action <List <T> > success = null, Action <ErrorMessage> error = null ) where T : class { void Convert(string[,] data) { var list = GoogleSpreadSheetUtil.ListCast <T>(data); success?.Invoke(list); } GetAppsScriptCSV(deployId, getParams, Convert, e => error?.Invoke(e)); }