Api session items functions: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 88: Line 88:
     "ROOF" : "sand"
     "ROOF" : "sand"
   },
   },
   "version" : 31
   "version" : 55
}, {
}, {
   "attributes" : {
   "attributes" : {
Line 161: Line 161:
   "constructionPeriods" : [ "POST_WAR" ],
   "constructionPeriods" : [ "POST_WAR" ],
   "decals" : {
   "decals" : {
    "EXTRA" : [ 10.0, 0.0, 1.0, 1.98, 2.0, 0.84, 0.0, 2.7, 1.98, 3.7, 0.84, 0.0, 8.2, 1.98, 9.2, 0.84 ],
     "TOP" : [ 10.0, 0.0, 1.0, 1.74, 2.0, 0.6, 0.0, 4.5, 1.74, 5.5, 0.6, 0.0, 6.2, 1.74, 7.2, 0.6 ],
     "TOP" : [ 10.0, 0.0, 1.0, 1.74, 2.0, 0.6, 0.0, 4.5, 1.74, 5.5, 0.6, 0.0, 6.2, 1.74, 7.2, 0.6 ],
     "ROOF" : [ ],
     "ROOF" : [ ],
     "GROUND" : [ 10.0, 1.0, 1.0, 1.98, 2.4, 0.0, 0.0, 3.3, 1.98, 4.3, 0.81, 0.0, 6.8, 1.98, 7.8, 0.81, 0.0, 8.5, 1.98, 9.5, 0.81 ]
     "GROUND" : [ 10.0, 1.0, 1.0, 1.98, 2.4, 0.0, 0.0, 3.3, 1.98, 4.3, 0.81, 0.0, 6.8, 1.98, 7.8, 0.81, 0.0, 8.5, 1.98, 9.5, 0.81 ],
    "EXTRA" : [ 10.0, 0.0, 1.0, 1.98, 2.0, 0.84, 0.0, 2.7, 1.98, 3.7, 0.84, 0.0, 8.2, 1.98, 9.2, 0.84 ]
   },
   },
   "defaults" : [ ],
   "defaults" : [ ],
Line 176: Line 176:
   "regions" : [ "NORTHWESTERN_EUROPE" ],
   "regions" : [ "NORTHWESTERN_EUROPE" ],
   "textures" : {
   "textures" : {
    "EXTRA" : "bricks",
     "TOP" : "bricks",
     "TOP" : "bricks",
     "ROOF" : "pane",
     "ROOF" : "pane",
     "GROUND" : "bricks"
     "GROUND" : "bricks",
    "EXTRA" : "bricks"
   },
   },
   "version" : 32
   "version" : 56
} ]</syntaxhighlight>
} ]</syntaxhighlight>
==Limit Queries==
==Limit Queries==
Line 206: Line 206:
ZIPSMILE:  
ZIPSMILE:  
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/items/functions/?f=ZIPSMILE&token=API_TOKEN</syntaxhighlight>
<syntaxhighlight lang="text" copy>https://engine.tygron.com/api/session/items/functions/?f=ZIPSMILE&token=API_TOKEN</syntaxhighlight>
==Api Model BaseFunction==
API Model description of BaseFunction
{|class=wikitable
!Name
!Type
!Description
|-
|attributes
|Map&lt;String,double[]&gt;
|
|-
|categories
|Category<nowiki>[]</nowiki>
|
|-
|constructionPeriods
|ConstructionPeriod<nowiki>[]</nowiki>
|
|-
|decals
|Map&lt;FaceType,float[]&gt;
|
|-
|defaults
|Type<nowiki>[]</nowiki>
|
|-
|description
|String
|
|-
|dimension
|int
|
|-
|id
|int
|
|-
|imageName
|String
|
|-
|modelSetID
|int
|[[Model Set]] ID
|-
|name
|String
|
|-
|placementType
|PlacementType
|
|-
|regions
|Region<nowiki>[]</nowiki>
|
|-
|textures
|Map&lt;FaceType,String&gt;
|
|-
|version
|int
|
|}
==Api Model DuplicateFunction==
API Model description of DuplicateFunction
{|class=wikitable
!Name
!Type
!Description
|-
|id
|int
|
|-
|orginalFunctionID
|int
|[[Function]] ID
|-
|version
|int
|
|}
==Api Model Function==
API Model description of Function
{|class=wikitable
!Name
!Type
!Description
|-
|id
|int
|
|-
|version
|int
|
|}
{{article end|seealso=*[[Api Content Items]]
{{article end|seealso=*[[Api Content Items]]
*[[Api session event editor]]
*[[Api session event editor]]

Revision as of 11:52, 20 April 2026

Api session items Function Endpoints.

Default Query:

https://engine.tygron.com/api/session/items/functions/?f=JSON&token=API_TOKEN

Example Response:

[ {
  "attributes" : {
    "DISTURBANCE_DISTANCE_M" : [ 0.0 ],
    "OTHER_CONSTRUCTION_COST_M2" : [ 4000.0 ],
    "BOWEN_RATIO" : [ 3.0 ],
    "NUM_PEDESTRIANS" : [ 0.0 ],
    "OTHER_SELL_PRICE_M2" : [ 5000.0 ],
    "OTHER_HEAT_FLOW_M2_CHANGE_PER_YEAR" : [ 0.0 ],
    "SLANTING_ROOF_HEIGHT" : [ 0.0 ],
    "ZONING_PERMIT_REQUIRED" : [ 0.0 ],
    "NUM_CARS" : [ 0.0 ],
    "GROUND_COLOR" : [ -4808597.0 ],
    "ALIGN_ELEVATION" : [ 2.0 ],
    "NUM_BICYCLES" : [ 0.0 ],
    "OTHER_PARKING_LOTS_PER_M2" : [ 0.0 ],
    "ROOF_COLOR" : [ -4808597.0 ],
    "SEWERED" : [ 0.0 ],
    "OTHER_HEAT_POWER_TO_FLOW_MULTIPLIER" : [ 0.0 ],
    "DRAINAGE" : [ 0.0 ],
    "JAM_FACTOR_CARS" : [ 0.0 ],
    "TRAFFIC_LANES" : [ 0.0 ],
    "LIVABILITY_EFFECT" : [ 0.0 ],
    "WATER_MANNING" : [ 0.025 ],
    "WATER_STORAGE_M2" : [ 0.0 ],
    "MONUMENTAL" : [ 0.0 ],
    "NUM_TRUCKS" : [ 0.0 ],
    "OTHER_BUYOUT_COST_M2" : [ 4000.0 ],
    "NUM_AIRPLANES" : [ 0.0 ],
    "GROUND_INFILTRATION_MD" : [ 0.0 ],
    "NUM_BUSES" : [ 0.0 ],
    "OTHER_UNIT_SIZE_M2" : [ 1.0 ],
    "NUM_VANS" : [ 0.0 ],
    "SOLID" : [ 0.0 ],
    "JAM_FACTOR_VANS" : [ 0.0 ],
    "HEIGHT_OFFSET_M" : [ 0.0 ],
    "WATER_TRANSPIRATION_FACTOR" : [ 0.0 ],
    "CRITICAL_INFRASTRUCTURE" : [ 1.0 ],
    "ROOT_DEPTH_M" : [ 0.0 ],
    "TRAFFIC_NOISE_SIGMA" : [ 0.0 ],
    "TRAFFIC_SPEED" : [ 0.0 ],
    "HEAT_EFFECT" : [ -6.0 ],
    "VEGETATION_FRACTION" : [ 0.0 ],
    "OTHER_HEAT_FLOW_M2_START_YEAR" : [ 0.0 ],
    "OTHER_DEMOLISH_COST_M2" : [ 250.0 ],
    "OTHER_HEAT_FLOW_M2_START_VALUE" : [ 0.0 ],
    "WATER_MICRORELIEF_M" : [ 0.0 ],
    "NUM_SHIPS" : [ 0.0 ],
    "MAX_FLOORS" : [ 1.0 ],
    "OTHER_CATEGORY_WEIGHT" : [ 1.0 ],
    "JAM_FACTOR_TRUCKS" : [ 0.0 ],
    "NUM_TRAINS" : [ 0.0 ],
    "OTHER_PARKING_LOTS_DEMAND_PER_M2" : [ 0.0 ],
    "DISTANCE_ZONE_M" : [ 0.0 ],
    "TRAFFIC_NOISE_TAU" : [ 0.0 ],
    "FOLIAGE_CROWN_FACTOR" : [ 0.0 ],
    "BASEMENT_COLOR" : [ -1.1776948E7 ],
    "DEFAULT_FLOORS" : [ 1.0 ],
    "EXTRA_COLOR" : [ -4808597.0 ],
    "SOLAR_PANELS" : [ 0.0 ],
    "TOP_COLOR" : [ -4808597.0 ],
    "JAM_FACTOR_BUSES" : [ 0.0 ],
    "NUM_TRAMS" : [ 0.0 ],
    "BASEMENT_HEIGHT_M" : [ 0.0 ],
    "PIPES_PERMITTED" : [ 0.0 ],
    "FLOOR_HEIGHT_M" : [ 0.0 ],
    "TERRAIN_MIX" : [ 0.8 ],
    "MIN_FLOORS" : [ 1.0 ],
    "SAFETY_DISTANCE_M" : [ 0.0 ]
  },
  "categories" : [ "OTHER" ],
  "constructionPeriods" : [ ],
  "decals" : null,
  "defaults" : [ ],
  "description" : "",
  "dimension" : -1,
  "id" : 0,
  "imageName" : "braak.png",
  "modelSetID" : 1,
  "name" : "Vacant Lot",
  "placementType" : "LAND",
  "regions" : [ "NORTHWESTERN_EUROPE" ],
  "textures" : {
    "ROOF" : "sand"
  },
  "version" : 55
}, {
  "attributes" : {
    "DISTURBANCE_DISTANCE_M" : [ 0.0 ],
    "BOWEN_RATIO" : [ 3.0 ],
    "NUM_PEDESTRIANS" : [ 0.0 ],
    "SLANTING_ROOF_HEIGHT" : [ 2.2 ],
    "NUM_CARS" : [ 0.0 ],
    "ZONING_PERMIT_REQUIRED" : [ 1.0 ],
    "GROUND_COLOR" : [ -1.0197916E7 ],
    "ALIGN_ELEVATION" : [ 0.0 ],
    "NUM_BICYCLES" : [ 0.0 ],
    "ROOF_COLOR" : [ -1.0599374E7 ],
    "SEWERED" : [ 1.0 ],
    "DRAINAGE" : [ 0.0 ],
    "JAM_FACTOR_CARS" : [ 0.0 ],
    "TRAFFIC_LANES" : [ 0.0 ],
    "LIVABILITY_EFFECT" : [ -5.0 ],
    "WATER_MANNING" : [ 0.013 ],
    "WATER_STORAGE_M2" : [ 0.0 ],
    "MONUMENTAL" : [ 0.0 ],
    "NUM_TRUCKS" : [ 0.0 ],
    "NUM_AIRPLANES" : [ 0.0 ],
    "SOCIAL_UNIT_SIZE_M2" : [ 80.0 ],
    "SOCIAL_PARKING_LOTS_PER_M2" : [ 0.0 ],
    "GROUND_INFILTRATION_MD" : [ 0.0 ],
    "NUM_BUSES" : [ 0.0 ],
    "NUM_VANS" : [ 0.0 ],
    "SOLID" : [ 1.0 ],
    "JAM_FACTOR_VANS" : [ 0.0 ],
    "HEIGHT_OFFSET_M" : [ 0.0 ],
    "WATER_TRANSPIRATION_FACTOR" : [ 0.0 ],
    "SOCIAL_CONSTRUCTION_COST_M2" : [ 2000.0 ],
    "CRITICAL_INFRASTRUCTURE" : [ 1.0 ],
    "ROOT_DEPTH_M" : [ 0.0 ],
    "TRAFFIC_NOISE_SIGMA" : [ 0.0 ],
    "TRAFFIC_SPEED" : [ 0.0 ],
    "HEAT_EFFECT" : [ 5.0 ],
    "SOCIAL_SELL_PRICE_M2" : [ 3000.0 ],
    "VEGETATION_FRACTION" : [ 0.0 ],
    "SOCIAL_CATEGORY_WEIGHT" : [ 1.0 ],
    "WATER_MICRORELIEF_M" : [ 0.0 ],
    "NUM_SHIPS" : [ 0.0 ],
    "SOCIAL_HEAT_FLOW_M2_CHANGE_PER_YEAR" : [ -1.26E-4 ],
    "MAX_FLOORS" : [ 3.0 ],
    "SOCIAL_HEAT_FLOW_M2_START_VALUE" : [ -0.315264 ],
    "JAM_FACTOR_TRUCKS" : [ 0.0 ],
    "SOCIAL_BUYOUT_COST_M2" : [ 2400.0 ],
    "NUM_TRAINS" : [ 0.0 ],
    "DISTANCE_ZONE_M" : [ 0.0 ],
    "TRAFFIC_NOISE_TAU" : [ 0.0 ],
    "FOLIAGE_CROWN_FACTOR" : [ 0.0 ],
    "BASEMENT_COLOR" : [ -1.1776948E7 ],
    "SOCIAL_PARKING_LOTS_DEMAND_PER_M2" : [ 0.029999999329447746 ],
    "DEFAULT_FLOORS" : [ 2.0 ],
    "EXTRA_COLOR" : [ -1.0197916E7 ],
    "SOCIAL_HEAT_POWER_TO_FLOW_MULTIPLIER" : [ 4.86 ],
    "SOLAR_PANELS" : [ 0.0 ],
    "TOP_COLOR" : [ -1.0197916E7 ],
    "JAM_FACTOR_BUSES" : [ 0.0 ],
    "NUM_TRAMS" : [ 0.0 ],
    "SOCIAL_HEAT_FLOW_M2_START_YEAR" : [ 1900.0 ],
    "BASEMENT_HEIGHT_M" : [ 2.0 ],
    "PIPES_PERMITTED" : [ 0.0 ],
    "FLOOR_HEIGHT_M" : [ 3.2 ],
    "TERRAIN_MIX" : [ 0.8 ],
    "MIN_FLOORS" : [ 1.0 ],
    "SOCIAL_DEMOLISH_COST_M2" : [ 150.0 ],
    "SAFETY_DISTANCE_M" : [ 0.0 ]
  },
  "categories" : [ "SOCIAL" ],
  "constructionPeriods" : [ "POST_WAR" ],
  "decals" : {
    "TOP" : [ 10.0, 0.0, 1.0, 1.74, 2.0, 0.6, 0.0, 4.5, 1.74, 5.5, 0.6, 0.0, 6.2, 1.74, 7.2, 0.6 ],
    "ROOF" : [ ],
    "GROUND" : [ 10.0, 1.0, 1.0, 1.98, 2.4, 0.0, 0.0, 3.3, 1.98, 4.3, 0.81, 0.0, 6.8, 1.98, 7.8, 0.81, 0.0, 8.5, 1.98, 9.5, 0.81 ],
    "EXTRA" : [ 10.0, 0.0, 1.0, 1.98, 2.0, 0.84, 0.0, 2.7, 1.98, 3.7, 0.84, 0.0, 8.2, 1.98, 9.2, 0.84 ]
  },
  "defaults" : [ ],
  "description" : "",
  "dimension" : -1,
  "id" : 1,
  "imageName" : "huisje7.png",
  "modelSetID" : 2,
  "name" : "Mid-Century affordable housing",
  "placementType" : "LAND",
  "regions" : [ "NORTHWESTERN_EUROPE" ],
  "textures" : {
    "TOP" : "bricks",
    "ROOF" : "pane",
    "GROUND" : "bricks",
    "EXTRA" : "bricks"
  },
  "version" : 56
} ]

Limit Queries

version=100:

https://engine.tygron.com/api/session/items/functions/?version=100&token=API_TOKEN

Show Queries

max version:

https://engine.tygron.com/api/session/items/functions/version/?token=API_TOKEN

size:

https://engine.tygron.com/api/session/items/functions/size/?token=API_TOKEN

Formats

HTML:

https://engine.tygron.com/api/session/items/functions/?f=HTML&token=API_TOKEN

JSON:

https://engine.tygron.com/api/session/items/functions/?f=JSON&token=API_TOKEN

CSV:

https://engine.tygron.com/api/session/items/functions/?f=CSV&token=API_TOKEN

SSV:

https://engine.tygron.com/api/session/items/functions/?f=SSV&token=API_TOKEN

SMILE:

https://engine.tygron.com/api/session/items/functions/?f=SMILE&token=API_TOKEN

ZIPJSON:

https://engine.tygron.com/api/session/items/functions/?f=ZIPJSON&token=API_TOKEN

ZIPSMILE:

https://engine.tygron.com/api/session/items/functions/?f=ZIPSMILE&token=API_TOKEN

Api Model BaseFunction

API Model description of BaseFunction

Name Type Description
attributes Map<String,double[]>
categories Category[]
constructionPeriods ConstructionPeriod[]
decals Map<FaceType,float[]>
defaults Type[]
description String
dimension int
id int
imageName String
modelSetID int Model Set ID
name String
placementType PlacementType
regions Region[]
textures Map<FaceType,String>
version int

Api Model DuplicateFunction

API Model description of DuplicateFunction

Name Type Description
id int
orginalFunctionID int Function ID
version int

Api Model Function

API Model description of Function

Name Type Description
id int
version int