@@ -15,7 +15,7 @@ class CommentService extends AbstractService
1515 */
1616 public function all (array $ params = [])
1717 {
18- $ endpoint = '/ comments.json ' ;
18+ $ endpoint = 'comments.json ' ;
1919 $ response = $ this ->request ($ endpoint , 'GET ' , $ params );
2020 return $ this ->createCollection (Comment::class, $ response ['comments ' ]);
2121 }
@@ -29,7 +29,7 @@ public function all(array $params = [])
2929 */
3030 public function count (array $ params = [])
3131 {
32- $ endpoint = '/ comments/count.json ' ;
32+ $ endpoint = 'comments/count.json ' ;
3333 $ response = $ this ->request ($ endpoint , 'GET ' , $ params );
3434 return $ response ['count ' ];
3535 }
@@ -44,7 +44,7 @@ public function count(array $params = [])
4444 */
4545 public function get ($ commentId , array $ params = [])
4646 {
47- $ endpoint = '/ comments/ ' .$ commentId .'.json ' ;
47+ $ endpoint = 'comments/ ' .$ commentId .'.json ' ;
4848 $ response = $ this ->request ($ endpoint , 'GET ' , $ params );
4949 return $ this ->createObject (Comment::class, $ response ['comment ' ]);
5050 }
@@ -59,7 +59,7 @@ public function get($commentId, array $params = [])
5959 public function create (Comment &$ comment )
6060 {
6161 $ data = $ comment ->exportData ();
62- $ endpoint = '/ comments.json ' ;
62+ $ endpoint = 'comments.json ' ;
6363 $ response = $ this ->request (
6464 $ endpoint , 'POST ' , array (
6565 'comment ' => $ data
@@ -78,7 +78,7 @@ public function create(Comment &$comment)
7878 public function update (Comment &$ comment )
7979 {
8080 $ data = $ comment ->exportData ();
81- $ endpoint = '/ comments/ ' .$ comment ->id .'.json ' ;
81+ $ endpoint = 'comments/ ' .$ comment ->id .'.json ' ;
8282 $ response = $ this ->request (
8383 $ endpoint , 'PUT ' , array (
8484 'comment ' => $ data
@@ -96,7 +96,7 @@ public function update(Comment &$comment)
9696 */
9797 public function spam (Comment &$ comment )
9898 {
99- $ endpoint = '/ comments/ ' .$ comment ->id .'/spam.json ' ;
99+ $ endpoint = 'comments/ ' .$ comment ->id .'/spam.json ' ;
100100 $ response = $ this ->request ($ endpoint , 'POST ' );
101101 $ comment ->setData ($ response ['comment ' ]);
102102 }
@@ -110,7 +110,7 @@ public function spam(Comment &$comment)
110110 */
111111 public function notSpam (Comment &$ comment )
112112 {
113- $ endpoint = '/ comments/ ' .$ comment ->id .'/not_spam.json ' ;
113+ $ endpoint = 'comments/ ' .$ comment ->id .'/not_spam.json ' ;
114114 $ response = $ this ->request ($ endpoint , 'POST ' );
115115 $ comment ->setData ($ response ['comment ' ]);
116116 }
@@ -124,7 +124,7 @@ public function notSpam(Comment &$comment)
124124 */
125125 public function approve (Comment &$ comment )
126126 {
127- $ endpoint = '/ comments/ ' .$ comment ->id .'/approve.json ' ;
127+ $ endpoint = 'comments/ ' .$ comment ->id .'/approve.json ' ;
128128 $ response = $ this ->request ($ endpoint , 'POST ' );
129129 $ comment ->setData ($ response ['comment ' ]);
130130 }
@@ -138,7 +138,7 @@ public function approve(Comment &$comment)
138138 */
139139 public function remove (Comment &$ comment )
140140 {
141- $ endpoint = '/ comments/ ' .$ comment ->id .'remove.json ' ;
141+ $ endpoint = 'comments/ ' .$ comment ->id .'remove.json ' ;
142142 $ response = $ this ->request ($ endpoint , 'POST ' );
143143 $ comment ->setData ($ response ['comment ' ]);
144144 }
@@ -152,7 +152,7 @@ public function remove(Comment &$comment)
152152 */
153153 public function restore (Comment &$ comment )
154154 {
155- $ endpoint = '/ comments/ ' .$ comment ->id .'/restore.json ' ;
155+ $ endpoint = 'comments/ ' .$ comment ->id .'/restore.json ' ;
156156 $ response = $ this ->request ($ endpoint , 'POST ' );
157157 $ comment ->setData ($ response ['comment ' ]);
158158 }
0 commit comments