🔎Oturum Detay
Bu alan, herhangi bir oturumunuzun detayını PerculusAPI ile nasıl çekebileceğinizi gösterir.
Aşağıdaki alanda oturum detayını nasıl çekebileceğinizi gösteren örnek kod bloğunu görebilirsiniz:
curl --location 'https://<DOMAIN>/xapi/session/<SESSION_ID>' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data ''
İlk olarak Python SDK'sı yüklenmelidir:
pip install perculus-sdk
SDK'nın yüklendiğinden emin olunduktan sonra aşağıdaki şekilde oturumlarınızı listeleyebilirsiniz:
from perculus_sdk.client import APIClient
# API client
client = APIClient()
# Set your domain (if you haven't set it before)
client.set_domain("<DOMAIN>")
# Set your credentials(if you haven't set it before)
client.set_credentials(
access_key="<EMAIL>",
secret_key="<PASSWORD>",
account_id="<ACCOUNT_ID>"
)
#List sessions
session = client.sessions.get_session("<SESSION_ID>")
print(session)
// ASAP :)
// ASAP :)
// ASAP :)
İstek sonrasında aşağıdaki örnek response modelini görebilirsiniz:
{
"session_id": "<SESSION_ID>",
"name": "test session",
"description": "",
"tags": "",
"start_date": "2024-09-25T14:00:25.699+03:00",
"timezone": "Europe/Istanbul",
"duration": 10,
"lang": "tr-TR",
"status": 1,
"replay_status": 0,
"options": {
"allow_rating": true,
"preparation_time": 15,
"session_duration": 60,
"chat": {
"offMessageModule": false,
"offGeneralMsging": false,
"offGeneralMsgLimitForUser": false,
"offSpecialMsging": false,
"offSpecialMsgToAdmin": false,
"offSpecialMsgToUser": false,
"offNewMsgSound": false,
"offClearForReplay": false,
"onNewMsgSoundInAll": false,
"onNewMsgNotifyInAll": false
},
"duration": {
"allowExtendTime": true,
"useRemainingTime": false
},
"allow_users_stream_self_cam_mic": true,
"hide_user_streams": false,
"enable_attendance_check": false,
"enable_simultaneous_interpretation": false,
"enable_simultaneous_interpretation_for_users": false,
"start_active": false,
"return_url": ""
},
"creation_date": "2024-08-08T10:05:58.663361+00:00",
"updating_date": null
}
Last updated