PHP code example of fgubert / memberkit-php-sdk

1. Go to this page and download the library: Download fgubert/memberkit-php-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fgubert / memberkit-php-sdk example snippets



= new MemberKit\Client('SUA_CHAVE_DE_API');


$test = $mk->membership_levels();


$test = $mk->classrooms();


$test = $mk->rankings($classrom_id);


$test = $mk->user_ranking($user_id);


$test = $mk->user_activities($email);


$test = $mk->courses();


$test = $mk->course($course_id);


$test = $mk->lesson($course_id, $lesson_id);


$test = $mk->token($email);


$test = $mk->newUser($full_name, $email, $status='active', $blocked=false, $classroom_ids=array(), $unlimited=false, $membership_level_id=null, $expires_at=null);


$test = $mk->scores($user_email, $reason, $value, $course_id);


$test = $mk->delete_scores($user_email, $reason, $course_id);


$test = $mk->delete_lesson_statuses($user_email, $course_id);