Skip to main content

A Python wrapper for the Learncube API

Project description

!EXPERIMENTAL!

Learncube Python

Installation

Learncube-Python is available on PyPI:

  • $ pip install learncube

Usage

Virtual Classroom API

Note: For more information visit the Learncube documentation

Classrooms API

Prerequisites
from learncube import Classroom

public_key = "..."
private_key = "..."

v_c = Classroom(public_key=public_key, private_key=private_key)
List
response = v_c.list_virtual_classroom(room_token="...")
Create

Note: you can pass any information into the **kwargs`

data = {
    'room_token': randint(0, 100),
    'cancelled': False,
    'description': "This is a test",
    'start': datetime.now().isoformat(),
    'end': datetime.now().isoformat(),
    'max_participants': 2,
    'audio_only': False,
    'return_url': "",
    'record_class': False
}
response = v_c.create_virtual_classroom(
    room_token=data['room_token'],
    cancelled=data['cancelled'],
    description=data['description'],
    start=data['start'],
    end=data['end'],
    max_participants=data['max_participants'],
    audio_only=data['audio_only'],
    return_url=data['return_url'],
    record_class=data['record_class']
)
Read
response = v_c.read_virtual_classroom(uuid='...')
Update

Note: you can pass any information into the **kwargs

data = {
    'room_token': randint(0, 100),
    'cancelled': False,
    'description': "This is a test",
    'start': datetime.now().isoformat(),
    'end': datetime.now().isoformat(),
    'max_participants': 2,
    'audio_only': False,
    'return_url': "",
    'record_class': False
}

response = v_c.update_virtual_classroom(uuid=uuid,
                                        room_token=data['room_token'],
                                        cancelled=data['cancelled'],
                                        description=data['description'],
                                        start=data['start'],
                                        end=data['end'],
                                        max_participants=data['max_participants'],
                                        audio_only=data['audio_only'],
                                        return_url=data['return_url'],
                                        record_class=data['record_class']
                                        )
Delete
response = v_c.delete_virtual_classroom(uuid=uuid)

Participants API

Prerequisites
from learncube import Participants

public_key = "..."
private_key = "..."

p_c = Participants(public_key=public_key, private_key=private_key)
Read
response = p_c.read_participant(uuid='...')
List

Note: you can pass any information into the **kwargs

response = p_c.list_participants(room_token="...")

Logs API

Prerequisites
from learncube import Logs

public_key = "..."
private_key = "..."

logs = Logs(public_key=public_key, private_key=private_key)
Read
response = logs.read_logs(uuid='...')
List

Note: you can pass any information into the **kwargs

response = logs.list_logs(room_token="...")

Options

Using a custom api base path

Besides the public_key and private_key you can provide an api_base_path attribute, which will overwrite the default endpoint.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

learncube-0.1.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

learncube-0.1.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page