Skip to content

Commit 7ddbfc1

Browse files
committed
updating docs with latest api changes
1 parent 33a7961 commit 7ddbfc1

File tree

14 files changed

+3042
-1832
lines changed

14 files changed

+3042
-1832
lines changed

_source/_data/categories.json

Lines changed: 111 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
[
22
{
33
"entries": [
4+
{
5+
"name": "background",
6+
"description": "Sets a background on the current page. The function takes the current canvas mode into account, so setting canvas mode to `FACING_PAGES` beforehand would result in the background to be drawn across the entire spread. The background will be placed on a background layer that basil creates automatically.",
7+
"returns": {
8+
"name": null,
9+
"description": "The newly created background shape.",
10+
"type": [
11+
"Rectangle"
12+
]
13+
},
14+
"category": "Color",
15+
"subcategory": null,
16+
"parameters": [
17+
{
18+
"name": "bgColor",
19+
"description": "Accepts a color/gradient/swatch as string name or variable. Or values: GRAY / R,G,B / C,M,Y,K.",
20+
"optional": false,
21+
"type": [
22+
"Color",
23+
"Gradient",
24+
"Swatch",
25+
"Numbers",
26+
"String"
27+
]
28+
}
29+
],
30+
"kind": "function",
31+
"tags": [
32+
{
33+
"title": "summary",
34+
"description": "Sets a background on the current page."
35+
},
36+
{
37+
"title": "description",
38+
"description": "Sets a background on the current page. The function takes the current canvas mode into account, so setting canvas mode to `FACING_PAGES` beforehand would result in the background to be drawn across the entire spread. The background will be placed on a background layer that basil creates automatically."
39+
}
40+
],
41+
"examples": [],
42+
"todo": null,
43+
"summary": "Sets a background on the current page.",
44+
"codetitle": "background(bgColor)"
45+
},
446
{
547
"name": "blendMode",
648
"description": "Sets the Effects blendMode property of an object.",
@@ -5837,12 +5879,13 @@
58375879
},
58385880
{
58395881
"name": "random",
5840-
"description": "Generates random numbers. Each time the `random()` function is called, it returns an unexpected value within the specified range. If one parameter is passed to the function it will return a float between zero and the value of the high parameter. The function call `random(5)` returns values between `0` and `5`. If two parameters are passed, it will return a float with a value between the the parameters. The function call `random(-5, 10.2)` returns values between `-5` and `10.2`.\nOne parameter sets the range from `0` to the given parameter, while with two parameters present you set the range from `val1` to `val2`.",
5882+
"description": "Generates random numbers. Each time the `random()` function is called, it returns an unexpected value within the specified range. If one parameter is passed to the function it will return a float between zero and the value of the high parameter. The function call `random(5)` returns values between `0` and `5`. If two parameters are passed, it will return a float with a value between the the parameters. The function call `random(-5, 10.2)` returns values between `-5` and `10.2`.\nOne parameter sets the range from `0` to the given parameter, while with two parameters present you set the range from `val1` to `val2`.\nIf one argument is given and it is an array, returns a random element from that array.",
58415883
"returns": {
58425884
"name": null,
5843-
"description": "A random number.",
5885+
"description": "A random number or a random element from array.",
58445886
"type": [
5845-
"Number"
5887+
"Number",
5888+
"Object"
58465889
]
58475890
},
58485891
"category": "Math",
@@ -5869,16 +5912,16 @@
58695912
"tags": [
58705913
{
58715914
"title": "summary",
5872-
"description": "Generates a random number."
5915+
"description": "Generates a random number or returns a random array item."
58735916
},
58745917
{
58755918
"title": "description",
5876-
"description": "Generates random numbers. Each time the `random()` function is called, it returns an unexpected value within the specified range. If one parameter is passed to the function it will return a float between zero and the value of the high parameter. The function call `random(5)` returns values between `0` and `5`. If two parameters are passed, it will return a float with a value between the the parameters. The function call `random(-5, 10.2)` returns values between `-5` and `10.2`.\nOne parameter sets the range from `0` to the given parameter, while with two parameters present you set the range from `val1` to `val2`."
5919+
"description": "Generates random numbers. Each time the `random()` function is called, it returns an unexpected value within the specified range. If one parameter is passed to the function it will return a float between zero and the value of the high parameter. The function call `random(5)` returns values between `0` and `5`. If two parameters are passed, it will return a float with a value between the the parameters. The function call `random(-5, 10.2)` returns values between `-5` and `10.2`.\nOne parameter sets the range from `0` to the given parameter, while with two parameters present you set the range from `val1` to `val2`.\nIf one argument is given and it is an array, returns a random element from that array."
58775920
}
58785921
],
58795922
"examples": [],
58805923
"todo": null,
5881-
"summary": "Generates a random number.",
5924+
"summary": "Generates a random number or returns a random array item.",
58825925
"codetitle": "random([low], [high])"
58835926
},
58845927
{
@@ -8136,6 +8179,14 @@
81368179
"String",
81378180
"File"
81388181
]
8182+
},
8183+
{
8184+
"name": "userAgent",
8185+
"description": "Optional parameter when URL is used, to specify a user-agent making request.",
8186+
"optional": true,
8187+
"type": [
8188+
"String"
8189+
]
81398190
}
81408191
],
81418192
"kind": "function",
@@ -8152,7 +8203,7 @@
81528203
"examples": [],
81538204
"todo": null,
81548205
"summary": "Gets and parses the contents of a JSON file.",
8155-
"codetitle": "loadJSON(file)"
8206+
"codetitle": "loadJSON(file, [userAgent])"
81568207
},
81578208
{
81588209
"name": "loadString",
@@ -8175,6 +8226,14 @@
81758226
"String",
81768227
"File"
81778228
]
8229+
},
8230+
{
8231+
"name": "userAgent",
8232+
"description": "Optional parameter when URL is used, to specify a user-agent making request.",
8233+
"optional": true,
8234+
"type": [
8235+
"String"
8236+
]
81788237
}
81798238
],
81808239
"kind": "function",
@@ -8191,7 +8250,7 @@
81918250
"examples": [],
81928251
"todo": null,
81938252
"summary": "Gets the contents of a file or loads an URL into a string.",
8194-
"codetitle": "loadString(file)"
8253+
"codetitle": "loadString(file, [userAgent])"
81958254
},
81968255
{
81978256
"name": "loadStrings",
@@ -8214,6 +8273,14 @@
82148273
"String",
82158274
"File"
82168275
]
8276+
},
8277+
{
8278+
"name": "userAgent",
8279+
"description": "Optional parameter when URL is used, to specify a user-agent making request.",
8280+
"optional": true,
8281+
"type": [
8282+
"String"
8283+
]
82178284
}
82188285
],
82198286
"kind": "function",
@@ -8230,7 +8297,7 @@
82308297
"examples": [],
82318298
"todo": null,
82328299
"summary": "Gets the contents of a file or loads an URL into an array of its individual lines.",
8233-
"codetitle": "loadStrings(file)"
8300+
"codetitle": "loadStrings(file, [userAgent])"
82348301
},
82358302
{
82368303
"name": "selectFile",
@@ -8671,14 +8738,43 @@
86718738
"summary": "Returns a timestamp.",
86728739
"codetitle": "timestamp()"
86738740
},
8741+
{
8742+
"name": "week",
8743+
"description": "The `week()` function returns the current week as a value from `1`-`52`.",
8744+
"returns": {
8745+
"name": null,
8746+
"description": "The current week number of the year.",
8747+
"type": [
8748+
"Number"
8749+
]
8750+
},
8751+
"category": "Input",
8752+
"subcategory": "Time & Date",
8753+
"parameters": [],
8754+
"kind": "function",
8755+
"tags": [
8756+
{
8757+
"title": "summary",
8758+
"description": "Returns the current week number of the year."
8759+
},
8760+
{
8761+
"title": "description",
8762+
"description": "The `week()` function returns the current week as a value from `1`-`52`."
8763+
}
8764+
],
8765+
"examples": [],
8766+
"todo": null,
8767+
"summary": "Returns the current week number of the year.",
8768+
"codetitle": "week()"
8769+
},
86748770
{
86758771
"name": "weekday",
8676-
"description": "The `weekday()` function returns the current weekday as a string from `Sunday`, `Monday`, `Tuesday` ...",
8772+
"description": "The `weekday()` function returns the current weekday as a value from `0` - `6` (starting Sunday).",
86778773
"returns": {
86788774
"name": null,
8679-
"description": "The current weekday name.",
8775+
"description": "The current weekday as number.",
86808776
"type": [
8681-
"String"
8777+
"Number"
86828778
]
86838779
},
86848780
"category": "Input",
@@ -8688,16 +8784,16 @@
86888784
"tags": [
86898785
{
86908786
"title": "summary",
8691-
"description": "Returns the current day of the week."
8787+
"description": "Returns the current day number of the week."
86928788
},
86938789
{
86948790
"title": "description",
8695-
"description": "The `weekday()` function returns the current weekday as a string from `Sunday`, `Monday`, `Tuesday` ..."
8791+
"description": "The `weekday()` function returns the current weekday as a value from `0` - `6` (starting Sunday)."
86968792
}
86978793
],
86988794
"examples": [],
86998795
"todo": null,
8700-
"summary": "Returns the current day of the week.",
8796+
"summary": "Returns the current day number of the week.",
87018797
"codetitle": "weekday()"
87028798
},
87038799
{

0 commit comments

Comments
 (0)