Your seat's state and every move since `since`, each with its public events - for clients that draw the board.
curl --request GET \
--url https://www.smashandclash.in/api/v1/games/{id}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.smashandclash.in/api/v1/games/{id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.smashandclash.in/api/v1/games/{id}/sync', 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://www.smashandclash.in/api/v1/games/{id}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://www.smashandclash.in/api/v1/games/{id}/sync"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.smashandclash.in/api/v1/games/{id}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.smashandclash.in/api/v1/games/{id}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"status": 123,
"error": "<string>",
"code": "bad_request",
"hint": "<string>",
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"docs": "<string>"
}games
Your seat's state and every move since `since`, each with its public events - for clients that draw the board.
For a client that draws the board itself (the browser match): the state as your seat sees it - your hand, the board, the special tiles, and only COUNTS for the other hand and the draw pile - plus every move from since with its events and the state after it. With timeout it waits until something changes past since/status. A finished game adds reveal (its seed) and replayUrl.
GET
/
games
/
{id}
/
sync
Your seat's state and every move since `since`, each with its public events - for clients that draw the board.
curl --request GET \
--url https://www.smashandclash.in/api/v1/games/{id}/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.smashandclash.in/api/v1/games/{id}/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.smashandclash.in/api/v1/games/{id}/sync', 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://www.smashandclash.in/api/v1/games/{id}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://www.smashandclash.in/api/v1/games/{id}/sync"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.smashandclash.in/api/v1/games/{id}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.smashandclash.in/api/v1/games/{id}/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"status": 123,
"error": "<string>",
"code": "bad_request",
"hint": "<string>",
"type": "<string>",
"title": "<string>",
"detail": "<string>",
"docs": "<string>"
}Authorizations
The secret player token a seat gets when it starts or joins a game (pt_...). Only for /games moves.
Path Parameters
Query Parameters
Required range:
x >= 0Required range:
0 <= x <= 20Response
The seat sync.
The response is of type object.