Skip to content

Commit

Permalink
Merge pull request #25 from RusticiSoftware/v3.0-release
Browse files Browse the repository at this point in the history
Updated library to work with `X-Total-Count` header and new GetApplications endpoint
  • Loading branch information
mjschuetze102 authored Nov 10, 2022
2 parents 70b4c0e + 713ba07 commit ba97823
Show file tree
Hide file tree
Showing 157 changed files with 1,290 additions and 464 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ REST API used for SCORM Cloud integrations.
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 2.0
- Package version: 2.1.0
- Package version: 3.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen

## Requirements
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rustici-software/scormcloud-api-v2-client-php",
"version": "2.1.0",
"version": "3.0.0",
"description": "",
"keywords": [
"scorm",
Expand Down
1 change: 0 additions & 1 deletion src/Api/AboutApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* OpenAPI spec version: 2.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.4.27
*/

/**
Expand Down
377 changes: 372 additions & 5 deletions src/Api/ApplicationManagementApi.php

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/Api/AuthenticationApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* OpenAPI spec version: 2.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.4.27
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Api/ContentConnectorsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* OpenAPI spec version: 2.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.4.27
*/

/**
Expand Down
28 changes: 18 additions & 10 deletions src/Api/CourseApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* OpenAPI spec version: 2.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.4.27
*/

/**
Expand Down Expand Up @@ -7739,14 +7738,15 @@ protected function getCourseZipRequest($course_id)
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
* @param bool $include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (optional, default to false)
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
* @param bool $include_total_count Include the total count of results matching the provided filters as a header on the initial request. The header will not be present on subsequent requests resulting from passing the `more` token. (optional, default to false)
*
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \RusticiSoftware\Cloud\V2\Model\CourseListSchema
*/
public function getCourses($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false')
public function getCourses($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false', $include_total_count = 'false')
{
list($response) = $this->getCoursesWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count);
list($response) = $this->getCoursesWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count);
return $response;
}

Expand All @@ -7765,15 +7765,16 @@ public function getCourses($since = null, $until = null, $datetime_filter = 'upd
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
* @param bool $include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (optional, default to false)
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
* @param bool $include_total_count Include the total count of results matching the provided filters as a header on the initial request. The header will not be present on subsequent requests resulting from passing the `more` token. (optional, default to false)
*
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \RusticiSoftware\Cloud\V2\Model\CourseListSchema, HTTP status code, HTTP response headers (array of strings)
*/
public function getCoursesWithHttpInfo($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false')
public function getCoursesWithHttpInfo($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false', $include_total_count = 'false')
{
$returnType = '\RusticiSoftware\Cloud\V2\Model\CourseListSchema';
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count);
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -7857,13 +7858,14 @@ public function getCoursesWithHttpInfo($since = null, $until = null, $datetime_f
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
* @param bool $include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (optional, default to false)
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
* @param bool $include_total_count Include the total count of results matching the provided filters as a header on the initial request. The header will not be present on subsequent requests resulting from passing the `more` token. (optional, default to false)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getCoursesAsync($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false')
public function getCoursesAsync($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false', $include_total_count = 'false')
{
return $this->getCoursesAsyncWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count)
return $this->getCoursesAsyncWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count)
->then(
function ($response) {
return $response[0];
Expand All @@ -7886,14 +7888,15 @@ function ($response) {
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
* @param bool $include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (optional, default to false)
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
* @param bool $include_total_count Include the total count of results matching the provided filters as a header on the initial request. The header will not be present on subsequent requests resulting from passing the `more` token. (optional, default to false)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function getCoursesAsyncWithHttpInfo($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false')
public function getCoursesAsyncWithHttpInfo($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false', $include_total_count = 'false')
{
$returnType = '\RusticiSoftware\Cloud\V2\Model\CourseListSchema';
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count);
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand Down Expand Up @@ -7945,11 +7948,12 @@ function ($exception) {
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
* @param bool $include_course_metadata Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (optional, default to false)
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
* @param bool $include_total_count Include the total count of results matching the provided filters as a header on the initial request. The header will not be present on subsequent requests resulting from passing the `more` token. (optional, default to false)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getCoursesRequest($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false')
protected function getCoursesRequest($since = null, $until = null, $datetime_filter = 'updated', $tags = null, $filter = null, $filter_by = 'course_id', $order_by = 'created_desc', $more = null, $include_course_metadata = 'false', $include_registration_count = 'false', $include_total_count = 'false')
{

$resourcePath = '/courses';
Expand Down Expand Up @@ -8002,6 +8006,10 @@ protected function getCoursesRequest($since = null, $until = null, $datetime_fil
if ($include_registration_count !== null) {
$queryParams['includeRegistrationCount'] = ObjectSerializer::toQueryValue($include_registration_count);
}
// query params
if ($include_total_count !== null) {
$queryParams['includeTotalCount'] = ObjectSerializer::toQueryValue($include_total_count);
}


// body params
Expand Down
Loading

0 comments on commit ba97823

Please sign in to comment.