/// <summary> /// Retrieves a list of styles. /// Documentation https://developers.google.com/fusiontables/v1/reference/style/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="tableId">Table whose styles are being listed</param> /// <param name="optional">Optional paramaters.</param> /// <returns>StyleSettingListResponse</returns> public static StyleSettingList List(fusiontablesService service, string tableId, StyleListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (tableId == null) { throw new ArgumentNullException(tableId); } // Building the initial request. var request = service.Style.List(tableId); // Applying optional parameters to the request. request = (StyleResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Style.List failed.", ex); } }
/// <summary> /// Updates an existing style. /// Documentation https://developers.google.com/fusiontables/v1/reference/style/update /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="tableId">Table whose style is being updated.</param> /// <param name="styleId">Identifier (within a table) for the style being updated.</param> /// <param name="body">A valid fusiontables v1 body.</param> /// <returns>StyleSettingResponse</returns> public static StyleSetting Update(fusiontablesService service, string tableId, int styleId, StyleSetting body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (tableId == null) { throw new ArgumentNullException(tableId); } // Make the request. return(service.Style.Update(body, tableId, styleId).Execute()); } catch (Exception ex) { throw new Exception("Request Style.Update failed.", ex); } }
/// <summary> /// Updates an existing template. This method supports patch semantics. /// Documentation https://developers.google.com/fusiontables/v2/reference/template/patch /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="tableId">Table to which the updated template belongs</param> /// <param name="templateId">Identifier for the template that is being updated</param> /// <param name="body">A valid fusiontables v2 body.</param> /// <returns>TemplateResponse</returns> public static Template Patch(fusiontablesService service, string tableId, int templateId, Template body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (tableId == null) { throw new ArgumentNullException(tableId); } // Make the request. return(service.Template.Patch(body, tableId, templateId).Execute()); } catch (Exception ex) { throw new Exception("Request Template.Patch failed.", ex); } }
/// <summary> /// Retrieves a specific task by its id. /// Documentation https://developers.google.com/fusiontables/v1/reference/task/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="tableId">Table to which the task belongs.</param> /// <param name="taskId">NA</param> /// <returns>TaskResponse</returns> public static Task Get(fusiontablesService service, string tableId, string taskId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (tableId == null) { throw new ArgumentNullException(tableId); } if (taskId == null) { throw new ArgumentNullException(taskId); } // Make the request. return(service.Task.Get(tableId, taskId).Execute()); } catch (Exception ex) { throw new Exception("Request Task.Get failed.", ex); } }
/// <summary> /// Updates an existing table. Unless explicitly requested, only the name, description, and attribution will be updated. /// Documentation https://developers.google.com/fusiontables/v2/reference/table/update /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="tableId">ID of the table that is being updated.</param> /// <param name="body">A valid fusiontables v2 body.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>TableResponse</returns> public static Table Update(fusiontablesService service, string tableId, Table body, TableUpdateOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (tableId == null) { throw new ArgumentNullException(tableId); } // Building the initial request. var request = service.Table.Update(body, tableId); // Applying optional parameters to the request. request = (TableResource.UpdateRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Table.Update failed.", ex); } }
/// <summary> /// Deletes the column. /// Documentation https://developers.google.com/fusiontables/v1/reference/column/delete /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="tableId">Table from which the column is being deleted.</param> /// <param name="columnId">Name or identifier for the column being deleted.</param> public static void Delete(fusiontablesService service, string tableId, string columnId) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (tableId == null) { throw new ArgumentNullException(tableId); } if (columnId == null) { throw new ArgumentNullException(columnId); } // Make the request. return(service.Column.Delete(tableId, columnId).Execute()); } catch (Exception ex) { throw new Exception("Request Column.Delete failed.", ex); } }
/// <summary> /// Adds a new column to the table. /// Documentation https://developers.google.com/fusiontables/v1/reference/column/insert /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="tableId">Table for which a new column is being added.</param> /// <param name="body">A valid fusiontables v1 body.</param> /// <returns>ColumnResponse</returns> public static Column Insert(fusiontablesService service, string tableId, Column body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (tableId == null) { throw new ArgumentNullException(tableId); } // Make the request. return(service.Column.Insert(body, tableId).Execute()); } catch (Exception ex) { throw new Exception("Request Column.Insert failed.", ex); } }
/// <summary> /// Executes an SQL SELECT/INSERT/UPDATE/DELETE/SHOW/DESCRIBE/CREATE statement. /// Documentation https://developers.google.com/fusiontables/v1/reference/query/sql /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="sql">An SQL SELECT/SHOW/DESCRIBE/INSERT/UPDATE/DELETE/CREATE statement.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>SqlresponseResponse</returns> public static Sqlresponse Sql(fusiontablesService service, string sql, QuerySqlOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (sql == null) { throw new ArgumentNullException(sql); } // Building the initial request. var request = service.Query.Sql(sql); // Applying optional parameters to the request. request = (QueryResource.SqlRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Query.Sql failed.", ex); } }
/// <summary> /// Creates a new table. /// Documentation https://developers.google.com/fusiontables/v2/reference/table/insert /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated fusiontables service.</param> /// <param name="body">A valid fusiontables v2 body.</param> /// <returns>TableResponse</returns> public static Table Insert(fusiontablesService service, Table body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } // Make the request. return(service.Table.Insert(body).Execute()); } catch (Exception ex) { throw new Exception("Request Table.Insert failed.", ex); } }