Skip to content

Commit 44282c7

Browse files
authored
Merge pull request #4 from RusticiSoftware/full_release
Bring lib out of beta
2 parents 40d768d + 347caa6 commit 44282c7

File tree

130 files changed

+22983
-394
lines changed

Some content is hidden

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

130 files changed

+22983
-394
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ REST API used for SCORM Cloud integrations.
33

44
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
55

6-
- API version: 2.0 beta
7-
- Package version: 1.0.0-beta
6+
- API version: 2.0
7+
- Package version: 1.0.0
88
- Build package: io.swagger.codegen.languages.PhpClientCodegen
99

1010
## Requirements

autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* REST API used for SCORM Cloud integrations.
77
*
8-
* OpenAPI spec version: 2.0 beta
8+
* OpenAPI spec version: 2.0
99
*
1010
* Generated by: https://github.com/swagger-api/swagger-codegen.git
1111
*

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": "1.0.0-beta",
3+
"version": "1.0.0",
44
"description": "",
55
"keywords": [
66
"scorm",

src/Api/AboutApi.php

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?php
2+
/**
3+
* AboutApi
4+
* PHP version 5
5+
*
6+
* @category Class
7+
* @package RusticiSoftware\Cloud\V2
8+
* @author Swagger Codegen team
9+
* @link https://github.com/swagger-api/swagger-codegen
10+
*/
11+
12+
/**
13+
* SCORM Cloud Rest API
14+
*
15+
* REST API used for SCORM Cloud integrations.
16+
*
17+
* OpenAPI spec version: 2.0
18+
*
19+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
20+
*
21+
*/
22+
23+
/**
24+
* NOTE: This class is auto generated by the swagger code generator program.
25+
* https://github.com/swagger-api/swagger-codegen
26+
* Do not edit the class manually.
27+
*/
28+
29+
namespace RusticiSoftware\Cloud\V2\Api;
30+
31+
use \RusticiSoftware\Cloud\V2\ApiClient;
32+
use \RusticiSoftware\Cloud\V2\ApiException;
33+
use \RusticiSoftware\Cloud\V2\Configuration;
34+
use \RusticiSoftware\Cloud\V2\ObjectSerializer;
35+
36+
/**
37+
* AboutApi Class Doc Comment
38+
*
39+
* @category Class
40+
* @package RusticiSoftware\Cloud\V2
41+
* @author Swagger Codegen team
42+
* @link https://github.com/swagger-api/swagger-codegen
43+
*/
44+
class AboutApi
45+
{
46+
/**
47+
* API Client
48+
*
49+
* @var \RusticiSoftware\Cloud\V2\ApiClient instance of the ApiClient
50+
*/
51+
protected $apiClient;
52+
53+
/**
54+
* Constructor
55+
*
56+
* @param \RusticiSoftware\Cloud\V2\ApiClient|null $apiClient The api client to use
57+
*/
58+
public function __construct(\RusticiSoftware\Cloud\V2\ApiClient $apiClient = null)
59+
{
60+
if ($apiClient === null) {
61+
$apiClient = new ApiClient();
62+
}
63+
64+
$this->apiClient = $apiClient;
65+
}
66+
67+
/**
68+
* Get API client
69+
*
70+
* @return \RusticiSoftware\Cloud\V2\ApiClient get the API client
71+
*/
72+
public function getApiClient()
73+
{
74+
return $this->apiClient;
75+
}
76+
77+
/**
78+
* Set the API client
79+
*
80+
* @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client
81+
*
82+
* @return AboutApi
83+
*/
84+
public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient)
85+
{
86+
$this->apiClient = $apiClient;
87+
return $this;
88+
}
89+
90+
/**
91+
* Operation getAbout
92+
*
93+
* Get back the version and platform of the running instance of Engine
94+
*
95+
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
96+
* @return \RusticiSoftware\Cloud\V2\Model\AboutSchema
97+
*/
98+
public function getAbout()
99+
{
100+
list($response) = $this->getAboutWithHttpInfo();
101+
return $response;
102+
}
103+
104+
/**
105+
* Operation getAboutWithHttpInfo
106+
*
107+
* Get back the version and platform of the running instance of Engine
108+
*
109+
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
110+
* @return array of \RusticiSoftware\Cloud\V2\Model\AboutSchema, HTTP status code, HTTP response headers (array of strings)
111+
*/
112+
public function getAboutWithHttpInfo()
113+
{
114+
// parse inputs
115+
$resourcePath = "/about";
116+
$httpBody = '';
117+
$queryParams = [];
118+
$headerParams = [];
119+
$formParams = [];
120+
$_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);
121+
if (!is_null($_header_accept)) {
122+
$headerParams['Accept'] = $_header_accept;
123+
}
124+
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);
125+
126+
// default format to json
127+
$resourcePath = str_replace("{format}", "json", $resourcePath);
128+
129+
130+
// for model (json/xml)
131+
if (isset($_tempBody)) {
132+
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
133+
} elseif (count($formParams) > 0) {
134+
$httpBody = $formParams; // for HTTP post (form)
135+
}
136+
// this endpoint requires HTTP basic authentication
137+
if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {
138+
$headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword());
139+
}
140+
// this endpoint requires OAuth (access token)
141+
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
142+
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
143+
}
144+
// make the API Call
145+
try {
146+
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
147+
$resourcePath,
148+
'GET',
149+
$queryParams,
150+
$httpBody,
151+
$headerParams,
152+
'\RusticiSoftware\Cloud\V2\Model\AboutSchema',
153+
'/about'
154+
);
155+
156+
return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\AboutSchema', $httpHeader), $statusCode, $httpHeader];
157+
} catch (ApiException $e) {
158+
switch ($e->getCode()) {
159+
case 200:
160+
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\AboutSchema', $e->getResponseHeaders());
161+
$e->setResponseObject($data);
162+
break;
163+
}
164+
165+
throw $e;
166+
}
167+
}
168+
}

0 commit comments

Comments
 (0)