This documentation describes the calls available in the public API of planaday.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/yellowwave/planaday-php-sdk.git"
}
],
"require": {
"yellowwave/planaday-php-sdk": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKeyAuth
$config = YellowWave\SwaggerClient\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = YellowWave\SwaggerClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Api-Key', 'Bearer');
$apiInstance = new YellowWave\SwaggerClient\PlanadaySDK\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$course_id = 1.2; // float | ID of the Course to create booking for in the form of an integer
$body = new \YellowWave\SwaggerClient\Model\BookingCourseIdBody(); // \YellowWave\SwaggerClient\Model\BookingCourseIdBody |
try {
$result = $apiInstance->createBooking($course_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->createBooking: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: ApiKeyAuth
$config = YellowWave\SwaggerClient\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = YellowWave\SwaggerClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Api-Key', 'Bearer');
$apiInstance = new YellowWave\SwaggerClient\PlanadaySDK\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$booking_id = "booking_id_example"; // string | ID of the booking received in the booking post call (i.e API5ce597c40e0fc6.85265205)
$body = new \YellowWave\SwaggerClient\Model\BookingBookingIdBody(); // \YellowWave\SwaggerClient\Model\BookingBookingIdBody |
try {
$result = $apiInstance->deleteMadeBooking($booking_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->deleteMadeBooking: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: ApiKeyAuth
$config = YellowWave\SwaggerClient\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = YellowWave\SwaggerClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Api-Key', 'Bearer');
$apiInstance = new YellowWave\SwaggerClient\PlanadaySDK\BookingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$booking_id = "booking_id_example"; // string | ID of the booking received in the booking post call (i.e API5ce597c40e0fc6.85265205)
$body = new \YellowWave\SwaggerClient\Model\PayedBookingIdBody(); // \YellowWave\SwaggerClient\Model\PayedBookingIdBody |
try {
$result = $apiInstance->markBookingAsPayed($booking_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BookingApi->markBookingAsPayed: ', $e->getMessage(), PHP_EOL;
}
?>All URIs are relative to https://apitest.api.planaday.net/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BookingApi | createBooking | POST /booking/{course_id} | Create booking |
| BookingApi | deleteMadeBooking | DELETE /booking/{booking_id} | Delete made booking |
| BookingApi | markBookingAsPayed | POST /booking/payed/{booking_id} | Mark booking as payed |
| CourseApi | getAListOfCourses | GET /course/list | Get a list of courses |
| CourseApi | viewCourseDetail | GET /course/{course_id} | View Course Detail |
| CourseApi | viewListOfDaypartsOfCourse | GET /course/{course_id}/dayparts&offset={offset}&limit={limit} | View list of dayparts of Course |
| CourseApi | viewListOfImagesOfCourse | GET /course/{course_id}/images&offset={offset}&limit={limit} | View list of images of Course |
| CourseApi | viewListOfMaterialsOfCourse | GET /course/{course_id}/materials&offset={offset}&limit={limit}&label={label} | View list of materials of Course |
| CoursetemplateApi | getListOfCoursetemplates | GET /coursetemplate/list | Get list of Coursetemplates |
| CoursetemplateApi | viewCoursetemplateDetail | GET /coursetemplate/{coursetemplate_id} | View Coursetemplate Detail |
| DaypartApi | viewDaypartDetail | GET /daypart/{daypart_id} | View Daypart Detail |
| DaypartApi | viewListOfMaterialsOfADaypart | GET /daypart/{daypart_id}/materials&offset={offset}&limit={limit}&label={label} | View list of materials of a Daypart |
| ExtrafieldsApi | getAListOfExtrafields | GET /extrafields/list | Get a list of extrafields |
| ImageApi | getImageBlob | GET /image/{image_id} | Get image blob |
| InstructorApi | addplanAnInstructorToASpecificDaypart | POST /instructor/{instructor_id}/daypart/ | Add/plan an instructor to a specific daypart |
| InstructorApi | addplanAnInstructorToAllDaypartsInASpecificCourse | POST /instructor/{instructor_id}/course/ | Add/plan an instructor to all dayparts in a specific course |
| InstructorApi | removeunplanAnInstructorFromASpecificDaypart | DELETE /instructor/{instructor_id}/daypart/ | Remove/unplan an instructor from a specific daypart |
| InstructorApi | removeunplanAnInstructorFromAllDaypartsInASpecificCourse | DELETE /instructor/{instructor_id}/course/ | Remove/unplan an instructor from all dayparts in a specific course |
| InstructorApi | viewListOfInstructors | GET /instructor/list/offset={offset}&limit={limit}&label={label} | View list of instructors |
| LabelApi | getAListOfLabels | GET /label/list | Get a list of labels |
| LocationApi | viewLocationDetail | GET /location/{location_id} | View Location Detail |
| PingApi | ping | GET /ping | Ping |
- BookingBookingIdBody
- BookingCourseIdBody
- BookingcourseIdAttributes
- BookingcourseIdCompany
- BookingcourseIdStudents
- BookingpayedbookingIdPayment
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2002Attributes
- InlineResponse2002Costs
- InlineResponse2002Coursetemplate
- InlineResponse2002Data
- InlineResponse2002Dayparts
- InlineResponse2002Links
- InlineResponse2002Meta
- InlineResponse2002MetaPage
- InlineResponse2002Users
- InlineResponse2002Values
- InlineResponse2003
- InlineResponse2003Data
- InlineResponse2003Links
- InlineResponse2003Meta
- InlineResponse2003MetaPage
- InlineResponse2004
- InlineResponse2004Code95
- InlineResponse2004Costs
- InlineResponse2004Users
- InlineResponse2005
- InlineResponse2005Data
- InlineResponse2006
- InlineResponse2006Data
- InlineResponse2006Links
- InlineResponse2006Meta
- InlineResponse2006MetaPage
- InlineResponse2007
- InlineResponse2007Address
- InlineResponse2007ContactInfo
- InlineResponse2007Costs
- InlineResponse200Details
- InlineResponse200DetailsCompany
- InlineResponse200DetailsStudents
- InlineResponse400
- InlineResponse404
- InstructorIdCourseBody
- InstructorIdCourseBody1
- InstructorIdDaypartBody
- InstructorIdDaypartBody1
- PayedBookingIdBody
- Type: API key
- API key parameter name: X-Api-Key
- Location: HTTP header