Google_ParentsServiceResource

The "parents" collection of methods.

Defined (1)

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

/gdwpm-api/contrib/Google_DriveService.php  
  1. class Google_ParentsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Removes a parent from a file. (parents.delete) 
  5. * @param string $fileId The ID of the file. 
  6. * @param string $parentId The ID of the parent. 
  7. * @param array $optParams Optional parameters. 
  8. */ 
  9. public function delete($fileId, $parentId, $optParams = array()) { 
  10. $params = array('fileId' => $fileId, 'parentId' => $parentId); 
  11. $params = array_merge($params, $optParams); 
  12. $data = $this->__call('delete', array($params)); 
  13. return $data; 
  14. /** 
  15. * Gets a specific parent reference. (parents.get) 
  16. * @param string $fileId The ID of the file. 
  17. * @param string $parentId The ID of the parent. 
  18. * @param array $optParams Optional parameters. 
  19. * @return Google_ParentReference 
  20. */ 
  21. public function get($fileId, $parentId, $optParams = array()) { 
  22. $params = array('fileId' => $fileId, 'parentId' => $parentId); 
  23. $params = array_merge($params, $optParams); 
  24. $data = $this->__call('get', array($params)); 
  25. if ($this->useObjects()) { 
  26. return new Google_ParentReference($data); 
  27. } else { 
  28. return $data; 
  29. /** 
  30. * Adds a parent folder for a file. (parents.insert) 
  31. * @param string $fileId The ID of the file. 
  32. * @param Google_ParentReference $postBody 
  33. * @param array $optParams Optional parameters. 
  34. * @return Google_ParentReference 
  35. */ 
  36. public function insert($fileId, Google_ParentReference $postBody, $optParams = array()) { 
  37. $params = array('fileId' => $fileId, 'postBody' => $postBody); 
  38. $params = array_merge($params, $optParams); 
  39. $data = $this->__call('insert', array($params)); 
  40. if ($this->useObjects()) { 
  41. return new Google_ParentReference($data); 
  42. } else { 
  43. return $data; 
  44. /** 
  45. * Lists a file's parents. (parents.list) 
  46. * @param string $fileId The ID of the file. 
  47. * @param array $optParams Optional parameters. 
  48. * @return Google_ParentList 
  49. */ 
  50. public function listParents($fileId, $optParams = array()) { 
  51. $params = array('fileId' => $fileId); 
  52. $params = array_merge($params, $optParams); 
  53. $data = $this->__call('list', array($params)); 
  54. if ($this->useObjects()) { 
  55. return new Google_ParentList($data); 
  56. } else { 
  57. return $data;