-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTournament.php
More file actions
65 lines (52 loc) · 1.31 KB
/
Tournament.php
File metadata and controls
65 lines (52 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Challonge's Tournament API class
*/
class ChallongeTournament extends ChallongeAPI
{
const PREFIX = "tournaments";
public function reqIndex()
{
return $this->request(self::PREFIX);
}
public function reqCreate()
{
return $this->request(self::PREFIX, 'post');
}
public function reqShow($id)
{
return $this->request(self::PREFIX."/$id");
}
public function reqUpdate($id)
{
return $this->request(self::PREFIX."/$id", 'put');
}
public function reqDestroy($id)
{
return $this->request(self::PREFIX."/$id", 'delete');
}
/*public function reqPublish($id)
{
return $this->request("/publish/$id", 'post');
}*/
public function reqStart($id)
{
return $this->request(self::PREFIX."/$id/start", 'post');
}
public function reqReset($id)
{
return $this->request(self::PREFIX."/$id/reset", 'post');
}
public function reqFinalize($id)
{
return $this->request(self::PREFIX."/$id/finalize", 'post');
}
public function reqProcessCheckIns($id)
{
return $this->request(self::PREFIX."/$id/process_check_ins", 'post');
}
public function reqAbortCheckIn($id)
{
return $this->request(self::PREFIX."/$id/abort_check_in", 'post');
}
}