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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file learncube-0.1.0.tar.gz.
File metadata
- Download URL: learncube-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcc2d92d803d1f6fd75f570f79c8bd6e218dab2822ed0c84bab2a009422e82b6
|
|
| MD5 |
9e9b56aad35810684046ed921e043544
|
|
| BLAKE2b-256 |
7e486f3221c67d63ca42ed561c0195a6c38a2847676e51c9c7d22f405da5dcaa
|
File details
Details for the file learncube-0.1.0-py3-none-any.whl.
File metadata
- Download URL: learncube-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf2720e7f7e21fbb3fde823885dced4b2d87d65df4c2117aaa8817ab93a43a5e
|
|
| MD5 |
e818b5d46f1201c65416c009eb1354ea
|
|
| BLAKE2b-256 |
95f3a0eae551c9336d635b5a6edb493670c58bc391a48ecee991c300e6343305
|