Я думаю, что вы спрашиваете, как вставлять данные. Вот пример:
string timestamp = DateTime.Now.ToString("u").TrimEnd('Z'); //e.g. 2008-04-10 13:30:00
string sql = "INSERT INTO " + tableId + " (Timestamp, MAC_Address, URL) VALUES ('" + timestamp + "','" + macAddress + "','" + url + "')" ;
var response = fusiontablesService.Query.Sql(sql).Execute();
Я пользуюсь учетной записью службы; таблица слияния устанавливается как этот
private void InitializeFusiontables()
{
//uses a service account; the fusiontable is shared with the service account's email address
//https://code.google.com/p/google-api-dotnet-client/wiki/OAuth2
var certificate = new X509Certificate2(privateKeyFile, "notasecret", X509KeyStorageFlags.Exportable);
ServiceAccountCredential credential = new ServiceAccountCredential(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { FusiontablesService.Scope.Fusiontables }
}.FromCertificate(certificate));
// Create the service.
fusiontablesService = new FusiontablesService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = "snarf-service-2", //not sure if the name here matters or not
});
this.dataTable = fusiontablesService.Table.Get(tableId).Execute(); //.List().Execute();
eventLog.WriteEntry("Fusiontable successfully located");
macAddress = "testmacaddress";
InsertRow("testurl.com");
}
Я жестко закодированного в TABLEID потому, что имеет смысл для моего приложения.