jeontwikkeling-nl/ltisaas_client_api_php

<p>A brief overview of the API versions:</p> <ul> <li><strong>v0:</strong> This version is solely for testing and does not interact with the database, nor does it involve any validation. It simply serves mock data.</li> <li><strong>v1:</strong> This is the official version of the LtiSaas API, intend

V1.0.35 2023-11-07 14:38 UTC

README

A brief overview of the API versions:

  • v0: This version is solely for testing and does not interact with the database, nor does it involve any validation. It simply serves mock data.
  • v1: This is the official version of the LtiSaas API, intended for production use.

Please be informed that when testing version v0, the HTTP Access-Token header should be set with the value 'dummy'.

Also, please note that the API has a limit of 2500 results per response.

Additionally, all webservices support both POST and GET requests. However, the POST method is required when uploading files.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/jeontwikkeling-nl/ltisaas_client_api_php.git"
    }
  ],
  "require": {
    "jeontwikkeling-nl/ltisaas_client_api_php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: token
$config = LtiSaasApi\Configuration::getDefaultConfiguration()->setApiKey('Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LtiSaasApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Access-Token', 'Bearer');


$apiInstance = new LtiSaasApi\Api\DefaultApi(
    // 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
);
$coursename = 'coursename_example'; // string | The name of the course to be created
$coursenameshort = 'coursenameshort_example'; // string | The shortname of the course to be created

try {
    $result = $apiInstance->courseAdd($coursename, $coursenameshort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->courseAdd: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://provider42luuk.web11.webv.nl/local/ltisaas/api.php/v0

Class Method HTTP request Description
DefaultApi courseAdd GET /course/add Create a new course
DefaultApi courseDelete GET /course/delete Delete an existing course by its ID
DefaultApi courseLearningObjectDelete GET /course/learningobject/delete Delete a specific learning object
DefaultApi courseLearningObjectScromAdd POST /course/learningobject/scrom/add Add an SCORM package to a course
DefaultApi courseLearningobjectList GET /course/learningobject/list Get learning objects for a course
DefaultApi courseLearningobjectScormUpdate POST /course/learningobject/scrom/update Update SCORM Learning Object
DefaultApi courseList GET /course/list Retrieve all courses
DefaultApi courseLtiRegistrationsByDay GET /course/lti/registrations_by_day Get LTI registrations by day
DefaultApi courseLtiRegistrationsSumByCourse GET /course/lti/registrations_sum_by_course Get total LTI registrations per course
DefaultApi courseToolAdd GET /course/tool/add Add new tool to a course
DefaultApi courseToolDelete GET /course/tool/delete Delete a specific course tool
DefaultApi courseToolList GET /course/tool/list List all LTI tools within a course
DefaultApi courseToolUpdate GET /course/tool/update Update a specific course tool
DefaultApi courseUpdate GET /course/update Update an existing course
DefaultApi tokenAdd GET /token/add Add a new API token
DefaultApi tokenDelete GET /token/delete Delete an API token
DefaultApi tokenList GET /token/list Get list of API tokens
DefaultApi userDelete GET /user/delete Delete a user by ID
DefaultApi userDeleteBulk GET /user/delete_bulk Delete multiple users by IDs
DefaultApi userList GET /user/list Get list of users in a tool

Models

Authorization

Authentication schemes defined for the API:

token

  • Type: API key
  • API key parameter name: Access-Token
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen