O club que atende num endereço
curl --request GET \
--url https://api.weve.cx/v1/clubs/by-host/{host}import requests
url = "https://api.weve.cx/v1/clubs/by-host/{host}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.weve.cx/v1/clubs/by-host/{host}', 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/by-host/{host}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.weve.cx/v1/clubs/by-host/{host}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.weve.cx/v1/clubs/by-host/{host}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/by-host/{host}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"slug": "<string>",
"name": "<string>",
"accent_color": "#1d63d1"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Clubs
Club do endereço inteiro
A mesma vitrine da rota por slug, alcançada pelo host como o browser o vê — domínio próprio ou <slug>.weve.studio. Anônima, e o classroom deixa de saber qual é o caso.
GET
/
v1
/
clubs
/
by-host
/
{host}
O club que atende num endereço
curl --request GET \
--url https://api.weve.cx/v1/clubs/by-host/{host}import requests
url = "https://api.weve.cx/v1/clubs/by-host/{host}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.weve.cx/v1/clubs/by-host/{host}', 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/by-host/{host}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.weve.cx/v1/clubs/by-host/{host}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.weve.cx/v1/clubs/by-host/{host}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/by-host/{host}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"slug": "<string>",
"name": "<string>",
"accent_color": "#1d63d1"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Path Parameters
O endereço como chegou no browser, sem protocolo e sem porta
(cursos.escola.com.br, escola.weve.studio).
Maximum string length:
253Response
O club daquele endereço
O club como quem ainda não entrou o vê. Deliberadamente magro: nome e endereço, nada com que se possa agir.
Show child attributes
Show child attributes