Com.RusticiSoftware.Cloud.V2 1.0.0

Swagger Generated C# Client for SCORM Cloud API v2

Install-Package Com.RusticiSoftware.Cloud.V2 -Version 1.0.0
dotnet add package Com.RusticiSoftware.Cloud.V2 --version 1.0.0
<PackageReference Include="Com.RusticiSoftware.Cloud.V2" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Com.RusticiSoftware.Cloud.V2 --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Com.RusticiSoftware.Cloud.V2 - the C# library for the SCORM Cloud Rest API

REST API used for SCORM Cloud integrations.

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

<a name="frameworks-supported"></a>

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

<a name="dependencies"></a>

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

<a name="installation"></a>

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Com.RusticiSoftware.Cloud.V2.Api;
using Com.RusticiSoftware.Cloud.V2.Client;
using Com.RusticiSoftware.Cloud.V2.Model;

<a name="packaging"></a>

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Com.RusticiSoftware.Cloud.V2.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

<a name="getting-started"></a>

Getting Started

using System;
using Com.RusticiSoftware.Cloud.V2.Api;
using Com.RusticiSoftware.Cloud.V2.Client;
using Com.RusticiSoftware.Cloud.V2.Model;
using System.Collections.Generic;

namespace Example
{
    public class Example
    {
        public void main()
        {
            // Configure HTTP basic authorization: APP_NORMAL
            Configuration.Default.Username = "SCORM_CLOUD_APP_ID";
            Configuration.Default.Password = "SECRET_KEY_FOR_APP_ID";

            // Then (optionally) further authenticate via Oauth2 token access
            ApplicationManagementApi applicationManagementApi = new ApplicationManagementApi();

            var permissions = new PermissionsSchema { Scopes = new List<string> { "read:registration" } };
            var expiry = DateTime.Now.AddMinutes(30);

            var tokenRequest = new TokenRequestSchema(permissions, expiry);
            StringResultSchema tokenResult = applicationManagementApi.CreateToken(tokenRequest);
            Configuration.Default.AccessToken = tokenResult.Result;

            // this call will now use Oauth2 with the "read:registration" scope
            // if configured.  otherwise the basic auth credentials will be used
            var apiInstance = new RegistrationApi();
            RegistrationListSchema regList = apiInstance.GetRegistrations();

            Console.WriteLine(regList);
        }
    }
}

Com.RusticiSoftware.Cloud.V2 - the C# library for the SCORM Cloud Rest API

REST API used for SCORM Cloud integrations.

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

<a name="frameworks-supported"></a>

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

<a name="dependencies"></a>

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

<a name="installation"></a>

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Com.RusticiSoftware.Cloud.V2.Api;
using Com.RusticiSoftware.Cloud.V2.Client;
using Com.RusticiSoftware.Cloud.V2.Model;

<a name="packaging"></a>

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Com.RusticiSoftware.Cloud.V2.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

<a name="getting-started"></a>

Getting Started

using System;
using Com.RusticiSoftware.Cloud.V2.Api;
using Com.RusticiSoftware.Cloud.V2.Client;
using Com.RusticiSoftware.Cloud.V2.Model;
using System.Collections.Generic;

namespace Example
{
    public class Example
    {
        public void main()
        {
            // Configure HTTP basic authorization: APP_NORMAL
            Configuration.Default.Username = "SCORM_CLOUD_APP_ID";
            Configuration.Default.Password = "SECRET_KEY_FOR_APP_ID";

            // Then (optionally) further authenticate via Oauth2 token access
            ApplicationManagementApi applicationManagementApi = new ApplicationManagementApi();

            var permissions = new PermissionsSchema { Scopes = new List<string> { "read:registration" } };
            var expiry = DateTime.Now.AddMinutes(30);

            var tokenRequest = new TokenRequestSchema(permissions, expiry);
            StringResultSchema tokenResult = applicationManagementApi.CreateToken(tokenRequest);
            Configuration.Default.AccessToken = tokenResult.Result;

            // this call will now use Oauth2 with the "read:registration" scope
            // if configured.  otherwise the basic auth credentials will be used
            var apiInstance = new RegistrationApi();
            RegistrationListSchema regList = apiInstance.GetRegistrations();

            Console.WriteLine(regList);
        }
    }
}

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 860 10/8/2019