2017 © Pedro Peláez
 

library learning-context-client

Simple Learning Context API Client

image

xelax90/learning-context-client

Simple Learning Context API Client

  • Saturday, January 23, 2016
  • by xelax90
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Learning Context Client

This is a PHP implementation for the Learning Context API, (*1)

Token Storage

To use this API, you have to implement a token storage which implements the LearningContextClient\Storage\StorageInterface. Storage clases using the $_SESSION array and Zend Session are already provided in LearningContextClient\Storage\SessionArrayStorage and LearningContextClient\Storage\ZendSessionStorage respectively., (*2)

Configuration

To run the Client, you have to create a LearningContextClient\Config object. It recieves your appId and appSecret, a callback URL which will be called after OAuth authorization and handles the refresh token and an instance of LearningContextClient\Storage\StorageInterface. It suffices to do any request to the API or to call the LearningContextClient:::getTokenManager function., (*3)

Usage

Create an instance of LearningContextClient\Client and provide it with your configuration to use the API., (*4)

$storage = new \LearningContextClient\Storage\SessionArrayStorage();
$config = new \LearningContextClient\Config($APP_ID, $APP_SECRET, $CALLBACK_URL, $storage);
$lc = new \LearningContextClient\Client($config);

Obtain token

To obtain a token, you simple have to call any API interface or you call the LearningContextClient::getTokenManager function., (*5)

The Versions

23/01 2016

dev-master

9999999-dev

Simple Learning Context API Client

  Sources   Download

BSD-2-Clause

The Requires

  • ext-curl *

 

by Aleksandr

23/01 2016

v0.1

0.1.0.0

Simple Learning Context API Client

  Sources   Download

BSD-2-Clause

The Requires

  • ext-curl *

 

by Aleksandr