Google_TemplateServiceResource

The "template" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api/src/contrib/Google_FusiontablesService.php  
  1. class Google_TemplateServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Deletes a template (template.delete) 
  6. * @param string $tableId Table from which the template is being deleted 
  7. * @param int $templateId Identifier for the template which is being deleted 
  8. * @param array $optParams Optional parameters. 
  9. */ 
  10. public function delete($tableId, $templateId, $optParams = array()) { 
  11. $params = array('tableId' => $tableId, 'templateId' => $templateId); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('delete', array($params)); 
  14. return $data; 
  15. /** 
  16. * Retrieves a specific template by its id (template.get) 
  17. * @param string $tableId Table to which the template belongs 
  18. * @param int $templateId Identifier for the template that is being requested 
  19. * @param array $optParams Optional parameters. 
  20. * @return Google_Template 
  21. */ 
  22. public function get($tableId, $templateId, $optParams = array()) { 
  23. $params = array('tableId' => $tableId, 'templateId' => $templateId); 
  24. $params = array_merge($params, $optParams); 
  25. $data = $this->__call('get', array($params)); 
  26. if ($this->useObjects()) { 
  27. return new Google_Template($data); 
  28. } else { 
  29. return $data; 
  30. /** 
  31. * Creates a new template for the table. (template.insert) 
  32. * @param string $tableId Table for which a new template is being created 
  33. * @param Google_Template $postBody 
  34. * @param array $optParams Optional parameters. 
  35. * @return Google_Template 
  36. */ 
  37. public function insert($tableId, Google_Template $postBody, $optParams = array()) { 
  38. $params = array('tableId' => $tableId, 'postBody' => $postBody); 
  39. $params = array_merge($params, $optParams); 
  40. $data = $this->__call('insert', array($params)); 
  41. if ($this->useObjects()) { 
  42. return new Google_Template($data); 
  43. } else { 
  44. return $data; 
  45. /** 
  46. * Retrieves a list of templates. (template.list) 
  47. * @param string $tableId Identifier for the table whose templates are being requested 
  48. * @param array $optParams Optional parameters. 
  49. * @opt_param string pageToken Continuation token specifying which results page to return. Optional. 
  50. * @opt_param string maxResults Maximum number of templates to return. Optional. Default is 5. 
  51. * @return Google_TemplateList 
  52. */ 
  53. public function listTemplate($tableId, $optParams = array()) { 
  54. $params = array('tableId' => $tableId); 
  55. $params = array_merge($params, $optParams); 
  56. $data = $this->__call('list', array($params)); 
  57. if ($this->useObjects()) { 
  58. return new Google_TemplateList($data); 
  59. } else { 
  60. return $data; 
  61. /** 
  62. * Updates an existing template. This method supports patch semantics. (template.patch) 
  63. * @param string $tableId Table to which the updated template belongs 
  64. * @param int $templateId Identifier for the template that is being updated 
  65. * @param Google_Template $postBody 
  66. * @param array $optParams Optional parameters. 
  67. * @return Google_Template 
  68. */ 
  69. public function patch($tableId, $templateId, Google_Template $postBody, $optParams = array()) { 
  70. $params = array('tableId' => $tableId, 'templateId' => $templateId, 'postBody' => $postBody); 
  71. $params = array_merge($params, $optParams); 
  72. $data = $this->__call('patch', array($params)); 
  73. if ($this->useObjects()) { 
  74. return new Google_Template($data); 
  75. } else { 
  76. return $data; 
  77. /** 
  78. * Updates an existing template (template.update) 
  79. * @param string $tableId Table to which the updated template belongs 
  80. * @param int $templateId Identifier for the template that is being updated 
  81. * @param Google_Template $postBody 
  82. * @param array $optParams Optional parameters. 
  83. * @return Google_Template 
  84. */ 
  85. public function update($tableId, $templateId, Google_Template $postBody, $optParams = array()) { 
  86. $params = array('tableId' => $tableId, 'templateId' => $templateId, 'postBody' => $postBody); 
  87. $params = array_merge($params, $optParams); 
  88. $data = $this->__call('update', array($params)); 
  89. if ($this->useObjects()) { 
  90. return new Google_Template($data); 
  91. } else { 
  92. return $data;