curl --request PUT \
--url https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clarity": 3,
"punctuality": 3,
"knowledge": 3,
"empathy": 3,
"comment": "<string>"
}
'import requests
url = "https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating"
payload = {
"clarity": 3,
"punctuality": 3,
"knowledge": 3,
"empathy": 3,
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clarity: 3, punctuality: 3, knowledge: 3, empathy: 3, comment: '<string>'})
};
fetch('https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clarity' => 3,
'punctuality' => 3,
'knowledge' => 3,
'empathy' => 3,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating"
payload := strings.NewReader("{\n \"clarity\": 3,\n \"punctuality\": 3,\n \"knowledge\": 3,\n \"empathy\": 3,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clarity\": 3,\n \"punctuality\": 3,\n \"knowledge\": 3,\n \"empathy\": 3,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clarity\": 3,\n \"punctuality\": 3,\n \"knowledge\": 3,\n \"empathy\": 3,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"format": "individual",
"status": "upcoming",
"attendance": "booked",
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"mentor_name": "<string>",
"meeting": "room",
"capacity": 123,
"attendees_count": 123,
"rated": true,
"can_cancel": true,
"cancel_consumes_credit": true,
"title": "<string>",
"meeting_url": "<string>",
"room_opens_at": "2023-11-07T05:31:56Z",
"room_closes_at": "2023-11-07T05:31:56Z",
"recorded": true,
"summary": "<string>",
"agenda": "<string>",
"files": [
{
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"kind": "video",
"ready": true,
"playback": {
"kind": "video",
"provider": "bunny_stream",
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"signed": true,
"thumbnail_url": "<string>",
"duration_seconds": 123,
"title": "<string>"
}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Avaliar sessão
Uma vez, depois do fim, por quem esteve lá.
curl --request PUT \
--url https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clarity": 3,
"punctuality": 3,
"knowledge": 3,
"empathy": 3,
"comment": "<string>"
}
'import requests
url = "https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating"
payload = {
"clarity": 3,
"punctuality": 3,
"knowledge": 3,
"empathy": 3,
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clarity: 3, punctuality: 3, knowledge: 3, empathy: 3, comment: '<string>'})
};
fetch('https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clarity' => 3,
'punctuality' => 3,
'knowledge' => 3,
'empathy' => 3,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating"
payload := strings.NewReader("{\n \"clarity\": 3,\n \"punctuality\": 3,\n \"knowledge\": 3,\n \"empathy\": 3,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clarity\": 3,\n \"punctuality\": 3,\n \"knowledge\": 3,\n \"empathy\": 3,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/{clubId}/classroom/mentorships/{publicId}/sessions/{sessionId}/rating")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clarity\": 3,\n \"punctuality\": 3,\n \"knowledge\": 3,\n \"empathy\": 3,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"format": "individual",
"status": "upcoming",
"attendance": "booked",
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"mentor_name": "<string>",
"meeting": "room",
"capacity": 123,
"attendees_count": 123,
"rated": true,
"can_cancel": true,
"cancel_consumes_credit": true,
"title": "<string>",
"meeting_url": "<string>",
"room_opens_at": "2023-11-07T05:31:56Z",
"room_closes_at": "2023-11-07T05:31:56Z",
"recorded": true,
"summary": "<string>",
"agenda": "<string>",
"files": [
{
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"kind": "video",
"ready": true,
"playback": {
"kind": "video",
"provider": "bunny_stream",
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"signed": true,
"thumbnail_url": "<string>",
"duration_seconds": 123,
"title": "<string>"
}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Token OPACO de sessão de aluno, emitido por /v1/auth/sign-in e
verificado contra a nossa tabela — não é JWT e não se lê nada dele.
A ida ao banco não é custo novo: toda requisição autenticada já resolve o dono da sessão. Em troca, encerrar uma sessão vale no mesmo instante, sem lista de bloqueio nem janela de tolerância.
O classroom o guarda em cookie host-only: um cookie de domínio o mandaria para os subdomínios dos outros clubs.
Path Parameters
Id público da organização — o mesmo que GET /v1/me devolve em
organization_id.
Na URL o recurso se chama club; no contrato e no domínio, organization.
A divergência é deliberada: clubs é a palavra do produto, e a URL é o que
as pessoas leem.
É o identificador do provedor de autenticação, e é assim de propósito: o cliente precisa nomear a organização ao pedir o token, e o token é o que prova o escopo. Um id só nosso obrigaria a traduzir um no outro antes de ter um token — e a tradução exigiria uma chamada escopada, que é justamente a que ainda não dá para fazer.
O uuid interno da organização não aparece no contrato: ele é o que as chaves estrangeiras do domínio referenciam, e continua sendo nosso.
A chave curta da URL do classroom.
1 - 32Body
Comunicação clara e objetiva durante a sessão.
1 <= x <= 5Pontualidade e respeito ao tempo agendado.
1 <= x <= 5Domínio do assunto e capacidade de ensinar.
1 <= x <= 5Capacidade de entender e se conectar com quem é mentorado.
1 <= x <= 52000Response
A sessão
Show child attributes
Show child attributes