mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
e5063769f7
commit_hash:ec81d67275138150c1bc92e6c2b1009ee71935c4
526 lines
13 KiB
JSON
526 lines
13 KiB
JSON
{
|
|
"signatures": [
|
|
{
|
|
"function_name": "toBoolean",
|
|
"doc": "Converts argument value to boolean type. Returns true if argument is 1, false if argument is 0, error if argument is other.",
|
|
"arguments": [
|
|
{
|
|
"type": "integer",
|
|
"doc": "Integer value to convert."
|
|
}
|
|
],
|
|
"result_type": "boolean",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toBoolean",
|
|
"doc": "Converts argument value to boolean type. Returns true if argument is \"true\", false if argument is \"false\", error if argument is other.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to convert."
|
|
}
|
|
],
|
|
"result_type": "boolean",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toInteger",
|
|
"doc": "Converts argument value to integer type. Returns 1 if argument is true, 0 if argument is false.",
|
|
"arguments": [
|
|
{
|
|
"type": "boolean",
|
|
"doc": "Boolean value to convert."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toInteger",
|
|
"doc": "Converts argument value to integer type. Rounds number value down. Returns integer value.",
|
|
"arguments": [
|
|
{
|
|
"type": "number",
|
|
"doc": "Number value to convert."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toInteger",
|
|
"doc": "Converts argument value to integer type. Returns integer value.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to convert."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toNumber",
|
|
"doc": "Converts argument value to number type. Returns number value.",
|
|
"arguments": [
|
|
{
|
|
"type": "integer",
|
|
"doc": "Integer value to convert."
|
|
}
|
|
],
|
|
"result_type": "number",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toNumber",
|
|
"doc": "Converts argument value to number type. Returns number value.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to convert."
|
|
}
|
|
],
|
|
"result_type": "number",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toColor",
|
|
"doc": "Converts argument value to color type. Returns color value.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to convert."
|
|
}
|
|
],
|
|
"result_type": "color",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toUrl",
|
|
"doc": "Converts argument value to url type. Returns url value.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to convert."
|
|
}
|
|
],
|
|
"result_type": "url",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getIntegerValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getNumberValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "number",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "number",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStringValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getUrlValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "url",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "url",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getUrlValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "url",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getColorValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "color",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "color",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getColorValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "color",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getBooleanValue",
|
|
"doc": "Returns the value of a variable by its name. If the variable doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Variable name."
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "boolean",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredIntegerValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredNumberValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "number",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "number",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredStringValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredUrlValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "url",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "url",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredUrlValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "url",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredColorValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "color",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "color",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredColorValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "color",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredBooleanValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the default value would be returned.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"doc": "Fallback value."
|
|
}
|
|
],
|
|
"result_type": "boolean",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredArrayValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the exception will be thrown.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
}
|
|
],
|
|
"result_type": "array",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "getStoredDictValue",
|
|
"doc": "Returns the stored value by its name. If the value doesn't exist or has incorrect type, the exception will be thrown.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "Stored value name."
|
|
}
|
|
],
|
|
"result_type": "dict",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web"
|
|
]
|
|
}
|
|
]
|
|
}
|