studentconnect/api-client

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
This package is abandoned and no longer maintained. No replacement package was suggested.

StudentConnect API Client Library

v0.9 2017-02-14 15:44 UTC

This package is not auto-updated.

Last update: 2020-01-22 02:03:59 UTC


README

This is the official PHP client for StudentConnect API

Installation

composer require studentconnect/api-client

Example code

<?php 

use StudentConnect\API\Client\Client;
use StudentConnect\API\Client\Exceptions\ClientException;

try{

    $Client = new Client('https://api.endpoint', '{app_key}', '{app_secret}');
    $Client->authorize();
    
    $uri = $Client->tokenizeURI( $Client->generateSignInURI() );
    
    echo ( '<a href="'. $uri .'">Sign In with StudentConnect &rarr;</a>' );

}
catch(ClientException $e){
    throw new App\ApplicationException( $e->getMessage(), $e->getStatus(), $e );
}

Quickstart

If you have a web server at hand, just set the host's root to /quickstart/web.php and check the guide.
Documentation can be found here: docs.studentconnectapi.com