You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is generated using swagger-codegen. When swagger is updated, sometimes changes to the library occur. As a
45
+
result of the recent update, service classes are now instantiated slightly differently. You now need to pass a Configuration
46
+
object as an argument to the service class' constructor. An example of passing the default configuration is below:
47
+
48
+
```php
49
+
$registration_api = new \RusticiSoftware\Cloud\V2\Api\RegistrationApi(null, RusticiSoftware\Cloud\V2\Configuration::getDefaultConfiguration(), null);
50
+
```
51
+
52
+
If this does not make sense to you, fear not. There is a greater explanation of service classes and configurations below.
53
+
54
+
It is also worth noting how boolean values need passed in order to function correctly. In functions that consume a boolean argument,
55
+
make sure to pass the value as a string. For example, the boolean value of `True` should instead be passed as `'true'`.
56
+
43
57
## Getting Started
58
+
If you are completely new to SCORM Cloud, please read through our [Core Concepts](http://cloud.scorm.com/docs/concepts/)
59
+
and the rest of our documentation.
60
+
61
+
This library adheres to the same specification as our API. As a result, your requests will utilize the service classes
62
+
located in the Api folder. Each service class represents a different category of functionality. For example,
63
+
adding, deleting, or modifying courses would all be done through functions in CourseApi. You can find examples of
64
+
common classes and functions below.
65
+
66
+
### Configuration
67
+
Before you can interact with the API, you will need to set up your authentication credentials.
68
+
69
+
```php
70
+
$config = new RusticiSoftware\Cloud\V2\Configuration();
71
+
$config->setUsername('APP_ID');
72
+
$config->setPassword('SECRET_KEY');
73
+
```
44
74
45
-
Please follow the [installation procedure](#installation--usage) and then run the following:
75
+
### CourseApi
76
+
Below is an example of uploading a course to Cloud. Course Service documentation can be found [here](http://cloud.scorm.com/docs/api_reference/v2/endpoints/courseservice/)
77
+
78
+
```php
79
+
$course_api = new \RusticiSoftware\Cloud\V2\Api\CourseApi(null, $config, null);
80
+
$course_file = new SplFileObject('path/to/course/file');
Below is an example of creating a very basic registration. Registration Service documentation can be found [here](http://cloud.scorm.com/docs/api_reference/v2/endpoints/registrationservice/)
86
+
87
+
```php
88
+
$registration_api = new \RusticiSoftware\Cloud\V2\Api\RegistrationApi(null, $config, null);
89
+
90
+
//instantiate a CreateRegistrationSchema that will be passed to createRegistration
91
+
$reg_schema = new RusticiSoftware\Cloud\V2\Model\CreateRegistrationSchema();
0 commit comments