@@ -15,7 +15,7 @@ class CommentService extends AbstractService
15
15
*/
16
16
public function all (array $ params = [])
17
17
{
18
- $ endpoint = '/ comments.json ' ;
18
+ $ endpoint = 'comments.json ' ;
19
19
$ response = $ this ->request ($ endpoint , 'GET ' , $ params );
20
20
return $ this ->createCollection (Comment::class, $ response ['comments ' ]);
21
21
}
@@ -29,7 +29,7 @@ public function all(array $params = [])
29
29
*/
30
30
public function count (array $ params = [])
31
31
{
32
- $ endpoint = '/ comments/count.json ' ;
32
+ $ endpoint = 'comments/count.json ' ;
33
33
$ response = $ this ->request ($ endpoint , 'GET ' , $ params );
34
34
return $ response ['count ' ];
35
35
}
@@ -44,7 +44,7 @@ public function count(array $params = [])
44
44
*/
45
45
public function get ($ commentId , array $ params = [])
46
46
{
47
- $ endpoint = '/ comments/ ' .$ commentId .'.json ' ;
47
+ $ endpoint = 'comments/ ' .$ commentId .'.json ' ;
48
48
$ response = $ this ->request ($ endpoint , 'GET ' , $ params );
49
49
return $ this ->createObject (Comment::class, $ response ['comment ' ]);
50
50
}
@@ -59,7 +59,7 @@ public function get($commentId, array $params = [])
59
59
public function create (Comment &$ comment )
60
60
{
61
61
$ data = $ comment ->exportData ();
62
- $ endpoint = '/ comments.json ' ;
62
+ $ endpoint = 'comments.json ' ;
63
63
$ response = $ this ->request (
64
64
$ endpoint , 'POST ' , array (
65
65
'comment ' => $ data
@@ -78,7 +78,7 @@ public function create(Comment &$comment)
78
78
public function update (Comment &$ comment )
79
79
{
80
80
$ data = $ comment ->exportData ();
81
- $ endpoint = '/ comments/ ' .$ comment ->id .'.json ' ;
81
+ $ endpoint = 'comments/ ' .$ comment ->id .'.json ' ;
82
82
$ response = $ this ->request (
83
83
$ endpoint , 'PUT ' , array (
84
84
'comment ' => $ data
@@ -96,7 +96,7 @@ public function update(Comment &$comment)
96
96
*/
97
97
public function spam (Comment &$ comment )
98
98
{
99
- $ endpoint = '/ comments/ ' .$ comment ->id .'/spam.json ' ;
99
+ $ endpoint = 'comments/ ' .$ comment ->id .'/spam.json ' ;
100
100
$ response = $ this ->request ($ endpoint , 'POST ' );
101
101
$ comment ->setData ($ response ['comment ' ]);
102
102
}
@@ -110,7 +110,7 @@ public function spam(Comment &$comment)
110
110
*/
111
111
public function notSpam (Comment &$ comment )
112
112
{
113
- $ endpoint = '/ comments/ ' .$ comment ->id .'/not_spam.json ' ;
113
+ $ endpoint = 'comments/ ' .$ comment ->id .'/not_spam.json ' ;
114
114
$ response = $ this ->request ($ endpoint , 'POST ' );
115
115
$ comment ->setData ($ response ['comment ' ]);
116
116
}
@@ -124,7 +124,7 @@ public function notSpam(Comment &$comment)
124
124
*/
125
125
public function approve (Comment &$ comment )
126
126
{
127
- $ endpoint = '/ comments/ ' .$ comment ->id .'/approve.json ' ;
127
+ $ endpoint = 'comments/ ' .$ comment ->id .'/approve.json ' ;
128
128
$ response = $ this ->request ($ endpoint , 'POST ' );
129
129
$ comment ->setData ($ response ['comment ' ]);
130
130
}
@@ -138,7 +138,7 @@ public function approve(Comment &$comment)
138
138
*/
139
139
public function remove (Comment &$ comment )
140
140
{
141
- $ endpoint = '/ comments/ ' .$ comment ->id .'remove.json ' ;
141
+ $ endpoint = 'comments/ ' .$ comment ->id .'remove.json ' ;
142
142
$ response = $ this ->request ($ endpoint , 'POST ' );
143
143
$ comment ->setData ($ response ['comment ' ]);
144
144
}
@@ -152,7 +152,7 @@ public function remove(Comment &$comment)
152
152
*/
153
153
public function restore (Comment &$ comment )
154
154
{
155
- $ endpoint = '/ comments/ ' .$ comment ->id .'/restore.json ' ;
155
+ $ endpoint = 'comments/ ' .$ comment ->id .'/restore.json ' ;
156
156
$ response = $ this ->request ($ endpoint , 'POST ' );
157
157
$ comment ->setData ($ response ['comment ' ]);
158
158
}
0 commit comments