Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
55
application/libraries/RestCrawlerServiceClient.php
Normal file
55
application/libraries/RestCrawlerServiceClient.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
require_once __DIR__ . '/RestServiceClient.php';
|
||||
|
||||
class RestCrawlerServiceClient extends RestServiceClient
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{ }
|
||||
|
||||
public function saveVideo($params)
|
||||
{
|
||||
$response = $this->request('POST', '/api/v1/video', $params);
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getProductByAsinCode($asinCode)
|
||||
{
|
||||
error_log('/amazon/product/detail/'. $asinCode);
|
||||
$response = $this->request('GET', '/amazon/product/detail/'. $asinCode, []);
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getProductByBatchAsinCode($asinCode)
|
||||
{
|
||||
error_log('/amazon/product/detail/batch'. print_r($asinCode, true));
|
||||
$response = $this->request('POST', '/amazon/product/detail/batch', $asinCode);
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getVideoCategory($params)
|
||||
{
|
||||
$response = $this->request('GET', '/api/v1/video/category', $params);
|
||||
return $response->data;
|
||||
}
|
||||
|
||||
public function saveVideoCategory($params)
|
||||
{
|
||||
$response = $this->request('POST', '/api/v1/video/category', $params);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
public function deleteVideo($params) {
|
||||
$response = $this->request('DELETE', '/api/v1/video', $params);
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function updateVideo($params) {
|
||||
$response = $this->request('PUT', '/api/v1/video', $params);
|
||||
return $response->data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user