1: <?php
2: /**
3: * @copyright Copyright (c) 2009-2012 NADEO (http://www.nadeo.com)
4: * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
5: * @version $Revision: 170 $:
6: * @author $Author: baptiste33@gmail.com $:
7: * @date $Date: 2012-10-16 11:22:12 +0200 (mar., 16 oct. 2012) $:
8: */
9:
10: namespace Maniaplanet\WebServices;
11:
12: class Teams extends HTTPClient
13: {
14: /**
15: * @param int $id Id of the team
16: * @return object
17: * @throws Exception
18: */
19: function get($id)
20: {
21: if (!$id)
22: {
23: throw new Exception('Invalid id');
24: }
25:
26: return $this->execute('GET', '/teams/%d/', array($id));
27: }
28:
29: /**
30: * @param int $id Id of the team
31: * @return object
32: * @throws Exception
33: */
34: function getContracts($id)
35: {
36: if (!$id)
37: {
38: throw new Exception('Invalid id');
39: }
40:
41: return $this->execute('GET', '/teams/%d/contracts/', array($id));
42: }
43:
44:
45: /**
46: * @param int $id Id of the team
47: * @return object
48: * @throws Exception
49: */
50: function getAdmins($id)
51: {
52: if (!$id)
53: {
54: throw new Exception('Invalid id');
55: }
56:
57: return $this->execute('GET', '/teams/%d/admins/', array($id));
58: }
59: }