LISTS: Creacion de APIs
This commit is contained in:
@@ -62,6 +62,14 @@ class Lists {
|
||||
$list = new \ListCompleted();
|
||||
$listpeer = 'ListCompletedPeer';
|
||||
break;
|
||||
case 'paused':
|
||||
$list = new \ListPaused();
|
||||
$listpeer = 'ListPausedPeer';
|
||||
break;
|
||||
case 'canceled':
|
||||
$list = new \ListCanceled();
|
||||
$listpeer = 'ListCanceledPeer';
|
||||
break;
|
||||
case 'my_inbox':
|
||||
$list = new \ListMyInbox();
|
||||
$listpeer = 'ListMyInboxPeer';
|
||||
|
||||
@@ -329,6 +329,217 @@ class Lists extends Api
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get list Paused
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /paused
|
||||
*/
|
||||
public function doGetListPaused(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_PAUSED_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('paused', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Paused
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /paused/total
|
||||
*/
|
||||
public function doGetCountPaused(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('paused', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get list Canceled
|
||||
*
|
||||
* @param string $count {@from path}
|
||||
* @param string $paged {@from path}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $sort {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /canceled
|
||||
*/
|
||||
public function doGetListCanceled(
|
||||
$count = true,
|
||||
$paged = true,
|
||||
$start = 0,
|
||||
$limit = 0,
|
||||
$sort = 'APP_CANCELED_DATE',
|
||||
$dir = 'DESC',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['paged'] = $paged;
|
||||
$dataList['count'] = $count;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('canceled', $dataList);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get count list Canceled
|
||||
*
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @param string $filter {@from path}
|
||||
* @param string $date_from {@from path}
|
||||
* @param string $date_to {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /canceled/total
|
||||
*/
|
||||
public function doGetCountCanceled(
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = '',
|
||||
$filter = '',
|
||||
$date_from = '',
|
||||
$date_to = ''
|
||||
) {
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$dataList['filter'] = $filter;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
|
||||
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||
$response = $lists->getList('canceled', $dataList, true);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get List Completed
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user