Giter Site home page Giter Site logo

scormcloud-api-v2-client-net's People

Contributors

brianrogers avatar cojohnson1999 avatar dillgromble avatar fishhooks avatar mjschuetze102 avatar tedwards avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scormcloud-api-v2-client-net's Issues

Exception when trying to run the sample

We're looking into using ScormCloud as our Scorm solution for our education center. Our software has recently been updated to .Net 5.0.

When trying to run tests to see if and scormcloud is compatible I already end up running into problems with the sample on the main page.

Specifically the line:

StringResultSchema tokenResult = applicationManagementApi.CreateToken(tokenRequest);

Throws the following exception:

System.MissingMethodException: 'Method not found: 'RestSharp.IRestRequest RestSharp.RestRequest.AddFile(System.String, System.Action`1<System.IO.Stream>, System.String, System.String)'.'

System.Text.Json support

Hello,

Is there any plan to switch to System.Text.Json as the underlying serlialization/deserialization library?
Or at least have an options to choose between them?

Marcin

ParameterToFile throwing System.OutOfMemoryException

Hi all,

We are having an issue where attempts to upload a 300mb Scorm File via CreateUploadAndImportCourseJob is resulting in an OutOfMemoryException. We don't want to increase the available memory to 4gb, would it be possible for you to update this library so that it doesn't use so much memory handling large files? Do you have any recommendations on what we should do? Below is the results of our investigation...

Below is a screenshot of the exception call stack
image

Previously when we were using the V1 package, we did not have this issue, however when we upgraded to the V2 package it started happening.

Testing Locally everything is ok because my computer has enough memory and I don't have restrictions on Visual Studio's usage of it (you can see in this screenshot the Process Memory is climbing to nearly 4gb), but in production the available memory has a limit of 1gb, so we're getting the exception...
image

Looking at the implementation of ParameterToFile,

        public FileParameter ParameterToFile(string name, Stream stream)
        {
            if (stream is FileStream)
                return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name));
            else
                return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided");
        }

currently seems that this implementation of Create is being used, public static FileParameter Create(string name, byte[] data, string filename, string? contentType = null, FileParameterOptions? options = null), if this other overload is used public static FileParameter Create(string name, Func<Stream> getFile, string fileName, string? contentType = null, FileParameterOptions? options = null) it might be less memory intensive?

Thanks for your time, hopefully I've included all the relevant information and it's clear! Please reach out if any confusion
Cheers!

Tagging @raymondht and @chezka-arevalo cause they are also following this 🙏

RestSharp v107

RestSharp did another major update and i'm guessing this is breaking the ScormCloud NuGet package

System.TypeInitializationException: The type initializer for 'Com.RusticiSoftware.Cloud.V2.Client.Configuration' threw an exception.
---> System.MissingMethodException: Method not found: 'Void RestSharp.RestClient.set_BaseUrl(System.Uri)'.
at Com.RusticiSoftware.Cloud.V2.Client.Configuration.set_BasePath(String value)
at Com.RusticiSoftware.Cloud.V2.Client.Configuration..ctor()
at Com.RusticiSoftware.Cloud.V2.Client.GlobalConfiguration..ctor()
at Com.RusticiSoftware.Cloud.V2.Client.Configuration..cctor()

System.Net.Http Security Risks

Hi team,

Do you have any plan upgrading System.Net.Http in your package? Our system detects multiple security risks introduced by the version
4.3.0 of the System.Net.Http through your package.

image

Looking forward to hearing from you.

How to get/read MessageSchema response?

Is there a way to get/read the MessageSchema response from calls? For example, putLearnerTags according to the Scorm Cloud APIv2 documentation should return JSON w/MessageSchema result but in this .NET library PutLearnerTags returns void. Thank you in advance!

LearnerApi apiInstance = new LearnerApi();
apiInstance = new LearnerApi();
apiInstance.PutLearnerTags(userEmail, tagsForUser);

Does PutRegistrationTags() append tags or overwrite all existing tags?

It appears that PutRegistrationTags() may be doing a smart append vs a full replace even though the API v2 docs that "any tags currently on this registration will be overwritten with the new array of tags.". Can you confirm? FWIW I prefer this over a "full overwrite" since the latter would require multiple API calls to get, then set.

My code:
apiInstance = new RegistrationApi();
TagListSchema newTags = new TagListSchema();
newTags.tags = new string[] { "tag_NEW" };
apiInstance.PutRegistrationTags(myRegId, myTagListSchema);

Tags before above code: "tag1","tag2"

Tags after above code: "tag1","tag2","tag_NEW"

According to the API v2 docs the above code should result in: "tag_NEW"

BTW - It seems PutCourseTags() is behaving this way as well.

Best practice initialization examples/suggestions for APIv2?

Hey, guys.

Previously, with APIv1, I would initialize things via something like the below code. However w/the APIv2 there seem to be more "init" things going on which may just require more lines of code per call (for permission schema, token generation etc). I will be trying to figure out the best way on my own as I go but if anyone has any examples or best-practice suggestions on how to initialize the APIv2 library before each call please let me know or point me to them. Thank you in advance.

// Base init stuff
ScormCloud.Configuration = new RusticiSoftware.HostedEngine.Client.Configuration(
scormCloudURL,
scormCloudAppID,
scormSecurityKey,
scormCloudOrigin);

// My API method call(s)
ScormCloud.DebugService.CloudPing();

APIv2 error/conflict with the new SCORM Cloud TLS setting?

Hey there. So I've been trying to finish getting our site moved over to the APIv2 stuff using this library with our .NET site. I had everything mapped over and working and was just about to prepare to move the changes to our production environment but today I encountered this error (when calling PingAppIdWithHttpInfo() or any other APIv2 method):
The request was aborted: Could not create SSL/TLS secure channel.

At first I thought maybe I had fudged up something (still possible) but after speaking w/tech support guys at Rustici (they are awesome btw) I learned that they just rolled their planned TLS setting changes yesterday:
We rolled out long overdue updates to our TLS settings for SCORM Cloud yesterday morning.

While it's still possible the issue lies somewhere on my end I do think it's somewhat possible (likely?) that this library on github is not working with the new TLS setting change at SCORM Cloud. I conclude this because:

  • My production site - which uses the APIv1 library - is working fine as of today even after the new SCORM Cloud TLS change
  • My test site - which uses the APIv2 library AND which was working fine last week - is no longer working (i.e. throwing the SSL/TLS error)

I am going to try to find the issue myself but admittedly I am not super familiar w/all the moving parts of this APIv2 library so I'm not sure how fast/successful I'll be at finding it. Could someone weigh in on this and let me know if there is indeed a possible issue w/the APIv2 library and the new TLS setting - or if not if anyone has any other theories on my things have all of a sudden stopped working for me in my test environment using the APIv2?.

Thank you.

Initialization with Multiple App Ids

Hi all,

Similar question to: #6

Previously when we were using https://github.com/RusticiSoftware/SCORMCloud_NetLibrary, to deal with multiple app ids it was recommended we new up the Configuration to pass to a new instance of ScormEngineService every time.

Configuration cfg =
    new RusticiSoftware.HostedEngine.Client.Configuration(
        "https://cloud.scorm.com/EngineWebServices",
        "your app id",
        "your secret key",
        "your origin string");

ScormEngineService service = new ScormEngineService(cfg);

Is the guidance on dealing with Multiple App Ids still the same? That is, newing up a Configuration class every time and passing that to a new instance of CourseApi?
I get that we can now configure the values at startup but given we have multiple app Ids if I want to configure it with every new request to our service, what's the best practice / recommendations for this?

Thanks for your time hopefully my question is clear.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.