cvl01/planadaysdk

★ 0Forks 0PHPGitHub ↗Compare

README

SwaggerClient-php

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

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

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;
}
?>

Documentation for API Endpoints

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

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-Api-Key
  • Location: HTTP header

Author

Contributors

cvl01

Issues