|
1 | 1 | [
|
2 | 2 | {
|
3 | 3 | "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 | + }, |
4 | 46 | {
|
5 | 47 | "name": "blendMode",
|
6 | 48 | "description": "Sets the Effects blendMode property of an object.",
|
|
5837 | 5879 | },
|
5838 | 5880 | {
|
5839 | 5881 | "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.", |
5841 | 5883 | "returns": {
|
5842 | 5884 | "name": null,
|
5843 |
| - "description": "A random number.", |
| 5885 | + "description": "A random number or a random element from array.", |
5844 | 5886 | "type": [
|
5845 |
| - "Number" |
| 5887 | + "Number", |
| 5888 | + "Object" |
5846 | 5889 | ]
|
5847 | 5890 | },
|
5848 | 5891 | "category": "Math",
|
|
5869 | 5912 | "tags": [
|
5870 | 5913 | {
|
5871 | 5914 | "title": "summary",
|
5872 |
| - "description": "Generates a random number." |
| 5915 | + "description": "Generates a random number or returns a random array item." |
5873 | 5916 | },
|
5874 | 5917 | {
|
5875 | 5918 | "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." |
5877 | 5920 | }
|
5878 | 5921 | ],
|
5879 | 5922 | "examples": [],
|
5880 | 5923 | "todo": null,
|
5881 |
| - "summary": "Generates a random number.", |
| 5924 | + "summary": "Generates a random number or returns a random array item.", |
5882 | 5925 | "codetitle": "random([low], [high])"
|
5883 | 5926 | },
|
5884 | 5927 | {
|
|
8136 | 8179 | "String",
|
8137 | 8180 | "File"
|
8138 | 8181 | ]
|
| 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 | + ] |
8139 | 8190 | }
|
8140 | 8191 | ],
|
8141 | 8192 | "kind": "function",
|
|
8152 | 8203 | "examples": [],
|
8153 | 8204 | "todo": null,
|
8154 | 8205 | "summary": "Gets and parses the contents of a JSON file.",
|
8155 |
| - "codetitle": "loadJSON(file)" |
| 8206 | + "codetitle": "loadJSON(file, [userAgent])" |
8156 | 8207 | },
|
8157 | 8208 | {
|
8158 | 8209 | "name": "loadString",
|
|
8175 | 8226 | "String",
|
8176 | 8227 | "File"
|
8177 | 8228 | ]
|
| 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 | + ] |
8178 | 8237 | }
|
8179 | 8238 | ],
|
8180 | 8239 | "kind": "function",
|
|
8191 | 8250 | "examples": [],
|
8192 | 8251 | "todo": null,
|
8193 | 8252 | "summary": "Gets the contents of a file or loads an URL into a string.",
|
8194 |
| - "codetitle": "loadString(file)" |
| 8253 | + "codetitle": "loadString(file, [userAgent])" |
8195 | 8254 | },
|
8196 | 8255 | {
|
8197 | 8256 | "name": "loadStrings",
|
|
8214 | 8273 | "String",
|
8215 | 8274 | "File"
|
8216 | 8275 | ]
|
| 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 | + ] |
8217 | 8284 | }
|
8218 | 8285 | ],
|
8219 | 8286 | "kind": "function",
|
|
8230 | 8297 | "examples": [],
|
8231 | 8298 | "todo": null,
|
8232 | 8299 | "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])" |
8234 | 8301 | },
|
8235 | 8302 | {
|
8236 | 8303 | "name": "selectFile",
|
|
8671 | 8738 | "summary": "Returns a timestamp.",
|
8672 | 8739 | "codetitle": "timestamp()"
|
8673 | 8740 | },
|
| 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 | + }, |
8674 | 8770 | {
|
8675 | 8771 | "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).", |
8677 | 8773 | "returns": {
|
8678 | 8774 | "name": null,
|
8679 |
| - "description": "The current weekday name.", |
| 8775 | + "description": "The current weekday as number.", |
8680 | 8776 | "type": [
|
8681 |
| - "String" |
| 8777 | + "Number" |
8682 | 8778 | ]
|
8683 | 8779 | },
|
8684 | 8780 | "category": "Input",
|
|
8688 | 8784 | "tags": [
|
8689 | 8785 | {
|
8690 | 8786 | "title": "summary",
|
8691 |
| - "description": "Returns the current day of the week." |
| 8787 | + "description": "Returns the current day number of the week." |
8692 | 8788 | },
|
8693 | 8789 | {
|
8694 | 8790 | "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)." |
8696 | 8792 | }
|
8697 | 8793 | ],
|
8698 | 8794 | "examples": [],
|
8699 | 8795 | "todo": null,
|
8700 |
| - "summary": "Returns the current day of the week.", |
| 8796 | + "summary": "Returns the current day number of the week.", |
8701 | 8797 | "codetitle": "weekday()"
|
8702 | 8798 | },
|
8703 | 8799 | {
|
|
0 commit comments