Google_Service_Gmail_UsersLabels_Resource

The "labels" collection of methods.

Defined (1)

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

/includes/api-libs/Google/Service/Gmail.php  
  1. class Google_Service_Gmail_UsersLabels_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Creates a new label. (labels.create) 
  5. * @param string $userId The user's email address. The special value me can be 
  6. * used to indicate the authenticated user. 
  7. * @param Google_Label $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @return Google_Service_Gmail_Label 
  10. */ 
  11. public function create($userId, Google_Service_Gmail_Label $postBody, $optParams = array()) 
  12. $params = array('userId' => $userId, 'postBody' => $postBody); 
  13. $params = array_merge($params, $optParams); 
  14. return $this->call('create', array($params), "Google_Service_Gmail_Label"); 
  15.  
  16. /** 
  17. * Immediately and permanently deletes the specified label and removes it from 
  18. * any messages and threads that it is applied to. (labels.delete) 
  19. * @param string $userId The user's email address. The special value me can be 
  20. * used to indicate the authenticated user. 
  21. * @param string $id The ID of the label to delete. 
  22. * @param array $optParams Optional parameters. 
  23. */ 
  24. public function delete($userId, $id, $optParams = array()) 
  25. $params = array('userId' => $userId, 'id' => $id); 
  26. $params = array_merge($params, $optParams); 
  27. return $this->call('delete', array($params)); 
  28.  
  29. /** 
  30. * Gets the specified label. (labels.get) 
  31. * @param string $userId The user's email address. The special value me can be 
  32. * used to indicate the authenticated user. 
  33. * @param string $id The ID of the label to retrieve. 
  34. * @param array $optParams Optional parameters. 
  35. * @return Google_Service_Gmail_Label 
  36. */ 
  37. public function get($userId, $id, $optParams = array()) 
  38. $params = array('userId' => $userId, 'id' => $id); 
  39. $params = array_merge($params, $optParams); 
  40. return $this->call('get', array($params), "Google_Service_Gmail_Label"); 
  41.  
  42. /** 
  43. * Lists all labels in the user's mailbox. (labels.listUsersLabels) 
  44. * @param string $userId The user's email address. The special value me can be 
  45. * used to indicate the authenticated user. 
  46. * @param array $optParams Optional parameters. 
  47. * @return Google_Service_Gmail_ListLabelsResponse 
  48. */ 
  49. public function listUsersLabels($userId, $optParams = array()) 
  50. $params = array('userId' => $userId); 
  51. $params = array_merge($params, $optParams); 
  52. return $this->call('list', array($params), "Google_Service_Gmail_ListLabelsResponse"); 
  53.  
  54. /** 
  55. * Updates the specified label. This method supports patch semantics. 
  56. * (labels.patch) 
  57. * @param string $userId The user's email address. The special value me can be 
  58. * used to indicate the authenticated user. 
  59. * @param string $id The ID of the label to update. 
  60. * @param Google_Label $postBody 
  61. * @param array $optParams Optional parameters. 
  62. * @return Google_Service_Gmail_Label 
  63. */ 
  64. public function patch($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array()) 
  65. $params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody); 
  66. $params = array_merge($params, $optParams); 
  67. return $this->call('patch', array($params), "Google_Service_Gmail_Label"); 
  68.  
  69. /** 
  70. * Updates the specified label. (labels.update) 
  71. * @param string $userId The user's email address. The special value me can be 
  72. * used to indicate the authenticated user. 
  73. * @param string $id The ID of the label to update. 
  74. * @param Google_Label $postBody 
  75. * @param array $optParams Optional parameters. 
  76. * @return Google_Service_Gmail_Label 
  77. */ 
  78. public function update($userId, $id, Google_Service_Gmail_Label $postBody, $optParams = array()) 
  79. $params = array('userId' => $userId, 'id' => $id, 'postBody' => $postBody); 
  80. $params = array_merge($params, $optParams); 
  81. return $this->call('update', array($params), "Google_Service_Gmail_Label");