update v1.0.6

This commit is contained in:
sujitprasad
2016-02-16 22:42:08 +05:30
parent e6b579d67b
commit 073a49a8af
587 changed files with 21487 additions and 22766 deletions

View File

@@ -56,28 +56,28 @@ class TestController extends Controller {
}
public function TicketReply() {
$file = file_get_contents(base_path() . '/../lb-faveo/Img/Ladybird.png');
//$file = file_get_contents(base_path() . '/../lb-faveo/Img/Ladybird.png');
$data = [
'ticket_ID' => '81',
'ticket_ID' => '13',
'ReplyContent' => 'reply for the ticket id',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg',
'attachments' => [
[
'name' => 'ladybird',
'size' => '26398',
'type' => 'png',
'file' => $file,
],
[
'name' => 'ladybird',
'size' => '26398',
'type' => 'png',
'file' => $file,
]
],
// 'attachments' => [
// [
// 'name' => 'ladybird',
// 'size' => '26398',
// 'type' => 'png',
// 'file' => $file,
// ],
// [
// 'name' => 'ladybird',
// 'size' => '26398',
// 'type' => 'png',
// 'file' => $file,
// ]
// ],
];
$data = http_build_query($data, '', '&');
@@ -90,10 +90,10 @@ class TestController extends Controller {
public function CreateTicket() {
$file = file_get_contents(base_path() . '/../lb-faveo/Img/Ladybird.png');
//$file = file_get_contents(base_path() . '/../lb-faveo/Img/Ladybird.png');
$data = [
'user_id' => '1',
'user_id' => 1,
'subject' => 'Api create via faveo api',
'body' => 'Test me when call api',
'helptopic' => '1',
@@ -101,24 +101,22 @@ class TestController extends Controller {
'priority' => '1',
'headers' => [0 => 'vijaycodename47@gmail.com'],
'dept' => '1',
'assignto' => '0',
'source' => 'api',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg',
/** if attachment */
'attachments' => [
[
'name' => 'ladybird',
'size' => '26398',
'type' => 'png',
'file' => $file,
],
[
'name' => 'ladybird',
'size' => '26398',
'type' => 'png',
'file' => $file,
]
],
/** if attachment */
// 'attachments' => [
// [
// 'name' => 'ladybird',
// 'size' => '26398',
// 'type' => 'png',
// 'file' => $file,
// ],
// [
// 'name' => 'ladybird',
// 'size' => '26398',
// 'type' => 'png',
// 'file' => $file,
// ]
// ],
];
$data = http_build_query($data, '', '&');
@@ -162,7 +160,7 @@ class TestController extends Controller {
public function GetAuthUser() {
$url = $this->server . "authenticate/user?token=" . \Config::get('app.token');
$url = $this->server . "authenticate/user?api-key=clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
@@ -170,12 +168,12 @@ class TestController extends Controller {
public function EditTicket() {
$data = [
'ticket_id' => '81',
'ticket_id' => '13',
'subject' => 'Api editing ticket via faveo api',
'sla_plan' => '2',
'help_topic' => '2',
'ticket_source' => '2',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg',
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN',
'ticket_priority' => '2',
];
@@ -188,8 +186,8 @@ class TestController extends Controller {
public function DeleteTicket() {
$data = [
'ticket_id' => [],
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'ticket_id' => [11],
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($data, '', '&');
@@ -200,35 +198,35 @@ class TestController extends Controller {
}
public function OpenedTickets() {
$url = $this->server . "helpdesk/open?token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/open?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function UnassignedTickets() {
$url = $this->server . "helpdesk/unassigned?token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/unassigned?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function CloseTickets() {
$url = $this->server . "helpdesk/closed?token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/closed?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function GetAgents() {
$url = $this->server . "helpdesk/agents?token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/agents?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function GetTeams() {
$url = $this->server . "helpdesk/teams?token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/teams?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
@@ -236,9 +234,9 @@ class TestController extends Controller {
public function AssignTicket() {
$data = [
'ticket_id' => '8',
'user' => 'vijay.sebastian@ladybird.com',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'ticket_id' => 1,
'user' => 'vijay.sebastian@ladybirdweb.com',
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($data, '', '&');
$url = $this->server . "helpdesk/assign?token=" . \Config::get('app.token');
@@ -250,7 +248,7 @@ class TestController extends Controller {
public function GetCustomers() {
$search = [
'search' => 'vij',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($search, '', '&');
$url = $this->server . "helpdesk/customers?token=" . \Config::get('app.token');
@@ -263,7 +261,7 @@ class TestController extends Controller {
public function GetCustomer() {
$search = [
'user_id' => '1',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($search, '', '&');
$url = $this->server . "helpdesk/customer?token=" . \Config::get('app.token');
@@ -276,7 +274,7 @@ class TestController extends Controller {
public function GetSearch() {
$search = [
'search' => 'api',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($search, '', '&');
$url = $this->server . "helpdesk/ticket-search?token=" . \Config::get('app.token');
@@ -288,8 +286,8 @@ class TestController extends Controller {
public function TicketThreads() {
$search = [
'id' => '8',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'id' => '1',
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($search, '', '&');
$url = $this->server . "helpdesk/ticket-thread?token=" . \Config::get('app.token');
@@ -301,8 +299,8 @@ class TestController extends Controller {
public function Url() {
$search = [
'url' => 'http://localhost/FaveoHELPDESK+KBLatests',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'url' => 'http://localhost/Faveo-HelpDesk-My-Branch/public/',
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($search, '', '&');
$url = $this->server . "helpdesk/url?token=" . \Config::get('app.token');
@@ -313,21 +311,21 @@ class TestController extends Controller {
}
public function GenerateApiKey() {
$url = $this->server . "helpdesk/api-key?token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/api-key?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function GetHelpTopic() {
$url = $this->server . "helpdesk/help-topic?api-key=clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg&token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/help-topic?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function GetSlaPlan() {
$url = $this->server . "helpdesk/sla-plan?api-key=clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg&token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/sla-plan?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
@@ -341,32 +339,32 @@ class TestController extends Controller {
}
public function GetDepartment() {
$url = $this->server . "helpdesk/department?api-key=clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg&token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/department?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function GetTickets() {
$url = $this->server . "helpdesk/tickets?api-key=clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg&token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/tickets?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function Inbox() {
$url = $this->server . "helpdesk/inbox?api-key=clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg&token=" . \Config::get('app.token');
$url = $this->server . "helpdesk/inbox?api-key=9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN&token=" . \Config::get('app.token');
$_this = new self();
$respose = $_this->CallGetApi($url);
return $respose;
}
public function InternalNote() {
$data = [
'ticketid' => '23',
'userid' => 1,
'body' => 'Testing the api internal note',
'api-key' => 'clYbe1g7BYVEJznBdvCEBR0xDCLDqKgg'
'api-key' => '9p41T2XFZ34YRZJUNQAdmM7iV0Rr1CjN'
];
$data = http_build_query($data, '', '&');
$url = $this->server . "helpdesk/internal-note?token=" . \Config::get('app.token');