2017 © Pedro Peláez
 

library api-client

StudentConnect API Client Library

image

studentconnect/api-client

StudentConnect API Client Library

  • Friday, August 4, 2017
  • by adrian7
  • Repository
  • 1 Watchers
  • 0 Stars
  • 161 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 4 % Grown

The README.md

StudentConnect API Client for PHP build status

This is the official PHP client for StudentConnect API, (*1)

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, (*2)

The Versions