adlnet / xAPIWrapper

Wrapper to simplify communication to an LRS
https://adlnet.gov/projects/xapi/
Apache License 2.0
219 stars 114 forks source link

Why is there no ADL.activities object? #95

Closed brian-learningpool closed 7 years ago

brian-learningpool commented 7 years ago

Since ADL.verbs exists, I'm just wondering why ADL.activities (or activityTypes) doesn't?

I'm using the xAPIWrapper in a project I'm working on and was surprised that it wasn't there.

creighton commented 7 years ago

Thanks for bringing this up. I added verbs.js a few years ago as I found I kept looking for the verbs while I was using the wrapper. There is no reason activity types couldn't be added. I put it on the list of enhancements.

If you would like we would be willing to accept a pull request. Otherwise, we'll update this in a coming release.

brian-learningpool commented 7 years ago

Hi @creighton, thank you for the quick response. I only mentioned it because I find myself looking up the activity types in the same way. I'm happy to create a PR for this.

Is something like this ok, with a key-value object on the activity type and the IRI?

   ADL.activites = {
      "assessment" : "http://adlnet.gov/expapi/activities/assessment"
   };
creighton commented 7 years ago

Yep that looks great. Can you name it activityTypes?