すべての文字列は UTF-8 エンコーディングです。
すべてのレスポンスは JSON 形式です。
key | 説明 |
---|---|
url_hash | URLのハッシュキー |
{
"result": "OK" || "error",
"image_url": "http://xxxxxxxxx.com/#{theta_uploaded_url}.png", // THETAからアップロードされた画像
"data": {
"theta_id": 1,
"type_id": 1, // 1=画像, 2=色
"image_id": 1, // 画像ID
"shape_id": 1, // 1固定
"pos": [
{
"color": "#ff00ee",
"y": 100,
"x": 100,
"z": 100
},
{
"color": "#ff00ee",
"y": 200,
"x": 200,
"z": 200
},
{
"color": "#ff00ee",
"y": 300,
"x": 300,
"z": 300
}
]
},
"meta": {
"requested": 1377003045,
"exec_time": 0.089531
}
}
JavascriptオブジェクトをJSONエンコードしWebsocketでパラメータを渡します
{
"theta_id": 1,
"type_id": 1, // 1=画像, 2=色
"image_id": 1, // 画像ID
"shape_id": 1, // 1固定
"pos": [
{
"color": "#ff00ee",
"y": 100,
"x": 100,
"z": 100
},
{
"color": "#ff00ee",
"y": 200,
"x": 200,
"z": 200
},
{
"color": "#ff00ee",
"y": 300,
"x": 300,
"z": 300
}
]
}
{
"result": "OK" || "error",
"data": {
"url_hash": "xxxxxxxx",
},
"meta": {
"requested": 1377003045,
"exec_time": 0.089531
}
}
キー | 型 | 例 |
---|---|---|
id | integer | |
url_hash | string | http://xxxxxxxxx.com/#{url_hash} |
image_url | string | http://xxxxxxxxx.com/#{theta_uploaded_url}.png |
キー | 型 | 例 |
---|---|---|
theta_id | references | シータ画面ID |
type_id | references | 1=画像、 2=色 |
image_id | references | ヒヨコ画像ID |
shape_id | reference | シェイプID(とりあえず1固定) |
pos | text | 座標リスト JSON? |
キー | 型 | 例 |
---|---|---|
id | integer | ID |
url | text | http://xxxxxxxxxx/yyy.png |