Skip to content

Commit

Permalink
Merge pull request #4 from RusticiSoftware/full_release
Browse files Browse the repository at this point in the history
Bring lib out of beta
  • Loading branch information
tedwards authored Sep 23, 2019
2 parents 40d768d + 347caa6 commit 44282c7
Show file tree
Hide file tree
Showing 130 changed files with 22,983 additions and 394 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ 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 beta
- Package version: 1.0.0-beta
- API version: 2.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen

## Requirements
Expand Down
2 changes: 1 addition & 1 deletion autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* REST API used for SCORM Cloud integrations.
*
* OpenAPI spec version: 2.0 beta
* OpenAPI spec version: 2.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
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": "1.0.0-beta",
"version": "1.0.0",
"description": "",
"keywords": [
"scorm",
Expand Down
168 changes: 168 additions & 0 deletions src/Api/AboutApi.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
<?php
/**
* AboutApi
* PHP version 5
*
* @category Class
* @package RusticiSoftware\Cloud\V2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/

/**
* SCORM Cloud Rest API
*
* REST API used for SCORM Cloud integrations.
*
* OpenAPI spec version: 2.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
*/

/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/

namespace RusticiSoftware\Cloud\V2\Api;

use \RusticiSoftware\Cloud\V2\ApiClient;
use \RusticiSoftware\Cloud\V2\ApiException;
use \RusticiSoftware\Cloud\V2\Configuration;
use \RusticiSoftware\Cloud\V2\ObjectSerializer;

/**
* AboutApi Class Doc Comment
*
* @category Class
* @package RusticiSoftware\Cloud\V2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class AboutApi
{
/**
* API Client
*
* @var \RusticiSoftware\Cloud\V2\ApiClient instance of the ApiClient
*/
protected $apiClient;

/**
* Constructor
*
* @param \RusticiSoftware\Cloud\V2\ApiClient|null $apiClient The api client to use
*/
public function __construct(\RusticiSoftware\Cloud\V2\ApiClient $apiClient = null)
{
if ($apiClient === null) {
$apiClient = new ApiClient();
}

$this->apiClient = $apiClient;
}

/**
* Get API client
*
* @return \RusticiSoftware\Cloud\V2\ApiClient get the API client
*/
public function getApiClient()
{
return $this->apiClient;
}

/**
* Set the API client
*
* @param \RusticiSoftware\Cloud\V2\ApiClient $apiClient set the API client
*
* @return AboutApi
*/
public function setApiClient(\RusticiSoftware\Cloud\V2\ApiClient $apiClient)
{
$this->apiClient = $apiClient;
return $this;
}

/**
* Operation getAbout
*
* Get back the version and platform of the running instance of Engine
*
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
* @return \RusticiSoftware\Cloud\V2\Model\AboutSchema
*/
public function getAbout()
{
list($response) = $this->getAboutWithHttpInfo();
return $response;
}

/**
* Operation getAboutWithHttpInfo
*
* Get back the version and platform of the running instance of Engine
*
* @throws \RusticiSoftware\Cloud\V2\ApiException on non-2xx response
* @return array of \RusticiSoftware\Cloud\V2\Model\AboutSchema, HTTP status code, HTTP response headers (array of strings)
*/
public function getAboutWithHttpInfo()
{
// parse inputs
$resourcePath = "/about";
$httpBody = '';
$queryParams = [];
$headerParams = [];
$formParams = [];
$_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);

// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);


// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// this endpoint requires HTTP basic authentication
if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {
$headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword());
}
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath,
'GET',
$queryParams,
$httpBody,
$headerParams,
'\RusticiSoftware\Cloud\V2\Model\AboutSchema',
'/about'
);

return [$this->apiClient->getSerializer()->deserialize($response, '\RusticiSoftware\Cloud\V2\Model\AboutSchema', $httpHeader), $statusCode, $httpHeader];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\RusticiSoftware\Cloud\V2\Model\AboutSchema', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}

throw $e;
}
}
}
Loading

0 comments on commit 44282c7

Please sign in to comment.