-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAttachment.php
More file actions
41 lines (33 loc) · 823 Bytes
/
Attachment.php
File metadata and controls
41 lines (33 loc) · 823 Bytes
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
<?php
/*
* Challonge's Match API class
*/
class ChallongeAttachment extends ChallongeAPI
{
protected $tournament_id;
const PREFIX = "tournaments";
public function __construct($tournament_id, $match_id)
{
$this->ids = self::PREFIX."/".$tournament_id."/matches/".$match_id."/attachments";
}
public function reqIndex()
{
return $this->request("/{$this->ids}");
}
public function reqCreate()
{
return $this->request("/{$this->ids}",'post');
}
public function reqShow($id)
{
return $this->request("/{$this->ids}/$id");
}
public function reqUpdate($id)
{
return $this->request("/{$this->ids}/$id",'put');
}
public function reqDestroy($id)
{
return $this->request("/{$this->ids}/$id",'delete');
}
}