@@ -17,6 +17,7 @@ public function all($endpoint = '', $options = [])
1717 {
1818 return $ this ->client ->get ($ endpoint , $ options );
1919 }
20+
2021 /**
2122 * GET method.
2223 * Retrieve Single data
@@ -30,6 +31,7 @@ public function find($endpoint = '', $options = [])
3031 {
3132 return $ this ->client ->get ($ endpoint , $ options );
3233 }
34+
3335 /**
3436 * POST method.
3537 * Insert data
@@ -43,6 +45,7 @@ public function create($endpoint, $data)
4345 {
4446 return $ this ->client ->post ($ endpoint , $ data );
4547 }
48+
4649 /**
4750 * PUT method.
4851 * Update data
@@ -56,6 +59,7 @@ public function update($endpoint, $data)
5659 {
5760 return $ this ->client ->put ($ endpoint , $ data );
5861 }
62+
5963 /**
6064 * DELETE method.
6165 * Remove data
@@ -69,6 +73,7 @@ public function delete($endpoint, $options = [])
6973 {
7074 return $ this ->client ->delete ($ endpoint , $ options );
7175 }
76+
7277 /**
7378 * Return the last request header
7479 *
@@ -78,6 +83,7 @@ public function getRequest()
7883 {
7984 return $ this ->client ->http ->getRequest ();
8085 }
86+
8187 /**
8288 * Return the http response headers from last request
8389 *
@@ -87,6 +93,7 @@ public function getResponse()
8793 {
8894 return $ this ->client ->http ->getResponse ();
8995 }
96+
9097 /**
9198 * Return the current page number
9299 *
@@ -96,6 +103,7 @@ public function current()
96103 {
97104 return !empty ($ this ->getRequest ()->getParameters ()['page ' ]) ? $ this ->getRequest ()->getParameters ()['page ' ] : 1 ;
98105 }
106+
99107 /**
100108 * Count the total results and return it
101109 *
@@ -105,6 +113,7 @@ public function countResults()
105113 {
106114 return (int ) $ this ->getResponse ()->getHeaders ()['X-WP-Total ' ];
107115 }
116+
108117 /**
109118 * Count the total pages and return
110119 *
@@ -114,6 +123,7 @@ public function countPages()
114123 {
115124 return (int ) $ this ->getResponse ()->getHeaders ()['X-WP-TotalPages ' ];
116125 }
126+
117127 /**
118128 * Return the previous page number
119129 *
@@ -124,6 +134,7 @@ public function previous()
124134 $ currentPage = $ this ->current ();
125135 return (--$ currentPage > 1 ) ? $ currentPage : null ;
126136 }
137+
127138 /**
128139 * Return the next page number
129140 *
0 commit comments