This page is a translation of the Japanese version. The Japanese version is authoritative; if they differ, follow the Japanese version.
焼いたモデルを投稿する
POST
/api/v1/models
const url = 'https://spritestack.dev/api/v1/models';const form = new FormData();form.append('file', 'file');form.append('titleJa', 'example');form.append('titleEn', 'example');form.append('description', 'example');form.append('tags', '["car","coach"]');form.append('derivedFrom', 'example');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://spritestack.dev/api/v1/models \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form titleJa=example \ --form titleEn=example \ --form description=example \ --form 'tags=["car","coach"]' \ --form derivedFrom=exampleAuthorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
file
required
焼いたモデル。最大 16777216 バイト。ファイル内の作者名と使用許諾が必要。
string format: binary
titleJa
日本語名。titleJa と titleEn が両方空なら、ファイルの name にひらがな・カタカナ・漢字があれば日本語名、無ければ英語名にする。
string
titleEn
英語名。
string
description
string
tags
JSON 配列を文字列にしたもの。最大 20 個、各 40 字。
string
Example
["car","coach"]derivedFrom
string
Responses
Section titled “Responses”投稿したモデル
Media typeapplication/json
object
id
required
string
pageUrl
required
string format: uri
apiUrl
required
string format: uri
Example generated
{ "id": "example", "pageUrl": "https://example.com", "apiUrl": "https://example.com"}入力の形が不正
Media typeapplication/json
object
Example generated
{}認証が必要(鍵が無い・正しくない・取り消された)
Media typeapplication/json
object
Example generated
{}所有者ではない、または運営者に止められた会員
Media typeapplication/json
object
Example generated
{}公開モデルが見つからない
Media typeapplication/json
object
Example generated
{}容量の上限を超えた
Media typeapplication/json
object
Example generated
{}モデルまたは参照先が不正
Media typeapplication/json
object
Example generated
{}1 人が 24 時間に上げられる数を超えた(upload_limit)
Media typeapplication/json
object
Example generated
{}