dev-master
9999999-dev https://github.com/elliotboney/thinkific-phpPHP SDK for interacting with the Thinktastic LMS Api
MIT
The Requires
- php >=5.5.0
- guzzlehttp/guzzle ^6.0
by Elliot Boney
lms thinkific
Wallogit.com
2017 © Pedro Peláez
PHP SDK for interacting with the Thinktastic LMS Api
This is under heavy construction and in early alpha stages. It is an sdk to help interact with the Thinkific LMS API. The documentation for that REST Api can be found here., (*2)
During your development, you can keep up with the latest changes on the master branch by setting the version
requirement for thinkific-api to dev-master, (*3)
{
"require": {
"elliotboney/thinkific-php": "dev-master"
}
}
composer require elliotboney/thinkific-php
Create a client for interacting with the API:, (*4)
$think = new \Thinkific\Thinkific ( [ 'apikey' => 'your-api-key', 'subdomain' => 'yoursubdomain', 'debug' => true ] );
You can reach the following endpoints: - Bundles - Collections - Coupons - Course reviews - Courses - Enrollments - Orders - Products - Promotions - Users, (*5)
by using the following scheme:, (*6)
// Create interface to access Users endpoint $users = $think->users(); // Create interface to access Bundles endpoint $bundles = $think->bundles(); // etc, etc
The classes have the basic requests for GET, PUT, POST, DELETE with the Id parameter as well a getAll.
If the endpoint doesn't support the call, an ApiException() will be thrown.
Some examples of accessing these endpoints:, (*7)
// Get all users
$users = $users->getAll();
// Get a specific user
$users->getById(1234);
// Add a user
$users->add([
"first_name" => "John",
"last_name" => "Doe",
"email"=>"johndoe@example.com",
"roles"=>[]
]);
// Update a user
$users->update( 1234, [
"first_name" => "John",
"last_name" => "Doe",
"email"=>"johndoe@example.com",
"roles"=>[]
]);
// Delete a user
$users->delete( 1234);
For more details of which endpoints support which, please make sure you look through the Thinkific API Docs., (*8)
PHP SDK for interacting with the Thinktastic LMS Api
MIT
lms thinkific