getAbsence
Retrieve an individual absence item
Retrieve an individual absence item
/absences/{absenceid}
Usage and SDK Samples
curl -X GET\
-H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/SmartBlue/StaffSavvy/1.0.2/absences/{absenceid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AbsencesApi;
import java.io.File;
import java.util.*;
public class AbsencesApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
AbsencesApi apiInstance = new AbsencesApi();
Integer absenceid = 56; // Integer | individual absence id
try {
inline_response_200_3 result = apiInstance.getAbsence(absenceid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AbsencesApi#getAbsence");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AbsencesApi;
public class AbsencesApiExample {
public static void main(String[] args) {
AbsencesApi apiInstance = new AbsencesApi();
Integer absenceid = 56; // Integer | individual absence id
try {
inline_response_200_3 result = apiInstance.getAbsence(absenceid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AbsencesApi#getAbsence");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *absenceid = 56; // individual absence id
AbsencesApi *apiInstance = [[AbsencesApi alloc] init];
// Retrieve an individual absence item
[apiInstance getAbsenceWith:absenceid
completionHandler: ^(inline_response_200_3 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var StaffSavvyRestApi = require('staff_savvy_rest_api');
var defaultClient = StaffSavvyRestApi.ApiClient.instance;
var api = new StaffSavvyRestApi.AbsencesApi()
var absenceid = 56; // {{Integer}} individual absence id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAbsence(absenceid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAbsenceExample
{
public void main()
{
var apiInstance = new AbsencesApi();
var absenceid = 56; // Integer | individual absence id
try
{
// Retrieve an individual absence item
inline_response_200_3 result = apiInstance.getAbsence(absenceid);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling AbsencesApi.getAbsence: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAbsencesApi();
$absenceid = 56; // Integer | individual absence id
try {
$result = $api_instance->getAbsence($absenceid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AbsencesApi->getAbsence: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AbsencesApi;
my $api_instance = WWW::SwaggerClient::AbsencesApi->new();
my $absenceid = 56; # Integer | individual absence id
eval {
my $result = $api_instance->getAbsence(absenceid => $absenceid);
print Dumper($result);
};
if ($@) {
warn "Exception when calling AbsencesApi->getAbsence: $@\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.AbsencesApi()
absenceid = 56 # Integer | individual absence id
try:
# Retrieve an individual absence item
api_response = api_instance.get_absence(absenceid)
pprint(api_response)
except ApiException as e:
print("Exception when calling AbsencesApi->getAbsence: %s\n" % e)
Parameters
Name | Description |
---|---|
absenceid* |
Integer
individual absence id
Required
|