1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
12:
13: namespace Maniaplanet\WebServices\Rankings;
14:
15: use Maniaplanet\WebServices\Exception;
16:
17:
18: class Canyon extends \Maniaplanet\WebServices\HTTPClient
19: {
20:
21:
22: function getMultiplayerPlayer($login)
23: {
24: if(!$login)
25: {
26: throw new Exception('Invalid login');
27: }
28: return $this->execute('GET', '/canyon/rankings/multiplayer/player/%s/', array($login));
29: }
30:
31: function getMultiplayerWorld($offset = 0, $length = 100)
32: {
33: return $this->execute('GET', '/canyon/rankings/multiplayer/zone/?offset=%d&length=%d', array($offset, $length));
34: }
35:
36: function getMultiplayerZone($path, $offset = 0, $length = 100)
37: {
38: if(!$path)
39: {
40: throw new Exception('Invalid zone path');
41: }
42: return $this->execute('GET', '/canyon/rankings/multiplayer/zone/%s/?offset=%d&length=%d',
43: array($path, $offset, $length));
44: }
45:
46:
47: function getSoloPlayer($login)
48: {
49: if(!$login)
50: {
51: throw new Exception('Invalid login');
52: }
53: return $this->execute('GET', '/canyon/rankings/solo/player/%s/', array($login));
54: }
55:
56: function getSoloWorld($offset = 0, $length = 100)
57: {
58: return $this->execute('GET', '/canyon/rankings/solo/zone/?offset=%d&length=%d', array($offset, $length));
59: }
60:
61: function getSoloZone($path, $offset = 0, $length = 100)
62: {
63: if(!$path)
64: {
65: throw new Exception('Invalid zone path');
66: }
67: return $this->execute('GET', '/canyon/rankings/solo/zone/%s/?offset=%d&length=%d', array($path, $offset, $length));
68: }
69:
70: function getSoloChallengeWorld($challengeuid, $offset = 0, $length = 100)
71: {
72: if(!$challengeuid)
73: {
74: throw new Exception('Invalid challenge UID');
75: }
76: return $this->execute('GET', '/canyon/rankings/solo/challenge/%s/?offset=%d&length=%d',
77: array($challengeuid, $offset, $length));
78: }
79:
80: function getSoloChallengeZone($challengeuid, $path, $offset = 0, $length = 100)
81: {
82: if(!$challengeuid)
83: {
84: throw new Exception('Invalid challenge UID');
85: }
86: return $this->execute('GET', '/canyon/rankings/solo/challenge/%s/%s/?offset=%d&length=%d',
87: array($challengeuid, $path, $offset, $length));
88: }
89:
90: }
91:
92: ?>