Fusion Tables API . template

Instance Methods

delete(tableId, templateId)

Deletes a template

get(tableId, templateId)

Retrieves a specific template by its id

insert(tableId, body)

Creates a new template for the table.

list(tableId, pageToken=None, maxResults=None)

Retrieves a list of templates.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(tableId, templateId, body)

Updates an existing template. This method supports patch semantics.

update(tableId, templateId, body)

Updates an existing template

Method Details

delete(tableId, templateId)
Deletes a template

Args:
  tableId: string, Table from which the template is being deleted (required)
  templateId: integer, Identifier for the template which is being deleted (required)
get(tableId, templateId)
Retrieves a specific template by its id

Args:
  tableId: string, Table to which the template belongs (required)
  templateId: integer, Identifier for the template that is being requested (required)

Returns:
  An object of the form:

    { # Represents the contents of InfoWindow templates.
      "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
      "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
      "name": "A String", # Optional name assigned to a template.
      "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
        "A String",
      ],
      "tableId": "A String", # Identifier for the table for which the template is defined.
      "templateId": 42, # Identifier for the template, unique within the context of a particular table.
    }
insert(tableId, body)
Creates a new template for the table.

Args:
  tableId: string, Table for which a new template is being created (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents the contents of InfoWindow templates.
    "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
    "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
    "name": "A String", # Optional name assigned to a template.
    "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
      "A String",
    ],
    "tableId": "A String", # Identifier for the table for which the template is defined.
    "templateId": 42, # Identifier for the template, unique within the context of a particular table.
  }


Returns:
  An object of the form:

    { # Represents the contents of InfoWindow templates.
      "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
      "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
      "name": "A String", # Optional name assigned to a template.
      "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
        "A String",
      ],
      "tableId": "A String", # Identifier for the table for which the template is defined.
      "templateId": 42, # Identifier for the template, unique within the context of a particular table.
    }
list(tableId, pageToken=None, maxResults=None)
Retrieves a list of templates.

Args:
  tableId: string, Identifier for the table whose templates are being requested (required)
  pageToken: string, Continuation token specifying which results page to return. Optional.
  maxResults: integer, Maximum number of templates to return. Optional. Default is 5.

Returns:
  An object of the form:

    { # Represents a list of templates for a given table.
    "nextPageToken": "A String", # Token used to access the next page of this result. No token is displayed if there are no more pages left.
    "items": [ # List of all requested templates.
      { # Represents the contents of InfoWindow templates.
          "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
          "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
          "name": "A String", # Optional name assigned to a template.
          "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
            "A String",
          ],
          "tableId": "A String", # Identifier for the table for which the template is defined.
          "templateId": 42, # Identifier for the template, unique within the context of a particular table.
        },
    ],
    "kind": "fusiontables#templateList", # Type name: a list of all templates.
    "totalItems": 42, # Total number of templates for the table.
  }
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    
patch(tableId, templateId, body)
Updates an existing template. This method supports patch semantics.

Args:
  tableId: string, Table to which the updated template belongs (required)
  templateId: integer, Identifier for the template that is being updated (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents the contents of InfoWindow templates.
    "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
    "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
    "name": "A String", # Optional name assigned to a template.
    "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
      "A String",
    ],
    "tableId": "A String", # Identifier for the table for which the template is defined.
    "templateId": 42, # Identifier for the template, unique within the context of a particular table.
  }


Returns:
  An object of the form:

    { # Represents the contents of InfoWindow templates.
      "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
      "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
      "name": "A String", # Optional name assigned to a template.
      "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
        "A String",
      ],
      "tableId": "A String", # Identifier for the table for which the template is defined.
      "templateId": 42, # Identifier for the template, unique within the context of a particular table.
    }
update(tableId, templateId, body)
Updates an existing template

Args:
  tableId: string, Table to which the updated template belongs (required)
  templateId: integer, Identifier for the template that is being updated (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents the contents of InfoWindow templates.
    "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
    "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
    "name": "A String", # Optional name assigned to a template.
    "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
      "A String",
    ],
    "tableId": "A String", # Identifier for the table for which the template is defined.
    "templateId": 42, # Identifier for the template, unique within the context of a particular table.
  }


Returns:
  An object of the form:

    { # Represents the contents of InfoWindow templates.
      "body": "A String", # Body of the template. It contains HTML with {column_name} to insert values from a particular column. The body is sanitized to remove certain tags, e.g., script. Only one of body or automaticColumns can be specified.
      "kind": "fusiontables#template", # Type name: a template for the info window contents. The template can either include an HTML body or a list of columns from which the template is computed automatically.
      "name": "A String", # Optional name assigned to a template.
      "automaticColumnNames": [ # List of columns from which the template is to be automatically constructed. Only one of body or automaticColumns can be specified.
        "A String",
      ],
      "tableId": "A String", # Identifier for the table for which the template is defined.
      "templateId": 42, # Identifier for the template, unique within the context of a particular table.
    }