Api session event editor building set decals: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
API Endpoint to Set Decals.
API Endpoint: editorbuilding/set_decals.


API Endpoint name is Api session event editor building set decals
API Endpoint name is Api session event editor building set decals.
 
Use this endpoint to Set Decals


{|class=wikitable
{|class=wikitable
Line 40: Line 42:
|}
|}
===Example POST===
===Example POST===
Curl Example POST:
Curl example POST:


<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorbuilding/set_decals/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "BASEMENT", "" ]'
<syntaxhighlight lang="text" copy>curl 'https://engine.tygron.com/api/session/event/editorbuilding/set_decals/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "BASEMENT", "" ]'
</syntaxhighlight>
</syntaxhighlight>
JavaScript Example POST:
JavaScript example POST:


<syntaxhighlight lang="text" copy>var options = {
<syntaxhighlight lang="text" copy>var options = {
Line 57: Line 59:
</syntaxhighlight>
</syntaxhighlight>
{{article end|seealso=*[[Api session event editor building]]
{{article end|seealso=*[[Api session event editor building]]
*[[Api session items buildings]]
}}
}}


[[Category:API]]
[[Category:API]]

Revision as of 11:22, 10 April 2026

API Endpoint: editorbuilding/set_decals.

API Endpoint name is Api session event editor building set decals.

Use this endpoint to Set Decals

Name Importance Type Description Values
0 REQUIRED (BUILDING Integer ID) Building
1 REQUIRED (Enumeration) FaceType BASEMENT, EXTRA, GROUND, ROOF or TOP
2 OPTIONAL (Floating point number or multiple values in array [1.0, 2.0, 3.0]) float[]

Response Codes

Response Code: Description
204 No Content
300-600 Codes Overview

Example POST

Curl example POST:

curl 'https://engine.tygron.com/api/session/event/editorbuilding/set_decals/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, "BASEMENT", "" ]'

JavaScript example POST:

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, "BASEMENT", "" ]'
};
fetch("https://engine.tygron.com/api/session/event/editorbuilding/set_decals/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));