Download the PHP package longhornopen/canvas-api without Composer
On this page you can find all versions of the php package longhornopen/canvas-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download longhornopen/canvas-api
More information about longhornopen/canvas-api
Files in longhornopen/canvas-api
Download longhornopen/canvas-api
More information about longhornopen/canvas-api
Files in longhornopen/canvas-api
Vendor longhornopen
Package canvas-api
Short Description PHP client for the Canvas API
License GPL-3.0-or-later
Package canvas-api
Short Description PHP client for the Canvas API
License GPL-3.0-or-later
Please rate this library. Is it a good library?
Informations about the package canvas-api
php-canvas-api
PHP library for talking to Instructure's Canvas via its API.
Composer installation
composer require longhornopen/canvas-api
Usage examples
use LonghornOpen\CanvasApi\CanvasApiClient;
$api_host = 'myschool.instructure.com';
$access_key = '1234567890abcdef....';
$api = new CanvasApiClient($api_host, $access_key);
// Some API calls return a single object, which will be given as a stdClass.
$me = $api->get('/users/self');
echo($me->name);
// Some API calls return lists, which will be given as PHP7 Iterators.
// If there are multiple pages of results, the iterator will automatically fetch them.
$my_courses = $api->get('/courses?per_page=100');
foreach ($my_courses as $my_course) {
echo($my_course->name);
}
// Some API calls (e.g. Enrollment Terms) return lists which are wrapped in a wrapper element, which you can provide:
$terms = $api->get('/accounts/1/terms', 'enrollment_terms');
Version history
- 1.0 - public release
All versions of canvas-api with dependencies
PHP Build Version
Package Version
The package longhornopen/canvas-api contains the following files
Loading the files please wait ....