Skip to content

Commit ba97823

Browse files
Merge pull request #25 from RusticiSoftware/v3.0-release
Updated library to work with `X-Total-Count` header and new GetApplications endpoint
2 parents 70b4c0e + 713ba07 commit ba97823

File tree

157 files changed

+1290
-464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+1290
-464
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ REST API used for SCORM Cloud integrations.
44
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
55

66
- API version: 2.0
7-
- Package version: 2.1.0
7+
- Package version: 3.0.0
88
- Build package: io.swagger.codegen.languages.PhpClientCodegen
99

1010
## Requirements

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rustici-software/scormcloud-api-v2-client-php",
3-
"version": "2.1.0",
3+
"version": "3.0.0",
44
"description": "",
55
"keywords": [
66
"scorm",

src/Api/AboutApi.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* OpenAPI spec version: 2.0
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
20-
* Swagger Codegen version: 2.4.27
2120
*/
2221

2322
/**

src/Api/ApplicationManagementApi.php

Lines changed: 372 additions & 5 deletions
Large diffs are not rendered by default.

src/Api/AuthenticationApi.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* OpenAPI spec version: 2.0
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
20-
* Swagger Codegen version: 2.4.27
2120
*/
2221

2322
/**

src/Api/ContentConnectorsApi.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* OpenAPI spec version: 2.0
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
20-
* Swagger Codegen version: 2.4.27
2120
*/
2221

2322
/**

src/Api/CourseApi.php

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* OpenAPI spec version: 2.0
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
20-
* Swagger Codegen version: 2.4.27
2120
*/
2221

2322
/**
@@ -7739,14 +7738,15 @@ protected function getCourseZipRequest($course_id)
77397738
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
77407739
* @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)
77417740
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
7741+
* @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)
77427742
*
77437743
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
77447744
* @throws \InvalidArgumentException
77457745
* @return \RusticiSoftware\Cloud\V2\Model\CourseListSchema
77467746
*/
7747-
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')
7747+
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')
77487748
{
7749-
list($response) = $this->getCoursesWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count);
7749+
list($response) = $this->getCoursesWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count);
77507750
return $response;
77517751
}
77527752

@@ -7765,15 +7765,16 @@ public function getCourses($since = null, $until = null, $datetime_filter = 'upd
77657765
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
77667766
* @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)
77677767
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
7768+
* @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)
77687769
*
77697770
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
77707771
* @throws \InvalidArgumentException
77717772
* @return array of \RusticiSoftware\Cloud\V2\Model\CourseListSchema, HTTP status code, HTTP response headers (array of strings)
77727773
*/
7773-
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')
7774+
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')
77747775
{
77757776
$returnType = '\RusticiSoftware\Cloud\V2\Model\CourseListSchema';
7776-
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count);
7777+
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count);
77777778

77787779
try {
77797780
$options = $this->createHttpClientOption();
@@ -7857,13 +7858,14 @@ public function getCoursesWithHttpInfo($since = null, $until = null, $datetime_f
78577858
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
78587859
* @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)
78597860
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
7861+
* @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)
78607862
*
78617863
* @throws \InvalidArgumentException
78627864
* @return \GuzzleHttp\Promise\PromiseInterface
78637865
*/
7864-
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')
7866+
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')
78657867
{
7866-
return $this->getCoursesAsyncWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count)
7868+
return $this->getCoursesAsyncWithHttpInfo($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count)
78677869
->then(
78687870
function ($response) {
78697871
return $response[0];
@@ -7886,14 +7888,15 @@ function ($response) {
78867888
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
78877889
* @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)
78887890
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
7891+
* @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)
78897892
*
78907893
* @throws \InvalidArgumentException
78917894
* @return \GuzzleHttp\Promise\PromiseInterface
78927895
*/
7893-
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')
7896+
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')
78947897
{
78957898
$returnType = '\RusticiSoftware\Cloud\V2\Model\CourseListSchema';
7896-
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count);
7899+
$request = $this->getCoursesRequest($since, $until, $datetime_filter, $tags, $filter, $filter_by, $order_by, $more, $include_course_metadata, $include_registration_count, $include_total_count);
78977900

78987901
return $this->client
78997902
->sendAsync($request, $this->createHttpClientOption())
@@ -7945,11 +7948,12 @@ function ($exception) {
79457948
* @param string $more Pagination token returned as `more` property of multi page list requests (optional)
79467949
* @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)
79477950
* @param bool $include_registration_count Include the registration count in the results (optional, default to false)
7951+
* @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)
79487952
*
79497953
* @throws \InvalidArgumentException
79507954
* @return \GuzzleHttp\Psr7\Request
79517955
*/
7952-
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')
7956+
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')
79537957
{
79547958

79557959
$resourcePath = '/courses';
@@ -8002,6 +8006,10 @@ protected function getCoursesRequest($since = null, $until = null, $datetime_fil
80028006
if ($include_registration_count !== null) {
80038007
$queryParams['includeRegistrationCount'] = ObjectSerializer::toQueryValue($include_registration_count);
80048008
}
8009+
// query params
8010+
if ($include_total_count !== null) {
8011+
$queryParams['includeTotalCount'] = ObjectSerializer::toQueryValue($include_total_count);
8012+
}
80058013

80068014

80078015
// body params

0 commit comments

Comments
 (0)