Hospital Appointments Booking

Appointments

appointmentsAppointmentIdDelete

Delete an appointment


/appointments/{appointmentId}

Usage and SDK Samples

curl -X DELETE\
-H "Accept: application/json"\
"//appointments/{appointmentId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AppointmentsApi;

import java.io.File;
import java.util.*;

public class AppointmentsApiExample {

    public static void main(String[] args) {
        
        AppointmentsApi apiInstance = new AppointmentsApi();
        String appointmentId = appointmentId_example; // String | 
        try {
            Appointment result = apiInstance.appointmentsAppointmentIdDelete(appointmentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppointmentsApi#appointmentsAppointmentIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AppointmentsApi;

public class AppointmentsApiExample {

    public static void main(String[] args) {
        AppointmentsApi apiInstance = new AppointmentsApi();
        String appointmentId = appointmentId_example; // String | 
        try {
            Appointment result = apiInstance.appointmentsAppointmentIdDelete(appointmentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppointmentsApi#appointmentsAppointmentIdDelete");
            e.printStackTrace();
        }
    }
}
String *appointmentId = appointmentId_example; // 

AppointmentsApi *apiInstance = [[AppointmentsApi alloc] init];

// Delete an appointment
[apiInstance appointmentsAppointmentIdDeleteWith:appointmentId
              completionHandler: ^(Appointment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HospitalAppointmentsBooking = require('hospital_appointments_booking');

var api = new HospitalAppointmentsBooking.AppointmentsApi()
var appointmentId = appointmentId_example; // {{String}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.appointmentsAppointmentIdDelete(appointmentId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class appointmentsAppointmentIdDeleteExample
    {
        public void main()
        {

            var apiInstance = new AppointmentsApi();
            var appointmentId = appointmentId_example;  // String | 

            try
            {
                // Delete an appointment
                Appointment result = apiInstance.appointmentsAppointmentIdDelete(appointmentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppointmentsApi.appointmentsAppointmentIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAppointmentsApi();
$appointmentId = appointmentId_example; // String | 

try {
    $result = $api_instance->appointmentsAppointmentIdDelete($appointmentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppointmentsApi->appointmentsAppointmentIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AppointmentsApi;

my $api_instance = WWW::SwaggerClient::AppointmentsApi->new();
my $appointmentId = appointmentId_example; # String | 

eval { 
    my $result = $api_instance->appointmentsAppointmentIdDelete(appointmentId => $appointmentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppointmentsApi->appointmentsAppointmentIdDelete: $@\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.AppointmentsApi()
appointmentId = appointmentId_example # String | 

try: 
    # Delete an appointment
    api_response = api_instance.appointments_appointment_id_delete(appointmentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppointmentsApi->appointmentsAppointmentIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
appointmentId*
String
Required

Responses

Status: 200 - Successful operation


appointmentsGet

List all doctors' appointments


/appointments

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//appointments"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AppointmentsApi;

import java.io.File;
import java.util.*;

public class AppointmentsApiExample {

    public static void main(String[] args) {
        
        AppointmentsApi apiInstance = new AppointmentsApi();
        try {
            array[Appointment] result = apiInstance.appointmentsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppointmentsApi#appointmentsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AppointmentsApi;

public class AppointmentsApiExample {

    public static void main(String[] args) {
        AppointmentsApi apiInstance = new AppointmentsApi();
        try {
            array[Appointment] result = apiInstance.appointmentsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppointmentsApi#appointmentsGet");
            e.printStackTrace();
        }
    }
}

AppointmentsApi *apiInstance = [[AppointmentsApi alloc] init];

// List all doctors' appointments
[apiInstance appointmentsGetWithCompletionHandler: 
              ^(array[Appointment] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HospitalAppointmentsBooking = require('hospital_appointments_booking');

var api = new HospitalAppointmentsBooking.AppointmentsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.appointmentsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class appointmentsGetExample
    {
        public void main()
        {

            var apiInstance = new AppointmentsApi();

            try
            {
                // List all doctors' appointments
                array[Appointment] result = apiInstance.appointmentsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppointmentsApi.appointmentsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAppointmentsApi();

try {
    $result = $api_instance->appointmentsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppointmentsApi->appointmentsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AppointmentsApi;

my $api_instance = WWW::SwaggerClient::AppointmentsApi->new();

eval { 
    my $result = $api_instance->appointmentsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppointmentsApi->appointmentsGet: $@\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.AppointmentsApi()

try: 
    # List all doctors' appointments
    api_response = api_instance.appointments_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppointmentsApi->appointmentsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation


appointmentsPost

Create a new appointment


/appointments

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//appointments"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AppointmentsApi;

import java.io.File;
import java.util.*;

public class AppointmentsApiExample {

    public static void main(String[] args) {
        
        AppointmentsApi apiInstance = new AppointmentsApi();
        Appointment body = ; // Appointment | 
        try {
            Appointment result = apiInstance.appointmentsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppointmentsApi#appointmentsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AppointmentsApi;

public class AppointmentsApiExample {

    public static void main(String[] args) {
        AppointmentsApi apiInstance = new AppointmentsApi();
        Appointment body = ; // Appointment | 
        try {
            Appointment result = apiInstance.appointmentsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AppointmentsApi#appointmentsPost");
            e.printStackTrace();
        }
    }
}
Appointment *body = ; // 

AppointmentsApi *apiInstance = [[AppointmentsApi alloc] init];

// Create a new appointment
[apiInstance appointmentsPostWith:body
              completionHandler: ^(Appointment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HospitalAppointmentsBooking = require('hospital_appointments_booking');

var api = new HospitalAppointmentsBooking.AppointmentsApi()
var body = ; // {{Appointment}} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.appointmentsPost(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class appointmentsPostExample
    {
        public void main()
        {

            var apiInstance = new AppointmentsApi();
            var body = new Appointment(); // Appointment | 

            try
            {
                // Create a new appointment
                Appointment result = apiInstance.appointmentsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AppointmentsApi.appointmentsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAppointmentsApi();
$body = ; // Appointment | 

try {
    $result = $api_instance->appointmentsPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AppointmentsApi->appointmentsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AppointmentsApi;

my $api_instance = WWW::SwaggerClient::AppointmentsApi->new();
my $body = WWW::SwaggerClient::Object::Appointment->new(); # Appointment | 

eval { 
    my $result = $api_instance->appointmentsPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AppointmentsApi->appointmentsPost: $@\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.AppointmentsApi()
body =  # Appointment | 

try: 
    # Create a new appointment
    api_response = api_instance.appointments_post(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AppointmentsApi->appointmentsPost: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation


Doctors

addPet

Add a new doctor

Add a new doctor


/doctors

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"//doctors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DoctorsApi;

import java.io.File;
import java.util.*;

public class DoctorsApiExample {

    public static void main(String[] args) {
        
        DoctorsApi apiInstance = new DoctorsApi();
        Doctor body = ; // Doctor | Create a new doctor
        try {
            Doctor result = apiInstance.addPet(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DoctorsApi#addPet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DoctorsApi;

public class DoctorsApiExample {

    public static void main(String[] args) {
        DoctorsApi apiInstance = new DoctorsApi();
        Doctor body = ; // Doctor | Create a new doctor
        try {
            Doctor result = apiInstance.addPet(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DoctorsApi#addPet");
            e.printStackTrace();
        }
    }
}
Doctor *body = ; // Create a new doctor

DoctorsApi *apiInstance = [[DoctorsApi alloc] init];

// Add a new doctor
[apiInstance addPetWith:body
              completionHandler: ^(Doctor output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HospitalAppointmentsBooking = require('hospital_appointments_booking');

var api = new HospitalAppointmentsBooking.DoctorsApi()
var body = ; // {{Doctor}} Create a new doctor

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addPet(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class addPetExample
    {
        public void main()
        {

            var apiInstance = new DoctorsApi();
            var body = new Doctor(); // Doctor | Create a new doctor

            try
            {
                // Add a new doctor
                Doctor result = apiInstance.addPet(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DoctorsApi.addPet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDoctorsApi();
$body = ; // Doctor | Create a new doctor

try {
    $result = $api_instance->addPet($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DoctorsApi->addPet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DoctorsApi;

my $api_instance = WWW::SwaggerClient::DoctorsApi->new();
my $body = WWW::SwaggerClient::Object::Doctor->new(); # Doctor | Create a new doctor

eval { 
    my $result = $api_instance->addPet(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DoctorsApi->addPet: $@\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.DoctorsApi()
body =  # Doctor | Create a new doctor

try: 
    # Add a new doctor
    api_response = api_instance.add_pet(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DoctorsApi->addPet: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successful operation

Status: 405 - Invalid input


bookingsGet

List all bookings for a specific doctor


/bookings

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//bookings?doc="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DoctorsApi;

import java.io.File;
import java.util.*;

public class DoctorsApiExample {

    public static void main(String[] args) {
        
        DoctorsApi apiInstance = new DoctorsApi();
        String doc = doc_example; // String | the name of the doctor
        try {
            array[Booking] result = apiInstance.bookingsGet(doc);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DoctorsApi#bookingsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DoctorsApi;

public class DoctorsApiExample {

    public static void main(String[] args) {
        DoctorsApi apiInstance = new DoctorsApi();
        String doc = doc_example; // String | the name of the doctor
        try {
            array[Booking] result = apiInstance.bookingsGet(doc);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DoctorsApi#bookingsGet");
            e.printStackTrace();
        }
    }
}
String *doc = doc_example; // the name of the doctor

DoctorsApi *apiInstance = [[DoctorsApi alloc] init];

// List all bookings for a specific doctor
[apiInstance bookingsGetWith:doc
              completionHandler: ^(array[Booking] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HospitalAppointmentsBooking = require('hospital_appointments_booking');

var api = new HospitalAppointmentsBooking.DoctorsApi()
var doc = doc_example; // {{String}} the name of the doctor

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.bookingsGet(doc, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class bookingsGetExample
    {
        public void main()
        {

            var apiInstance = new DoctorsApi();
            var doc = doc_example;  // String | the name of the doctor

            try
            {
                // List all bookings for a specific doctor
                array[Booking] result = apiInstance.bookingsGet(doc);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DoctorsApi.bookingsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDoctorsApi();
$doc = doc_example; // String | the name of the doctor

try {
    $result = $api_instance->bookingsGet($doc);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DoctorsApi->bookingsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DoctorsApi;

my $api_instance = WWW::SwaggerClient::DoctorsApi->new();
my $doc = doc_example; # String | the name of the doctor

eval { 
    my $result = $api_instance->bookingsGet(doc => $doc);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DoctorsApi->bookingsGet: $@\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.DoctorsApi()
doc = doc_example # String | the name of the doctor

try: 
    # List all bookings for a specific doctor
    api_response = api_instance.bookings_get(doc)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DoctorsApi->bookingsGet: %s\n" % e)

Parameters

Query parameters
Name Description
doc*
String
the name of the doctor
Required

Responses

Status: 200 - Successful operation


doctorsGet

List all doctors


/doctors

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"//doctors"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DoctorsApi;

import java.io.File;
import java.util.*;

public class DoctorsApiExample {

    public static void main(String[] args) {
        
        DoctorsApi apiInstance = new DoctorsApi();
        try {
            array[Doctor] result = apiInstance.doctorsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DoctorsApi#doctorsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DoctorsApi;

public class DoctorsApiExample {

    public static void main(String[] args) {
        DoctorsApi apiInstance = new DoctorsApi();
        try {
            array[Doctor] result = apiInstance.doctorsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DoctorsApi#doctorsGet");
            e.printStackTrace();
        }
    }
}

DoctorsApi *apiInstance = [[DoctorsApi alloc] init];

// List all doctors
[apiInstance doctorsGetWithCompletionHandler: 
              ^(array[Doctor] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HospitalAppointmentsBooking = require('hospital_appointments_booking');

var api = new HospitalAppointmentsBooking.DoctorsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.doctorsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class doctorsGetExample
    {
        public void main()
        {

            var apiInstance = new DoctorsApi();

            try
            {
                // List all doctors
                array[Doctor] result = apiInstance.doctorsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DoctorsApi.doctorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDoctorsApi();

try {
    $result = $api_instance->doctorsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DoctorsApi->doctorsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DoctorsApi;

my $api_instance = WWW::SwaggerClient::DoctorsApi->new();

eval { 
    my $result = $api_instance->doctorsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DoctorsApi->doctorsGet: $@\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.DoctorsApi()

try: 
    # List all doctors
    api_response = api_instance.doctors_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DoctorsApi->doctorsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation