Skip to content

Jumpstart your integration of the Learnosity APIs into your learning platform.

License

Notifications You must be signed in to change notification settings

viskri/learnosity-demos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learnosity API Demos

Jumpstart your integration of the Learnosity APIs into your learning platform.

Overview

This repository has been designed to allow users to quickly view and interact with some of the core Learnosity APIs.

Each page shows a basic integration to a specific Learnosity API which you can utilise and learn from.

There is also a SignatureUtils class which simplifies the generation of the security signatures for each of the types.

Getting Started - Native

  • Download the package
  • git clone --recursive https://github.com/Learnosity/learnosity-demos.git (make sure you have set up an SSH key in GitHub when you do the clone as the PHP SDK will not clone properly through HTTPS. Instructions here)
  • Put in a web accessible directory ^
  • Test it out by browsing to index.php

^ Note that you must use localhost as the domain (not 127.0.0.1), any port is fine but the internal security in some of the APIs is domain restricted. So until you contact Learnosity to whitelist specific domains, access is restricted to localhost.

If you have PHP 5.4+ you can use the local server to quickly get up and running, no Apache/IIS is required.

cd learnosity-demos/www
php -S localhost:5000

Visit localhost:5000 in a browser.

Getting Started - Using Vagrant

Vagrant is a wrapper for controlling Virtual Machines in a controlled and isolated manner. Vagrant supports all the major platforms and is simple to use and very handy for other development tasks (if you're not already using it!). Vagrant by default supports VirtualBox as it's VM host, but it does support others like VMWare, Parallels, and even AWS EC2.

The included Vagrantfile will download a VM image and install all the needed PHP dependancies. Once the VM is running the demos can be used (and modified) without you needing to install anything else.

In order to use Vagrant you need to have installed:

Once these are installed using this demo is as easy as :

git clone --recursive https://github.com/Learnosity/learnosity-demos.git
cd learnosity-demos
vagrant up

Then opening your browser to localhost:8080. You can modify files and have the results served by the VM instantly.

To control the VM you can do one of the following :

  • Stop the VM: vagrant halt
  • Start the VM: vagrant up
  • Destroy the VM: vagrant destroy

Consumer

This package comes with demo security (consumer) credentials. If you have your own consumer details (as provided by Learnosity) you may use them by editing config.php

Requirements

  • PHP 5.3+
  • You must be connected to the internet to use this site

Documentation

More API documentation is available at the Learnosity Docs site

About

Jumpstart your integration of the Learnosity APIs into your learning platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 94.7%
  • CSS 3.2%
  • JavaScript 2.1%