Google_Service_Gmail

Service definition for Gmail (v1).

Defined (1)

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

/includes/api-libs/Google/Service/Gmail.php  
  1. class Google_Service_Gmail extends Google_Service 
  2. /** View and manage your mail. */ 
  3. const MAIL_GOOGLE_COM = 
  4. "https://mail.google.com"; 
  5. /** Manage drafts and send emails. */ 
  6. const GMAIL_COMPOSE = 
  7. "https://www.googleapis.com/auth/gmail.compose"; 
  8. /** View and modify but not delete your email. */ 
  9. const GMAIL_MODIFY = 
  10. "https://www.googleapis.com/auth/gmail.modify"; 
  11. /** View your emails messages and settings. */ 
  12. const GMAIL_READONLY = 
  13. "https://www.googleapis.com/auth/gmail.readonly"; 
  14.  
  15. public $users; 
  16. public $users_drafts; 
  17. public $users_history; 
  18. public $users_labels; 
  19. public $users_messages; 
  20. public $users_messages_attachments; 
  21. public $users_threads; 
  22.  
  23.  
  24. /** 
  25. * Constructs the internal representation of the Gmail service. 
  26. * @param Google_Client $client 
  27. */ 
  28. public function __construct(Google_Client $client) 
  29. parent::__construct($client); 
  30. $this->servicePath = 'gmail/v1/users/'; 
  31. $this->version = 'v1'; 
  32. $this->serviceName = 'gmail'; 
  33.  
  34. $this->users = new Google_Service_Gmail_Users_Resource( 
  35. $this,  
  36. $this->serviceName,  
  37. 'users',  
  38. array( 
  39. 'methods' => array( 
  40. 'getProfile' => array( 
  41. 'path' => '{userId}/profile',  
  42. 'httpMethod' => 'GET',  
  43. 'parameters' => array( 
  44. 'userId' => array( 
  45. 'location' => 'path',  
  46. 'type' => 'string',  
  47. 'required' => true,  
  48. ),  
  49. ),  
  50. ),  
  51. ); 
  52. $this->users_drafts = new Google_Service_Gmail_UsersDrafts_Resource( 
  53. $this,  
  54. $this->serviceName,  
  55. 'drafts',  
  56. array( 
  57. 'methods' => array( 
  58. 'create' => array( 
  59. 'path' => '{userId}/drafts',  
  60. 'httpMethod' => 'POST',  
  61. 'parameters' => array( 
  62. 'userId' => array( 
  63. 'location' => 'path',  
  64. 'type' => 'string',  
  65. 'required' => true,  
  66. ),  
  67. ),  
  68. ), 'delete' => array( 
  69. 'path' => '{userId}/drafts/{id}',  
  70. 'httpMethod' => 'DELETE',  
  71. 'parameters' => array( 
  72. 'userId' => array( 
  73. 'location' => 'path',  
  74. 'type' => 'string',  
  75. 'required' => true,  
  76. ),  
  77. 'id' => array( 
  78. 'location' => 'path',  
  79. 'type' => 'string',  
  80. 'required' => true,  
  81. ),  
  82. ),  
  83. ), 'get' => array( 
  84. 'path' => '{userId}/drafts/{id}',  
  85. 'httpMethod' => 'GET',  
  86. 'parameters' => array( 
  87. 'userId' => array( 
  88. 'location' => 'path',  
  89. 'type' => 'string',  
  90. 'required' => true,  
  91. ),  
  92. 'id' => array( 
  93. 'location' => 'path',  
  94. 'type' => 'string',  
  95. 'required' => true,  
  96. ),  
  97. 'format' => array( 
  98. 'location' => 'query',  
  99. 'type' => 'string',  
  100. ),  
  101. ),  
  102. ), 'list' => array( 
  103. 'path' => '{userId}/drafts',  
  104. 'httpMethod' => 'GET',  
  105. 'parameters' => array( 
  106. 'userId' => array( 
  107. 'location' => 'path',  
  108. 'type' => 'string',  
  109. 'required' => true,  
  110. ),  
  111. 'pageToken' => array( 
  112. 'location' => 'query',  
  113. 'type' => 'string',  
  114. ),  
  115. 'maxResults' => array( 
  116. 'location' => 'query',  
  117. 'type' => 'integer',  
  118. ),  
  119. ),  
  120. ), 'send' => array( 
  121. 'path' => '{userId}/drafts/send',  
  122. 'httpMethod' => 'POST',  
  123. 'parameters' => array( 
  124. 'userId' => array( 
  125. 'location' => 'path',  
  126. 'type' => 'string',  
  127. 'required' => true,  
  128. ),  
  129. ),  
  130. ), 'update' => array( 
  131. 'path' => '{userId}/drafts/{id}',  
  132. 'httpMethod' => 'PUT',  
  133. 'parameters' => array( 
  134. 'userId' => array( 
  135. 'location' => 'path',  
  136. 'type' => 'string',  
  137. 'required' => true,  
  138. ),  
  139. 'id' => array( 
  140. 'location' => 'path',  
  141. 'type' => 'string',  
  142. 'required' => true,  
  143. ),  
  144. ),  
  145. ),  
  146. ); 
  147. $this->users_history = new Google_Service_Gmail_UsersHistory_Resource( 
  148. $this,  
  149. $this->serviceName,  
  150. 'history',  
  151. array( 
  152. 'methods' => array( 
  153. 'list' => array( 
  154. 'path' => '{userId}/history',  
  155. 'httpMethod' => 'GET',  
  156. 'parameters' => array( 
  157. 'userId' => array( 
  158. 'location' => 'path',  
  159. 'type' => 'string',  
  160. 'required' => true,  
  161. ),  
  162. 'pageToken' => array( 
  163. 'location' => 'query',  
  164. 'type' => 'string',  
  165. ),  
  166. 'maxResults' => array( 
  167. 'location' => 'query',  
  168. 'type' => 'integer',  
  169. ),  
  170. 'labelId' => array( 
  171. 'location' => 'query',  
  172. 'type' => 'string',  
  173. ),  
  174. 'startHistoryId' => array( 
  175. 'location' => 'query',  
  176. 'type' => 'string',  
  177. ),  
  178. ),  
  179. ),  
  180. ); 
  181. $this->users_labels = new Google_Service_Gmail_UsersLabels_Resource( 
  182. $this,  
  183. $this->serviceName,  
  184. 'labels',  
  185. array( 
  186. 'methods' => array( 
  187. 'create' => array( 
  188. 'path' => '{userId}/labels',  
  189. 'httpMethod' => 'POST',  
  190. 'parameters' => array( 
  191. 'userId' => array( 
  192. 'location' => 'path',  
  193. 'type' => 'string',  
  194. 'required' => true,  
  195. ),  
  196. ),  
  197. ), 'delete' => array( 
  198. 'path' => '{userId}/labels/{id}',  
  199. 'httpMethod' => 'DELETE',  
  200. 'parameters' => array( 
  201. 'userId' => array( 
  202. 'location' => 'path',  
  203. 'type' => 'string',  
  204. 'required' => true,  
  205. ),  
  206. 'id' => array( 
  207. 'location' => 'path',  
  208. 'type' => 'string',  
  209. 'required' => true,  
  210. ),  
  211. ),  
  212. ), 'get' => array( 
  213. 'path' => '{userId}/labels/{id}',  
  214. 'httpMethod' => 'GET',  
  215. 'parameters' => array( 
  216. 'userId' => array( 
  217. 'location' => 'path',  
  218. 'type' => 'string',  
  219. 'required' => true,  
  220. ),  
  221. 'id' => array( 
  222. 'location' => 'path',  
  223. 'type' => 'string',  
  224. 'required' => true,  
  225. ),  
  226. ),  
  227. ), 'list' => array( 
  228. 'path' => '{userId}/labels',  
  229. 'httpMethod' => 'GET',  
  230. 'parameters' => array( 
  231. 'userId' => array( 
  232. 'location' => 'path',  
  233. 'type' => 'string',  
  234. 'required' => true,  
  235. ),  
  236. ),  
  237. ), 'patch' => array( 
  238. 'path' => '{userId}/labels/{id}',  
  239. 'httpMethod' => 'PATCH',  
  240. 'parameters' => array( 
  241. 'userId' => array( 
  242. 'location' => 'path',  
  243. 'type' => 'string',  
  244. 'required' => true,  
  245. ),  
  246. 'id' => array( 
  247. 'location' => 'path',  
  248. 'type' => 'string',  
  249. 'required' => true,  
  250. ),  
  251. ),  
  252. ), 'update' => array( 
  253. 'path' => '{userId}/labels/{id}',  
  254. 'httpMethod' => 'PUT',  
  255. 'parameters' => array( 
  256. 'userId' => array( 
  257. 'location' => 'path',  
  258. 'type' => 'string',  
  259. 'required' => true,  
  260. ),  
  261. 'id' => array( 
  262. 'location' => 'path',  
  263. 'type' => 'string',  
  264. 'required' => true,  
  265. ),  
  266. ),  
  267. ),  
  268. ); 
  269. $this->users_messages = new Google_Service_Gmail_UsersMessages_Resource( 
  270. $this,  
  271. $this->serviceName,  
  272. 'messages',  
  273. array( 
  274. 'methods' => array( 
  275. 'delete' => array( 
  276. 'path' => '{userId}/messages/{id}',  
  277. 'httpMethod' => 'DELETE',  
  278. 'parameters' => array( 
  279. 'userId' => array( 
  280. 'location' => 'path',  
  281. 'type' => 'string',  
  282. 'required' => true,  
  283. ),  
  284. 'id' => array( 
  285. 'location' => 'path',  
  286. 'type' => 'string',  
  287. 'required' => true,  
  288. ),  
  289. ),  
  290. ), 'get' => array( 
  291. 'path' => '{userId}/messages/{id}',  
  292. 'httpMethod' => 'GET',  
  293. 'parameters' => array( 
  294. 'userId' => array( 
  295. 'location' => 'path',  
  296. 'type' => 'string',  
  297. 'required' => true,  
  298. ),  
  299. 'id' => array( 
  300. 'location' => 'path',  
  301. 'type' => 'string',  
  302. 'required' => true,  
  303. ),  
  304. 'metadataHeaders' => array( 
  305. 'location' => 'query',  
  306. 'type' => 'string',  
  307. 'repeated' => true,  
  308. ),  
  309. 'format' => array( 
  310. 'location' => 'query',  
  311. 'type' => 'string',  
  312. ),  
  313. ),  
  314. ), 'import' => array( 
  315. 'path' => '{userId}/messages/import',  
  316. 'httpMethod' => 'POST',  
  317. 'parameters' => array( 
  318. 'userId' => array( 
  319. 'location' => 'path',  
  320. 'type' => 'string',  
  321. 'required' => true,  
  322. ),  
  323. 'deleted' => array( 
  324. 'location' => 'query',  
  325. 'type' => 'boolean',  
  326. ),  
  327. 'processForCalendar' => array( 
  328. 'location' => 'query',  
  329. 'type' => 'boolean',  
  330. ),  
  331. 'internalDateSource' => array( 
  332. 'location' => 'query',  
  333. 'type' => 'string',  
  334. ),  
  335. 'neverMarkSpam' => array( 
  336. 'location' => 'query',  
  337. 'type' => 'boolean',  
  338. ),  
  339. ),  
  340. ), 'insert' => array( 
  341. 'path' => '{userId}/messages',  
  342. 'httpMethod' => 'POST',  
  343. 'parameters' => array( 
  344. 'userId' => array( 
  345. 'location' => 'path',  
  346. 'type' => 'string',  
  347. 'required' => true,  
  348. ),  
  349. 'internalDateSource' => array( 
  350. 'location' => 'query',  
  351. 'type' => 'string',  
  352. ),  
  353. ),  
  354. ), 'list' => array( 
  355. 'path' => '{userId}/messages',  
  356. 'httpMethod' => 'GET',  
  357. 'parameters' => array( 
  358. 'userId' => array( 
  359. 'location' => 'path',  
  360. 'type' => 'string',  
  361. 'required' => true,  
  362. ),  
  363. 'maxResults' => array( 
  364. 'location' => 'query',  
  365. 'type' => 'integer',  
  366. ),  
  367. 'q' => array( 
  368. 'location' => 'query',  
  369. 'type' => 'string',  
  370. ),  
  371. 'pageToken' => array( 
  372. 'location' => 'query',  
  373. 'type' => 'string',  
  374. ),  
  375. 'includeSpamTrash' => array( 
  376. 'location' => 'query',  
  377. 'type' => 'boolean',  
  378. ),  
  379. 'labelIds' => array( 
  380. 'location' => 'query',  
  381. 'type' => 'string',  
  382. 'repeated' => true,  
  383. ),  
  384. ),  
  385. ), 'modify' => array( 
  386. 'path' => '{userId}/messages/{id}/modify',  
  387. 'httpMethod' => 'POST',  
  388. 'parameters' => array( 
  389. 'userId' => array( 
  390. 'location' => 'path',  
  391. 'type' => 'string',  
  392. 'required' => true,  
  393. ),  
  394. 'id' => array( 
  395. 'location' => 'path',  
  396. 'type' => 'string',  
  397. 'required' => true,  
  398. ),  
  399. ),  
  400. ), 'send' => array( 
  401. 'path' => '{userId}/messages/send',  
  402. 'httpMethod' => 'POST',  
  403. 'parameters' => array( 
  404. 'userId' => array( 
  405. 'location' => 'path',  
  406. 'type' => 'string',  
  407. 'required' => true,  
  408. ),  
  409. ),  
  410. ), 'trash' => array( 
  411. 'path' => '{userId}/messages/{id}/trash',  
  412. 'httpMethod' => 'POST',  
  413. 'parameters' => array( 
  414. 'userId' => array( 
  415. 'location' => 'path',  
  416. 'type' => 'string',  
  417. 'required' => true,  
  418. ),  
  419. 'id' => array( 
  420. 'location' => 'path',  
  421. 'type' => 'string',  
  422. 'required' => true,  
  423. ),  
  424. ),  
  425. ), 'untrash' => array( 
  426. 'path' => '{userId}/messages/{id}/untrash',  
  427. 'httpMethod' => 'POST',  
  428. 'parameters' => array( 
  429. 'userId' => array( 
  430. 'location' => 'path',  
  431. 'type' => 'string',  
  432. 'required' => true,  
  433. ),  
  434. 'id' => array( 
  435. 'location' => 'path',  
  436. 'type' => 'string',  
  437. 'required' => true,  
  438. ),  
  439. ),  
  440. ),  
  441. ); 
  442. $this->users_messages_attachments = new Google_Service_Gmail_UsersMessagesAttachments_Resource( 
  443. $this,  
  444. $this->serviceName,  
  445. 'attachments',  
  446. array( 
  447. 'methods' => array( 
  448. 'get' => array( 
  449. 'path' => '{userId}/messages/{messageId}/attachments/{id}',  
  450. 'httpMethod' => 'GET',  
  451. 'parameters' => array( 
  452. 'userId' => array( 
  453. 'location' => 'path',  
  454. 'type' => 'string',  
  455. 'required' => true,  
  456. ),  
  457. 'messageId' => array( 
  458. 'location' => 'path',  
  459. 'type' => 'string',  
  460. 'required' => true,  
  461. ),  
  462. 'id' => array( 
  463. 'location' => 'path',  
  464. 'type' => 'string',  
  465. 'required' => true,  
  466. ),  
  467. ),  
  468. ),  
  469. ); 
  470. $this->users_threads = new Google_Service_Gmail_UsersThreads_Resource( 
  471. $this,  
  472. $this->serviceName,  
  473. 'threads',  
  474. array( 
  475. 'methods' => array( 
  476. 'delete' => array( 
  477. 'path' => '{userId}/threads/{id}',  
  478. 'httpMethod' => 'DELETE',  
  479. 'parameters' => array( 
  480. 'userId' => array( 
  481. 'location' => 'path',  
  482. 'type' => 'string',  
  483. 'required' => true,  
  484. ),  
  485. 'id' => array( 
  486. 'location' => 'path',  
  487. 'type' => 'string',  
  488. 'required' => true,  
  489. ),  
  490. ),  
  491. ), 'get' => array( 
  492. 'path' => '{userId}/threads/{id}',  
  493. 'httpMethod' => 'GET',  
  494. 'parameters' => array( 
  495. 'userId' => array( 
  496. 'location' => 'path',  
  497. 'type' => 'string',  
  498. 'required' => true,  
  499. ),  
  500. 'id' => array( 
  501. 'location' => 'path',  
  502. 'type' => 'string',  
  503. 'required' => true,  
  504. ),  
  505. 'metadataHeaders' => array( 
  506. 'location' => 'query',  
  507. 'type' => 'string',  
  508. 'repeated' => true,  
  509. ),  
  510. 'format' => array( 
  511. 'location' => 'query',  
  512. 'type' => 'string',  
  513. ),  
  514. ),  
  515. ), 'list' => array( 
  516. 'path' => '{userId}/threads',  
  517. 'httpMethod' => 'GET',  
  518. 'parameters' => array( 
  519. 'userId' => array( 
  520. 'location' => 'path',  
  521. 'type' => 'string',  
  522. 'required' => true,  
  523. ),  
  524. 'maxResults' => array( 
  525. 'location' => 'query',  
  526. 'type' => 'integer',  
  527. ),  
  528. 'q' => array( 
  529. 'location' => 'query',  
  530. 'type' => 'string',  
  531. ),  
  532. 'pageToken' => array( 
  533. 'location' => 'query',  
  534. 'type' => 'string',  
  535. ),  
  536. 'includeSpamTrash' => array( 
  537. 'location' => 'query',  
  538. 'type' => 'boolean',  
  539. ),  
  540. 'labelIds' => array( 
  541. 'location' => 'query',  
  542. 'type' => 'string',  
  543. 'repeated' => true,  
  544. ),  
  545. ),  
  546. ), 'modify' => array( 
  547. 'path' => '{userId}/threads/{id}/modify',  
  548. 'httpMethod' => 'POST',  
  549. 'parameters' => array( 
  550. 'userId' => array( 
  551. 'location' => 'path',  
  552. 'type' => 'string',  
  553. 'required' => true,  
  554. ),  
  555. 'id' => array( 
  556. 'location' => 'path',  
  557. 'type' => 'string',  
  558. 'required' => true,  
  559. ),  
  560. ),  
  561. ), 'trash' => array( 
  562. 'path' => '{userId}/threads/{id}/trash',  
  563. 'httpMethod' => 'POST',  
  564. 'parameters' => array( 
  565. 'userId' => array( 
  566. 'location' => 'path',  
  567. 'type' => 'string',  
  568. 'required' => true,  
  569. ),  
  570. 'id' => array( 
  571. 'location' => 'path',  
  572. 'type' => 'string',  
  573. 'required' => true,  
  574. ),  
  575. ),  
  576. ), 'untrash' => array( 
  577. 'path' => '{userId}/threads/{id}/untrash',  
  578. 'httpMethod' => 'POST',  
  579. 'parameters' => array( 
  580. 'userId' => array( 
  581. 'location' => 'path',  
  582. 'type' => 'string',  
  583. 'required' => true,  
  584. ),  
  585. 'id' => array( 
  586. 'location' => 'path',  
  587. 'type' => 'string',  
  588. 'required' => true,  
  589. ),  
  590. ),  
  591. ),  
  592. );