Using review sessions
Client review sessions can either be queried manually or from a project.
- Python
- JavaScript
review_sessions = session.query(
'ReviewSession where name is "Weekly review"'
)
project = session.query(
'ReviewSession where name is "Episode one"'
)
project_review_sessions = project['review_sessions']
const reviewSessions = await session.query(
'select name from ReviewSession where name is "Weekly review"'
)
const projectReviewSessions = await session.query(
'select review_sessions from Project where name is "Episode one"'
)
To create a new review session on a specific project use
Session.create
.
- Python
- JavaScript
review_session = session.create('ReviewSession', {
'name': 'Weekly review',
'description': 'See updates from last week.',
'project': project
})
const reviewSession = await session.create('ReviewSession', {
'name': 'Weekly review',
'description': 'See updates from last week.',
'project_id': projectId
})
To add objects to a review session create them using Session.create
and reference a review session and an asset version.
- Python
- JavaScript
review_session_object = session.create('ReviewSessionObject', {
'name': 'Compositing',
'description': 'Fixed shadows.',
'version': 'Version 3',
'review_session': review_session,
'asset_version': asset_version
})
const reviewSessionObject = await session.create('ReviewSessionObject', {
'name': 'Compositing',
'description': 'Fixed shadows.',
'version': 'Version 3',
'review_session_id': reviewSessionId,
'version_id': versionId
})
To list all objects in a review session.
- Python
- JavaScript
review_session_objects = review_session['review_session_objects']
const reviewSessionObjects = await session.query(
'select review_session_objects from ReviewSession where name is "Weekly Review"'
)
Listing and adding collaborators to review session can be done using Session.create
and the [review_session_invitees] relation on a review session.
- Python
- JavaScript
invitee = session.create('ReviewSessionInvitee', {
'name': 'John Doe',
'email': 'john.doe@example.com',
'review_session': review_session
})
session.commit()
invitees = review_session['review_session_invitees']
await session.create('ReviewSessionInvitee', {
'name': 'John Doe',
'email': 'john.doe@example.com',
'review_session_id': reviewSessionId
})
const invitees = await session.query(
`select review_session_invitees from ReviewSession where id is ${reviewSessionId}`
)
To remove a collaborator delete the object using Session.delete
.
- Python
- JavaScript
session.delete(invitee)
await session.delete(
"ReviewSessionInvitee",
reviewSessionInviteeId
);
To send out an invite email to a single collaborator use Session.send_review_session_invite
in the Python API client, or call the send_review_session_invite
action in the JavaScript API client.
- Python
- JavaScript
session.send_review_session_invite(invitee)
await session.call([{
'action': 'send_review_session_invite',
'review_session_invitee_id': inviteeId
}])
Multiple invitees can have emails sent to them in one batch using Session.send_review_session_invites
. Using the JavaScript API you can add an array of calls for the invite action.
- Python
- JavaScript
session.send_review_session_invites(a_list_of_invitees)
await session.call([{
'action': 'send_review_session_invite',
'review_session_invitee_id': inviteeId1
},
{
'action': 'send_review_session_invite',
'review_session_invitee_id': inviteeId2
}])