findAll
Find all departments
An Array with all departments
/department
Usage and SDK Samples
curl -X GET "http://localhost:3000/v1/livechat/department"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DepartmentApi;
import java.io.File;
import java.util.*;
public class DepartmentApiExample {
public static void main(String[] args) {
DepartmentApi apiInstance = new DepartmentApi();
try {
ResponseList result = apiInstance.findAll();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DepartmentApi#findAll");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DepartmentApi;
public class DepartmentApiExample {
public static void main(String[] args) {
DepartmentApi apiInstance = new DepartmentApi();
try {
ResponseList result = apiInstance.findAll();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DepartmentApi#findAll");
e.printStackTrace();
}
}
}
DepartmentApi *apiInstance = [[DepartmentApi alloc] init];
// Find all departments
[apiInstance findAllWithCompletionHandler:
^(ResponseList output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var RestApiLivechat = require('rest_api___livechat');
var api = new RestApiLivechat.DepartmentApi()
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.findAll(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class findAllExample
{
public void main()
{
var apiInstance = new DepartmentApi();
try
{
// Find all departments
ResponseList result = apiInstance.findAll();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DepartmentApi.findAll: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DepartmentApi();
try {
$result = $api_instance->findAll();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DepartmentApi->findAll: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DepartmentApi;
my $api_instance = WWW::SwaggerClient::DepartmentApi->new();
eval {
my $result = $api_instance->findAll();
print Dumper($result);
};
if ($@) {
warn "Exception when calling DepartmentApi->findAll: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.DepartmentApi()
try:
# Find all departments
api_response = api_instance.find_all()
pprint(api_response)
except ApiException as e:
print("Exception when calling DepartmentApi->findAll: %s\n" % e)