All URIs are relative to https://my.yoast.test
Method | HTTP request | Description |
---|---|---|
bulkInvite | POST /api/CourseEnrollments/bulkInvite | Bulk invite for Course Enrollment. |
fromAcademy | PUT /api/CourseEnrollments/fromAcademy | Update a CourseEnrollment |
getLegacyExpiring | GET /api/CourseEnrollments/getLegacyExpiring | Get legacy course enrollments that expire between two given dates |
getMany | GET /api/CourseEnrollments | Get course enrollments |
getManyPaged | GET /api/CourseEnrollments/paged | Get customers |
getOne | GET /api/CourseEnrollments/{id} | Get a course enrollment |
invite | POST /api/CourseEnrollments/{id}/invite | Invite a customer |
transfer | POST /api/CourseEnrollments/transfer | Transfer course enrollments |
\Yoast\MyYoastApiClient\Model\CourseEnrollment[] bulkInvite($body)
Bulk invite for Course Enrollment.
Bulk invites another Customer by email to use this Course Enrollment.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$body = new \Yoast\MyYoastApiClient\Model\BulkInviteDto(); // \Yoast\MyYoastApiClient\Model\BulkInviteDto |
try {
$result = $apiInstance->bulkInvite($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->bulkInvite: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\BulkInviteDto |
\Yoast\MyYoastApiClient\Model\CourseEnrollment[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
fromAcademy($body)
Update a CourseEnrollment
Updates the progress for a certain course and student with data from academy.yoast.com
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$body = new \Yoast\MyYoastApiClient\Model\CourseEnrollmentFromAcademyDto(); // \Yoast\MyYoastApiClient\Model\CourseEnrollmentFromAcademyDto |
try {
$apiInstance->fromAcademy($body);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->fromAcademy: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\CourseEnrollmentFromAcademyDto |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\CourseEnrollment[] getLegacyExpiring($from, $until)
Get legacy course enrollments that expire between two given dates
Gets a list of legacy course enrollments that expire between two dates. A legacy enrollment is a course enrollment that does not belong to a subscription, but is instead created as a direct result of placing an order.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime |
$until = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime |
try {
$result = $apiInstance->getLegacyExpiring($from, $until);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->getLegacyExpiring: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
from | \DateTime | ||
until | \DateTime |
\Yoast\MyYoastApiClient\Model\CourseEnrollment[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\CourseEnrollment[] getMany($filter)
Get course enrollments
Get and filter course enrollments
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$filter = new \stdClass; // object | Used for filtering/joining the results.
try {
$result = $apiInstance->getMany($filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->getMany: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
filter | object | Used for filtering/joining the results. | [optional] |
\Yoast\MyYoastApiClient\Model\CourseEnrollment[]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getManyPaged($filter)
Get customers
Get and filter customer
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$filter = new \stdClass; // object | Used for filtering/joining the results.
try {
$apiInstance->getManyPaged($filter);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->getManyPaged: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
filter | object | Used for filtering/joining the results. | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\CourseEnrollment getOne($id, $filter)
Get a course enrollment
Get a single course enrollment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
$filter = new \stdClass; // object | Used for filtering/joining the results.
try {
$result = $apiInstance->getOne($id, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->getOne: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | ||
filter | object | Used for filtering/joining the results. | [optional] |
\Yoast\MyYoastApiClient\Model\CourseEnrollment
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\CourseEnrollment invite($body, $id)
Invite a customer
Invites another Customer by email to use this Course Enrollment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$body = new \Yoast\MyYoastApiClient\Model\InviteDto(); // \Yoast\MyYoastApiClient\Model\InviteDto |
$id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string |
try {
$result = $apiInstance->invite($body, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->invite: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\InviteDto | ||
id | string |
\Yoast\MyYoastApiClient\Model\CourseEnrollment
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Yoast\MyYoastApiClient\Model\CourseEnrollment[] transfer($body)
Transfer course enrollments
Transfers all Course Enrollments from one Customer to another.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearer
$config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Yoast\MyYoastApiClient\Api\CourseEnrollmentApi(
// 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
);
$body = new \Yoast\MyYoastApiClient\Model\TransferDto(); // \Yoast\MyYoastApiClient\Model\TransferDto |
try {
$result = $apiInstance->transfer($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CourseEnrollmentApi->transfer: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Yoast\MyYoastApiClient\Model\TransferDto |
\Yoast\MyYoastApiClient\Model\CourseEnrollment[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]