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
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
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
Models
- CourseAdd200Response
- CourseDelete200Response
- CourseLearningObjectScromAdd200Response
- CourseLearningobjectList200Response
- CourseLearningobjectList200ResponseResultsInner
- CourseList200Response
- CourseList200ResponseResultsInner
- CourseLtiRegistrationsByDay200Response
- CourseLtiRegistrationsByDay200ResponseResultsInner
- CourseLtiRegistrationsSumByCourse200Response
- CourseLtiRegistrationsSumByCourse200ResponseResultsInner
- CourseToolAdd200Response
- CourseToolList200Response
- CourseToolList200ResponseResultsInner
- CourseUpdate200Response
- ErrorResponse
- TokenAdd200Response
- TokenList200Response
- TokenList200ResponseResultsInner
- UserList200Response
- UserList200ResponseResultsInner
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