Last active
May 22, 2020 14:08
-
-
Save ksdme/b8e77c52bfac4633b7a8996c2e2f1710 to your computer and use it in GitHub Desktop.
Representation of ferret stdlib documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
utils: | |
- token: WAIT | |
file_name: utils/wait.go | |
line_number: 12 | |
doc: | |
desc: Wait pauses the execution for a given period. | |
params: | |
- name: timeout | |
type: | |
- Float | |
- Int | |
desc: Number value which indicates for how long to stop an execution. | |
returns: | |
- token: PRINT | |
file_name: utils/log.go | |
line_number: 12 | |
doc: | |
desc: Print writes messages into the system log. | |
params: [] | |
returns: | |
name: | |
type: | |
- None | |
desc: Returns none | |
objects: | |
- token: KEYS | |
file_name: objects/keys.go | |
line_number: 15 | |
doc: | |
desc: Keys returns string array of object's keys | |
params: | |
- name: obj | |
type: | |
- Object | |
desc: The object whose keys you want to extract | |
- name: sort | |
type: | |
- Boolean, optional | |
desc: If sort is true, then the returned keys will be sorted. | |
returns: | |
name: | |
type: | |
- Array of String | |
desc: Array that contains object keys. | |
- token: HAS | |
file_name: objects/has.go | |
line_number: 13 | |
doc: | |
desc: Has returns the value stored by the given key. | |
params: | |
- name: key | |
type: | |
- String | |
desc: The key name string. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: True if the key exists else false. | |
- token: VALUES | |
file_name: objects/values.go | |
line_number: 13 | |
doc: | |
desc: Values return the attribute values of the object as an array. | |
params: | |
- name: obj | |
type: | |
- Object | |
desc: An object. | |
returns: | |
name: | |
type: | |
- Array of Value | |
desc: The values of document returned in any order. | |
- token: KEEP_KEYS | |
file_name: objects/keep_keys.go | |
line_number: 14 | |
doc: | |
desc: KeepKeys returns a new object with only given keys. | |
params: | |
- name: src | |
type: | |
- Object | |
desc: Source object. | |
- name: keys | |
type: | |
- Array Of String OR Strings | |
desc: Keys that need to be keeped. | |
returns: | |
name: | |
type: | |
- Object | |
desc: New object with only given keys. | |
- token: MERGE | |
file_name: objects/merge.go | |
line_number: 13 | |
doc: | |
desc: Merge merge the given objects into a single object. | |
params: | |
- name: objs | |
type: | |
- Array Of Object OR Objects | |
desc: Objects to merge. | |
returns: | |
name: | |
type: | |
- Object | |
desc: Object created by merging. | |
- token: MERGE_RECURSIVE | |
file_name: objects/merge_recursive.go | |
line_number: 13 | |
doc: | |
desc: MergeRecursive recursively merge the given objects into a single object. | |
params: | |
- name: objs | |
type: | |
- Objects | |
desc: Objects to merge. | |
returns: | |
name: | |
type: | |
- Object | |
desc: Object created by merging. | |
- token: ZIP | |
file_name: objects/zip.go | |
line_number: 16 | |
doc: | |
desc: Zip returns an object assembled from the separate parameters keys and values. | |
Keys and values must be arrays and have the same length. | |
params: | |
- name: keys | |
type: | |
- Array of Strings | |
desc: An array of strings, to be used as key names in the result. | |
- name: values | |
type: | |
- Array of Objects | |
desc: An array of core.value, to be used as key values. | |
returns: | |
name: | |
type: | |
- Object | |
desc: An object with the keys and values assembled. | |
collections: | |
- token: LENGTH | |
file_name: collections/length.go | |
line_number: 14 | |
doc: | |
desc: Length returns the length of a measurable value. | |
params: | |
- name: value | |
type: | |
- String | |
- Array | |
- Object | |
- Binary | |
desc: The value to measure. | |
returns: | |
name: | |
type: | |
- Int | |
desc: Returns the length of the value. | |
- token: REVERSE | |
file_name: collections/reverse.go | |
line_number: 13 | |
doc: | |
desc: Reverse returns the reverse of a given string or array value. | |
params: | |
- name: text | |
type: | |
- String | |
- Array | |
desc: The string or array to reverse. | |
returns: | |
name: | |
type: | |
- String | |
- Array | |
desc: Returns a reversed version of a given value. | |
math: | |
- token: MIN | |
file_name: math/min.go | |
line_number: 13 | |
doc: | |
desc: Min returns the smallest (arithmetic mean) of the values in array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The smallest of the values in array. | |
- token: RADIANS | |
file_name: math/radians.go | |
line_number: 13 | |
doc: | |
desc: Radians returns the angle converted from degrees to radians. | |
params: | |
- name: number | |
type: | |
- Float | |
- Int | |
desc: The input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The angle in radians. | |
- token: FLOOR | |
file_name: math/floor.go | |
line_number: 14 | |
doc: | |
desc: Floor returns the greatest integer value less than or equal to a given value. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Int | |
desc: The greatest integer value less than or equal to a given value. | |
- token: PERCENTILE | |
file_name: math/percentile.go | |
line_number: 17 | |
doc: | |
desc: Percentile returns the nth percentile of the values in a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
- name: numb | |
type: | |
- Int | |
desc: A number which must be between 0 (excluded) and 100 (included). | |
- name: method | |
type: | |
- String, optional | |
desc: '"rank" (default) or "interpolation".' | |
returns: | |
name: | |
type: | |
- Float | |
desc: The nth percentile, or null if the array is empty or only null values | |
are contained in it or the percentile cannot be calculated. | |
- token: LOG10 | |
file_name: math/log10.go | |
line_number: 14 | |
doc: | |
desc: Log10 returns the decimal logarithm of a given value. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The decimal logarithm of a given value. | |
- token: SIN | |
file_name: math/sin.go | |
line_number: 14 | |
doc: | |
desc: Sin returns the sine of the radian argument. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The sin, in radians, of a given number. | |
- token: LOG2 | |
file_name: math/log2.go | |
line_number: 14 | |
doc: | |
desc: Log2 returns the binary logarithm of a given value. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The binary logarithm of a given value. | |
- token: VARIANCE_POPULATION | |
file_name: math/variance_population.go | |
line_number: 14 | |
doc: | |
desc: PopulationVariance returns the population variance of the values in a given | |
array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The population variance. | |
- token: TAN | |
file_name: math/tan.go | |
line_number: 14 | |
doc: | |
desc: Tan returns the tangent of a given number. | |
params: | |
- name: value | |
type: | |
- Int | |
- Float | |
desc: A number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The tangent. | |
- token: AVERAGE | |
file_name: math/average.go | |
line_number: 13 | |
doc: | |
desc: Average Returns the average (arithmetic mean) of the values in array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The average of the values in array. | |
- token: DEGREES | |
file_name: math/degrees.go | |
line_number: 13 | |
doc: | |
desc: Degrees returns the angle converted from radians to degrees. | |
params: | |
- name: number | |
type: | |
- Float | |
- Int | |
desc: The input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The angle in degrees.l | |
- token: RANGE | |
file_name: math/range.go | |
line_number: 14 | |
doc: | |
desc: Range returns an array of numbers in the specified range, optionally with | |
increments other than 1. | |
params: | |
- name: start | |
type: | |
- Int | |
- Float | |
desc: The value to start the range at (inclusive). | |
- name: end | |
type: | |
- Int | |
- Float | |
desc: The value to end the range with (inclusive). | |
- name: step | |
type: | |
- Int | |
- Float, optional | |
desc: How much to increment in every step, the default is 1.0. | |
returns: | |
- token: ACOS | |
file_name: math/acos.go | |
line_number: 14 | |
doc: | |
desc: Acos returns the arccosine, in radians, of a given number. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The arccosine, in radians, of a given number. | |
- token: RAND | |
file_name: math/rand.go | |
line_number: 15 | |
doc: | |
desc: Rand return a pseudo-random number between 0 and 1. | |
params: | |
- name: max | |
type: | |
- Float | |
- Int, optional | |
desc: Upper limit. | |
- name: min | |
type: | |
- Float | |
- Int, optional | |
desc: Lower limit. | |
returns: | |
name: | |
type: | |
- Float | |
desc: A number greater than 0 and less than 1. | |
- token: STDDEV_SAMPLE | |
file_name: math/stddev_sample.go | |
line_number: 14 | |
doc: | |
desc: StandardDeviationSample returns the sample standard deviation of the values | |
in a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The sample standard deviation. | |
- token: SUM | |
file_name: math/sum.go | |
line_number: 13 | |
doc: | |
desc: Sum returns the sum of the values in a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The sum of the values. | |
- token: MEDIAN | |
file_name: math/median.go | |
line_number: 14 | |
doc: | |
desc: Median returns the median of the values in array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The median of the values in array. | |
- token: ABS | |
file_name: math/abs.go | |
line_number: 14 | |
doc: | |
desc: Abs returns the absolute value of a given number. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The absolute value of a given number. | |
- token: ROUND | |
file_name: math/round.go | |
line_number: 14 | |
doc: | |
desc: Round returns the nearest integer, rounding half away from zero. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Int | |
desc: The nearest integer, rounding half away from zero. | |
- token: STDDEV_POPULATION | |
file_name: math/stddev_population.go | |
line_number: 14 | |
doc: | |
desc: StandardDeviationPopulation returns the population standard deviation of | |
the values in a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The population standard deviation. | |
- token: ATAN2 | |
file_name: math/atan2.go | |
line_number: 15 | |
doc: | |
desc: Atan2 returns the arc tangent of y/x, using the signs of the two to determine | |
the quadrant of the return value. | |
params: | |
- name: number1 | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
- name: number2 | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The arc tangent of y/x, using the signs of the two to determine the quadrant | |
of the return value. | |
- token: COS | |
file_name: math/cos.go | |
line_number: 14 | |
doc: | |
desc: Cos returns the cosine of a given number. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The cosine of a given number. | |
- token: PI | |
file_name: math/pi.go | |
line_number: 12 | |
doc: | |
desc: Pi returns Pi value. | |
params: [] | |
returns: | |
name: | |
type: | |
- Float | |
desc: Pi value. | |
- token: VARIANCE_SAMPLE | |
file_name: math/variance_sample.go | |
line_number: 14 | |
doc: | |
desc: SampleVariance returns the sample variance of the values in a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The sample variance. | |
- token: ATAN | |
file_name: math/atan.go | |
line_number: 14 | |
doc: | |
desc: Atan returns the arctangent, in radians, of a given number. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The arctangent, in radians, of a given number. | |
- token: ASIN | |
file_name: math/asin.go | |
line_number: 14 | |
doc: | |
desc: Asin returns the arcsine, in radians, of a given number. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The arcsine, in radians, of a given number. | |
- token: POW | |
file_name: math/pow.go | |
line_number: 15 | |
doc: | |
desc: Pow returns the base to the exponent value. | |
params: | |
- name: base | |
type: | |
- Int | |
- Float | |
desc: The base value. | |
- name: exp | |
type: | |
- Int | |
- Float | |
desc: The exponent value. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The exponentiated value. | |
- token: EXP2 | |
file_name: math/exp2.go | |
line_number: 14 | |
doc: | |
desc: Exp2 returns 2 raised to the power of value. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: 2 raised to the power of value. | |
- token: CEIL | |
file_name: math/ceil.go | |
line_number: 14 | |
doc: | |
desc: Ceil returns the least integer value greater than or equal to a given value. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Int | |
desc: The least integer value greater than or equal to a given value. | |
- token: LOG | |
file_name: math/log.go | |
line_number: 14 | |
doc: | |
desc: Log returns the natural logarithm of a given value. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The natural logarithm of a given value. | |
- token: EXP | |
file_name: math/exp.go | |
line_number: 14 | |
doc: | |
desc: Exp returns Euler's constant (2.71828...) raised to the power of value. | |
params: | |
- name: number | |
type: | |
- Int | |
- Float | |
desc: Input number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: Euler's constant raised to the power of value. | |
- token: MAX | |
file_name: math/max.go | |
line_number: 13 | |
doc: | |
desc: Max returns the greatest (arithmetic mean) of the values in array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Array of numbers. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The greatest of the values in array. | |
- token: SQRT | |
file_name: math/sqrt.go | |
line_number: 14 | |
doc: | |
desc: Sqrt returns the square root of a given number. | |
params: | |
- name: value | |
type: | |
- Int | |
- Float | |
desc: A number. | |
returns: | |
name: | |
type: | |
- Float | |
desc: The square root. | |
io/net/http: | |
- token: POST | |
file_name: io/net/http/post.go | |
line_number: 14 | |
doc: | |
desc: POST makes a POST request. | |
params: | |
- name: params (Object) - request parameters. * url (String) - Target url * body | |
type: | |
- Binary | |
desc: Post data * headers (object) optional - http headers | |
returns: | |
- token: DELETE | |
file_name: io/net/http/delete.go | |
line_number: 14 | |
doc: | |
desc: DELETE makes a HTTP DELETE request. | |
params: | |
- name: params (Object) - request parameters. * url (String) - Target url * body | |
type: | |
- Binary | |
desc: Post data * headers (object) optional - http headers | |
returns: | |
- token: PUT | |
file_name: io/net/http/put.go | |
line_number: 14 | |
doc: | |
desc: PUT makes a PUT HTTP request. | |
params: | |
- name: params (Object) - request parameters. * url (String) - Target url. * body | |
type: | |
- Binary | |
desc: Post data. * headers (object) optional - http headers. | |
returns: | |
- token: GET | |
file_name: io/net/http/get.go | |
line_number: 15 | |
doc: | |
desc: GET makes a HTTP GET request. | |
params: | |
- name: url or (String) - target url or parameters. * url | |
type: | |
- String | |
desc: Target url * headers (object) optional - http headers | |
returns: | |
- token: DO | |
file_name: io/net/http/request.go | |
line_number: 26 | |
doc: | |
desc: REQUEST makes a HTTP request. | |
params: | |
- name: params (Object) - request parameters. * method (String) - HTTP method. | |
* url (String) - Target url. * body | |
type: | |
- Binary | |
desc: Post data. * headers (object) optional - http headers. | |
returns: | |
io/fs: | |
- token: READ | |
file_name: io/fs/read.go | |
line_number: 14 | |
doc: | |
desc: Read reads from a given file. | |
params: | |
- name: path | |
type: | |
- String | |
desc: Path to file to read from. | |
returns: | |
name: | |
type: | |
- Binary | |
desc: The read file in binary format. | |
- token: WRITE | |
file_name: io/fs/write.go | |
line_number: 22 | |
doc: | |
desc: Write writes the given data into the file. | |
params: | |
- name: path | |
type: | |
- String | |
desc: Path to file to write into. | |
- name: data | |
type: | |
- Binary | |
desc: Data to write. | |
- name: params | |
type: | |
- Object, optional | |
desc: 'Additional parameters: * mode (string): * x - exclusive: returns an error | |
if the file exist. it can be combined with other modes * a - append: will | |
create a file if the specified file does not exist * w - write (default): | |
will create a file if the specified file does not exist' | |
returns: | |
name: | |
type: | |
- None | |
desc: Returns nothing. | |
types: | |
- token: IS_BINARY | |
file_name: types/is_binary.go | |
line_number: 13 | |
doc: | |
desc: IsBinary checks whether value is a binary value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is binary, otherwise false. | |
- token: TO_ARRAY | |
file_name: types/to_array.go | |
line_number: 15 | |
doc: | |
desc: toArray takes an input value of any type and convert it into an array value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Array | |
desc: None is converted to an empty array boolean values, numbers and strings | |
are converted to an array containing the original value as its single element | |
arrays keep their original value objects / html nodes are converted to an | |
array containing their attribute values as array elements. | |
- token: IS_DATETIME | |
file_name: types/is_date_time.go | |
line_number: 13 | |
doc: | |
desc: IsDateTime checks whether value is a date time value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is date time, otherwise false. | |
- token: IS_BOOL | |
file_name: types/is_boolean.go | |
line_number: 13 | |
doc: | |
desc: IsBool checks whether value is a boolean value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is boolean, otherwise false. | |
- token: IS_FLOAT | |
file_name: types/is_float.go | |
line_number: 13 | |
doc: | |
desc: IsFloat checks whether value is a float value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is float, otherwise false. | |
- token: TO_INT | |
file_name: types/to_int.go | |
line_number: 20 | |
doc: | |
desc: ToInt takes an input value of any type and convert it into an integer value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Int | |
desc: None and false are converted to the value 0 true is converted to 1 numbers | |
keep their original value strings are converted to their numeric equivalent | |
if the string contains a valid representation of a number. string values that | |
do not contain any valid representation of a number will be converted to the | |
number 0. an empty array is converted to 0, an array with one member is converted | |
into the result of to_number() for its sole member. an array with two or more | |
members is converted to the number 0. an object / html node is converted to | |
the number 0. | |
- token: IS_STRING | |
file_name: types/is_string.go | |
line_number: 13 | |
doc: | |
desc: IsString checks whether value is a string value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is string, otherwise false. | |
- token: IS_INT | |
file_name: types/is_int.go | |
line_number: 13 | |
doc: | |
desc: IsInt checks whether value is a int value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is int, otherwise false. | |
- token: IS_NONE | |
file_name: types/is_none.go | |
line_number: 13 | |
doc: | |
desc: IsNone checks whether value is a none value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is none, otherwise false. | |
- token: IS_NAN | |
file_name: types/is_nan.go | |
line_number: 13 | |
doc: | |
desc: IsNaN checks whether value is NaN. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is nan, otherwise false. | |
- token: IS_HTML_DOCUMENT | |
file_name: types/is_html_document.go | |
line_number: 13 | |
doc: | |
desc: IsHTMLDocument checks whether value is a HTMLDocument value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is htmldocument, otherwise false. | |
- token: TO_FLOAT | |
file_name: types/to_float.go | |
line_number: 20 | |
doc: | |
desc: ToFloat takes an input value of any type and convert it into a float value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Float | |
desc: None and false are converted to the value 0 true is converted to 1 numbers | |
keep their original value strings are converted to their numeric equivalent | |
if the string contains a valid representation of a number. string values that | |
do not contain any valid representation of a number will be converted to the | |
number 0. an empty array is converted to 0, an array with one member is converted | |
into the result of to_number() for its sole member. an array with two or more | |
members is converted to the number 0. an object / html node is converted to | |
the number 0. | |
- token: TO_BOOL | |
file_name: types/to_boolean.go | |
line_number: 18 | |
doc: | |
desc: ToBool takes an input value of any type and converts it into the appropriate | |
boolean value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: None is converted to false numbers are converted to true, except for 0, | |
which is converted to false strings are converted to true if they are non-empty, | |
and to false otherwise dates are converted to true if they are not zero, and | |
to false otherwise arrays are always converted to true (even if empty) objects | |
/ htmlnodes / binary are always converted to true | |
- token: IS_HTML_ELEMENT | |
file_name: types/is_html_element.go | |
line_number: 13 | |
doc: | |
desc: IsHTMLElement checks whether value is a HTMLElement value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is htmlelement, otherwise false. | |
- token: TO_STRING | |
file_name: types/to_string.go | |
line_number: 12 | |
doc: | |
desc: ToString takes an input value of any type and convert it into a string value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- String | |
desc: String representation of a given value. | |
- token: TO_DATETIME | |
file_name: types/to_date_time.go | |
line_number: 12 | |
doc: | |
desc: ToDateTime takes an input value of any type and converts it into the appropriate | |
date time value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- DateTime | |
desc: Parsed date time. | |
- token: IS_OBJECT | |
file_name: types/is_object.go | |
line_number: 13 | |
doc: | |
desc: IsObject checks whether value is an object value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is object, otherwise false. | |
- token: IS_ARRAY | |
file_name: types/is_array.go | |
line_number: 13 | |
doc: | |
desc: IsArray checks whether value is an array value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if value is array, otherwise false. | |
- token: TYPENAME | |
file_name: types/type_name.go | |
line_number: 12 | |
doc: | |
desc: TypeName returns the data type name of value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: Input value of arbitrary type. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns string representation of a type. | |
strings: | |
- token: LIKE | |
file_name: strings/like.go | |
line_number: 15 | |
doc: | |
desc: Like checks whether the pattern search is contained in the string text, | |
using wildcard matching. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to search in. | |
- name: search | |
type: | |
- String | |
desc: A search pattern that can contain the wildcard characters. | |
- name: caseInsensitive | |
type: | |
- Boolean | |
desc: If set to true, the matching will be case-insensitive. the default is | |
false. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if the pattern is contained in text, and false otherwise. | |
- token: TRIM | |
file_name: strings/trim.go | |
line_number: 14 | |
doc: | |
desc: Trim returns the string value with whitespace stripped from the start and/or | |
end. | |
params: | |
- name: value | |
type: | |
- String | |
desc: The string. | |
- name: chars | |
type: | |
- String | |
desc: Overrides the characters that should be removed from the string. it defaults | |
to \r\n \t. | |
returns: | |
name: | |
type: | |
- String | |
desc: The string without chars on both sides. | |
- token: LTRIM | |
file_name: strings/trim.go | |
line_number: 34 | |
doc: | |
desc: LTrim returns the string value with whitespace stripped from the start only. | |
params: | |
- name: value | |
type: | |
- String | |
desc: The string. | |
- name: chars | |
type: | |
- String | |
desc: Overrides the characters that should be removed from the string. it defaults | |
to \r\n \t. | |
returns: | |
name: | |
type: | |
- String | |
desc: The string without chars at the left-hand side. | |
- token: RTRIM | |
file_name: strings/trim.go | |
line_number: 55 | |
doc: | |
desc: RTrim returns the string value with whitespace stripped from the end only. | |
params: | |
- name: value | |
type: | |
- String | |
desc: The string. | |
- name: chars | |
type: | |
- String | |
desc: Overrides the characters that should be removed from the string. it defaults | |
to \r\n \t. | |
returns: | |
name: | |
type: | |
- String | |
desc: The string without chars at the right-hand side. | |
- token: FROM_BASE64 | |
file_name: strings/decode.go | |
line_number: 16 | |
doc: | |
desc: FromBase64 returns the value of a base64 representation. | |
params: | |
- name: base64String | |
type: | |
- String | |
desc: The string to decode. | |
returns: | |
name: | |
type: | |
- String | |
desc: The decoded string. | |
- token: DECODE_URI_COMPONENT | |
file_name: strings/decode.go | |
line_number: 36 | |
doc: | |
desc: DecodeURIComponent returns the decoded String of uri. | |
params: | |
- name: uri | |
type: | |
- String | |
desc: Uri to decode. | |
returns: | |
name: | |
type: | |
- String | |
desc: Decoded string. | |
- token: CONCAT | |
file_name: strings/concat.go | |
line_number: 13 | |
doc: | |
desc: Concat concatenates one or more instances of Read, or an Array. | |
params: | |
- name: src | |
type: | |
- String... | |
- Array | |
desc: The source string / array. | |
returns: | |
name: | |
type: | |
- String | |
desc: Returns the concatenated string. | |
- token: CONCAT_SEPARATOR | |
file_name: strings/concat.go | |
line_number: 47 | |
doc: | |
desc: ConcatWithSeparator concatenates one or more instances of Read, or an Array | |
with a given separator. | |
params: | |
- name: separator | |
type: | |
- string | |
desc: The separator string. | |
- name: src | |
type: | |
- string... | |
- array | |
desc: The source string / array. | |
returns: | |
name: | |
type: | |
- String | |
desc: Returns the concatenated string. | |
- token: LOWER | |
file_name: strings/case.go | |
line_number: 13 | |
doc: | |
desc: Lower converts strings to their lower-case counterparts. All other characters | |
are returned unchanged. | |
params: | |
- name: src | |
type: | |
- String | |
desc: The source string. | |
returns: | |
name: | |
type: | |
- String | |
desc: This string in lower case. | |
- token: UPPER | |
file_name: strings/case.go | |
line_number: 28 | |
doc: | |
desc: Upper converts strings to their upper-case counterparts. All other characters | |
are returned unchanged. | |
params: | |
- name: src | |
type: | |
- String | |
desc: The source string. | |
returns: | |
name: | |
type: | |
- String | |
desc: This string in upper case. | |
- token: JSON_PARSE | |
file_name: strings/json.go | |
line_number: 13 | |
doc: | |
desc: JSONParse returns a FQL value described by the JSON-encoded input string. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to parse as json. | |
returns: | |
name: | |
type: | |
- Value | |
desc: Returns fql value | |
- token: JSON_STRINGIFY | |
file_name: strings/json.go | |
line_number: 34 | |
doc: | |
desc: JSONStringify returns a JSON string representation of the input value. | |
params: | |
- name: value | |
type: | |
- Value | |
desc: The input value to serialize. | |
returns: | |
name: | |
type: | |
- String | |
desc: Returns json string | |
- token: FMT | |
file_name: strings/fmt.go | |
line_number: 18 | |
doc: | |
desc: Fmt formats the template using these arguments. | |
params: | |
- name: template | |
type: | |
- String | |
desc: Template. | |
- name: args | |
type: | |
- Any Values | |
desc: Template arguments. | |
returns: | |
name: | |
type: | |
- String | |
desc: String formed by template using arguments. | |
- token: RANDOM_TOKEN | |
file_name: strings/random.go | |
line_number: 26 | |
doc: | |
desc: RandomToken generates a pseudo-random token string with the specified length. | |
The algorithm for token generation should be treated as opaque. | |
params: | |
- name: length | |
type: | |
- Int | |
desc: The desired string length for the token. it must be greater than 0 and | |
at most 65536. | |
returns: | |
name: | |
type: | |
- String | |
desc: A generated token consisting of lowercase letters, uppercase letters and | |
numbers. | |
- token: CONTAINS | |
file_name: strings/contains.go | |
line_number: 16 | |
doc: | |
desc: Contains returns a value indicating whether a specified substring occurs | |
within a string. | |
params: | |
- name: src | |
type: | |
- String | |
desc: The source string. | |
- name: search | |
type: | |
- String | |
desc: The string to seek. | |
- name: returnIndex | |
type: | |
- Boolean | |
desc: Values which indicates whether to return the character position of the | |
match is returned instead of a boolean. the default is false. | |
returns: | |
name: | |
type: | |
- Boolean | |
- Int | |
desc: Returns index or a boolean value depending on returnindex. | |
- token: ENCODE_URI_COMPONENT | |
file_name: strings/encode.go | |
line_number: 17 | |
doc: | |
desc: EncodeURIComponent returns the encoded String of uri. | |
params: | |
- name: uri | |
type: | |
- String | |
desc: Uri to encode. | |
returns: | |
name: | |
type: | |
- String | |
desc: Encoded string. | |
- token: MD5 | |
file_name: strings/encode.go | |
line_number: 32 | |
doc: | |
desc: Md5 calculates the MD5 checksum for text and return it in a hexadecimal | |
string representation. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to do calculations against to. | |
returns: | |
name: | |
type: | |
- String | |
desc: Md5 checksum as hex string. | |
- token: SHA1 | |
file_name: strings/encode.go | |
line_number: 48 | |
doc: | |
desc: Sha1 calculates the SHA1 checksum for text and returns it in a hexadecimal | |
string representation. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to do calculations against to. | |
returns: | |
name: | |
type: | |
- String | |
desc: Sha1 checksum as hex string. | |
- token: SHA512 | |
file_name: strings/encode.go | |
line_number: 64 | |
doc: | |
desc: Sha512 calculates the SHA512 checksum for text and returns it in a hexadecimal | |
string representation. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to do calculations against to. | |
returns: | |
name: | |
type: | |
- String | |
desc: Sha512 checksum as hex string. | |
- token: TO_BASE64 | |
file_name: strings/encode.go | |
line_number: 80 | |
doc: | |
desc: ToBase64 returns the base64 representation of value. | |
params: | |
- name: value | |
type: | |
- string | |
desc: The string to encode. | |
returns: | |
name: | |
type: | |
- String | |
desc: A base64 representation of the string. | |
- token: FIND_FIRST | |
file_name: strings/find.go | |
line_number: 18 | |
doc: | |
desc: FindFirst returns the position of the first occurrence of the string search | |
inside the string text. Positions start at 0. | |
params: | |
- name: src | |
type: | |
- String | |
desc: The source string. | |
- name: search | |
type: | |
- String | |
desc: The string to seek. | |
- name: start | |
type: | |
- Int, optional | |
desc: Limit the search to a subset of the text, beginning at start. | |
- name: end | |
type: | |
- Int, optional | |
desc: Limit the search to a subset of the text, ending at end | |
returns: | |
name: | |
type: | |
- Int | |
desc: The character position of the match. if search is not contained in text, | |
-1 is returned. if search is empty, start is returned. | |
- token: FIND_LAST | |
file_name: strings/find.go | |
line_number: 65 | |
doc: | |
desc: FindLast returns the position of the last occurrence of the string search | |
inside the string text. Positions start at 0. | |
params: | |
- name: src | |
type: | |
- String | |
desc: The source string. | |
- name: search | |
type: | |
- String | |
desc: The string to seek. | |
- name: start | |
type: | |
- Int, optional | |
desc: Limit the search to a subset of the text, beginning at start. | |
- name: end | |
type: | |
- Int, optional | |
desc: Limit the search to a subset of the text, ending at end | |
returns: | |
name: | |
type: | |
- Int | |
desc: The character position of the match. if search is not contained in text, | |
-1 is returned. if search is empty, start is returned. | |
- token: SUBSTRING | |
file_name: strings/substr.go | |
line_number: 15 | |
doc: | |
desc: Substring returns a substring of value. | |
params: | |
- name: value | |
type: | |
- String | |
desc: The source string. | |
- name: offset | |
type: | |
- Int | |
desc: Start at offset, offsets start at position 0. | |
- name: length | |
type: | |
- Int, optional | |
desc: At most length characters, omit to get the substring from offset to the | |
end of the string. optional. | |
returns: | |
name: | |
type: | |
- String | |
desc: A substring of value. | |
- token: LEFT | |
file_name: strings/substr.go | |
line_number: 61 | |
doc: | |
desc: Left returns the leftmost characters of the string value by index. | |
params: | |
- name: src | |
type: | |
- String | |
desc: The source string. | |
- name: length | |
type: | |
- Int | |
desc: The amount of characters to return. | |
returns: | |
name: | |
type: | |
- String | |
desc: Returns the left substring. | |
- token: RIGHT | |
file_name: strings/substr.go | |
line_number: 88 | |
doc: | |
desc: Right returns the rightmost characters of the string value. | |
params: | |
- name: src | |
type: | |
- String | |
desc: The source string. | |
- name: length | |
type: | |
- Int | |
desc: The amount of characters to return. | |
returns: | |
name: | |
type: | |
- String | |
desc: Returns the right substring. | |
- token: UNESCAPE_HTML | |
file_name: strings/unescape.go | |
line_number: 17 | |
doc: | |
desc: UnescapeHTML unescapes entities like "<" to become "<". It unescapes | |
a larger range of entities than EscapeString escapes. For example, "á" | |
unescapes to "á", as does "á" and "á". UnescapeString(EscapeString(s)) | |
== s always holds, but the converse isn't always true. | |
params: | |
- name: string | |
type: | |
- String | |
desc: Uri to unescape. | |
returns: | |
name: | |
type: | |
- String | |
desc: Escaped string. | |
- token: SPLIT | |
file_name: strings/split.go | |
line_number: 16 | |
doc: | |
desc: Split splits the given string value into a list of strings, using the separator. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to split. | |
- name: separator | |
type: | |
- String | |
desc: The separator. | |
- name: limit | |
type: | |
- Int | |
desc: Limit the number of split values in the result. if no limit is given, | |
the number of splits returned is not bounded. | |
returns: | |
name: | |
type: | |
- Array<String> | |
desc: Array of strings. | |
- token: REGEX_MATCH | |
file_name: strings/regex.go | |
line_number: 16 | |
doc: | |
desc: RegexMatch returns the matches in the given string text, using the regex. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to search in. | |
- name: regex | |
type: | |
- String | |
desc: A regular expression to use for matching the text. | |
- name: caseInsensitive | |
type: | |
- Boolean | |
desc: If set to true, the matching will be case-insensitive. the default is | |
false. | |
returns: | |
name: | |
type: | |
- Array | |
desc: An array of strings containing the matches. | |
- token: REGEX_SPLIT | |
file_name: strings/regex.go | |
line_number: 58 | |
doc: | |
desc: RegexSplit splits the given string text into a list of strings, using the | |
separator. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to split. | |
- name: regex | |
type: | |
- String | |
desc: A regular expression to use for splitting the text. | |
- name: caseInsensitive | |
type: | |
- Boolean | |
desc: If set to true, the matching will be case-insensitive. the default is | |
false. | |
- name: limit | |
type: | |
- Int | |
desc: Limit the number of split values in the result. if no limit is given, | |
the number of splits returned is not bounded. | |
returns: | |
name: | |
type: | |
- Array | |
desc: An array of strings splited by the expression. | |
- token: REGEX_TEST | |
file_name: strings/regex.go | |
line_number: 100 | |
doc: | |
desc: RegexTest test whether the regexp has at least one match in the given text. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to split. | |
- name: regex | |
type: | |
- String | |
desc: A regular expression to use for splitting the text. | |
- name: caseInsensitive | |
type: | |
- Boolean | |
desc: If set to true, the matching will be case-insensitive. the default is | |
false. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if the pattern is contained in text, and false otherwise. | |
- token: REGEX_REPLACE | |
file_name: strings/regex.go | |
line_number: 133 | |
doc: | |
desc: RegexReplace replace every substring matched with the regexp with a given | |
string. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to split. | |
- name: regex | |
type: | |
- String | |
desc: A regular expression search pattern. | |
- name: replacement | |
type: | |
- String | |
desc: The string to replace the search pattern with | |
- name: caseInsensitive | |
type: | |
- Boolean | |
desc: If set to true, the matching will be case-insensitive. the default is | |
false. | |
returns: | |
name: | |
type: | |
- String | |
desc: Returns the string text with the search regex pattern replaced with the | |
replacement string wherever the pattern exists in text | |
- token: ESCAPE_HTML | |
file_name: strings/escape.go | |
line_number: 16 | |
doc: | |
desc: "EscapeHTML escapes special characters like \"<\" to become \"<\". It\ | |
\ escapes only five such characters: <, >, &, ' and \". UnescapeString(EscapeString(s))\ | |
\ == s always holds, but the converse isn't always true." | |
params: | |
- name: string | |
type: | |
- String | |
desc: Uri to escape. | |
returns: | |
name: | |
type: | |
- String | |
desc: Escaped string. | |
- token: SUBSTITUTE | |
file_name: strings/substitute.go | |
line_number: 17 | |
doc: | |
desc: Substitute replaces search values in the string value. | |
params: | |
- name: text | |
type: | |
- String | |
desc: The string to modify | |
- name: search | |
type: | |
- String | |
desc: The string representing a search pattern | |
- name: replace | |
type: | |
- String | |
desc: The string representing a replace value | |
- name: limit | |
type: | |
- Int | |
desc: The cap the number of replacements to this value. | |
returns: | |
name: | |
type: | |
- String | |
desc: Returns a string with replace substring. | |
path: | |
- token: MATCH | |
file_name: path/match.go | |
line_number: 15 | |
doc: | |
desc: Match reports whether name matches the pattern. | |
params: | |
- name: pattern | |
type: | |
- String | |
desc: The pattern. | |
- name: name | |
type: | |
- String | |
desc: The name. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: True if the name mathes the pattern. | |
- token: BASE | |
file_name: path/base.go | |
line_number: 15 | |
doc: | |
desc: Base returns the last component of the path. or the path itself if it does | |
not contain any directory separators. | |
params: | |
- name: path | |
type: | |
- String | |
desc: The path. | |
returns: | |
name: | |
type: | |
- String | |
desc: The last component of the path. | |
- token: CLEAN | |
file_name: path/clean.go | |
line_number: 14 | |
doc: | |
desc: Clean returns the shortest path name equivalent to path. | |
params: | |
- name: path | |
type: | |
- String | |
desc: The path. | |
returns: | |
name: | |
type: | |
- String | |
desc: The shortest path name equivalent to path | |
- token: JOIN | |
file_name: path/join.go | |
line_number: 14 | |
doc: | |
desc: Join joins any number of path elements into a single path, separating them | |
with slashes. | |
params: | |
- name: elem | |
type: | |
- String... | |
- Array<String> | |
desc: The path elements | |
returns: | |
name: | |
type: | |
- String | |
desc: Single path from the given elements. | |
- token: EXT | |
file_name: path/ext.go | |
line_number: 14 | |
doc: | |
desc: Ext returns the extension of the last component of path. | |
params: | |
- name: path | |
type: | |
- String | |
desc: The path. | |
returns: | |
name: | |
type: | |
- String | |
desc: The extension of the last component of path. | |
- token: DIR | |
file_name: path/dir.go | |
line_number: 14 | |
doc: | |
desc: Dir returns the directory component of path. | |
params: | |
- name: path | |
type: | |
- String | |
desc: The path. | |
returns: | |
name: | |
type: | |
- String | |
desc: The directory component of path. | |
- token: IS_ABS | |
file_name: path/is_abs.go | |
line_number: 14 | |
doc: | |
desc: IsAbs reports whether the path is absolute. | |
params: | |
- name: path | |
type: | |
- String | |
desc: The path. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: True if the path is absolute. | |
- token: SEPARATE | |
file_name: path/separate.go | |
line_number: 14 | |
doc: | |
desc: Separate separates the path into a directory and filename component. | |
params: | |
- name: path | |
type: | |
- String | |
desc: The path | |
returns: | |
name: | |
type: | |
- Array | |
desc: First item is a directory component, and second is a filename component. | |
html: | |
- token: ELEMENT_EXISTS | |
file_name: html/element_exists.go | |
line_number: 13 | |
doc: | |
desc: ELEMENT_EXISTS returns a boolean value indicating whether there is an element | |
matched by selector. | |
params: | |
- name: docOrEl | |
type: | |
- HTMLDocument | |
- HTMLNode | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String | |
desc: Css selector. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: A boolean value indicating whether there is an element matched by selector. | |
- token: BLUR | |
file_name: html/blur.go | |
line_number: 13 | |
doc: | |
desc: BLUR Calls blur on the element. | |
params: | |
- name: target | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Target node. | |
- name: selector | |
type: | |
- String, optional | |
desc: Optional css selector. | |
returns: | |
- token: INNER_TEXT_ALL | |
file_name: html/get_inner_text_all.go | |
line_number: 15 | |
doc: | |
desc: INNER_TEXT_ALL returns an array of inner text of matched elements. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
- HTMLElement | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String | |
desc: String of css selector. | |
returns: | |
name: | |
type: | |
- String | |
desc: An array of inner text if any element found, otherwise empty array. | |
- token: ELEMENTS | |
file_name: html/elements.go | |
line_number: 14 | |
doc: | |
desc: ELEMENTS finds HTML elements by a given CSS selector. Returns an empty array | |
if element not found. | |
params: | |
- name: docOrEl | |
type: | |
- HTMLDocument | |
- HTMLNode | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String | |
desc: Css selector. | |
returns: | |
name: | |
type: | |
- Array | |
desc: Returns an array of found html element. | |
- token: WAIT_ELEMENT | |
file_name: html/wait_element.go | |
line_number: 16 | |
doc: | |
desc: WAIT_ELEMENT waits for element to appear in the DOM. Stops the execution | |
until it finds an element or operation times out. | |
params: | |
- name: n | |
type: | |
- HTMLDocument | |
desc: Driver htmldocument. | |
- name: selector | |
type: | |
- String | |
desc: Target element's selector. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. default 5000 ms. | |
returns: | |
- token: WAIT_NO_ELEMENT | |
file_name: html/wait_element.go | |
line_number: 25 | |
doc: | |
desc: WAIT_NO_ELEMENT waits for element to disappear in the DOM. Stops the execution | |
until it does not find an element or operation times out. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Driver htmldocument. | |
- name: selector | |
type: | |
- String | |
desc: Target element's selector. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. default 5000 ms. | |
returns: | |
- token: NAVIGATE_BACK | |
file_name: html/navigate_back.go | |
line_number: 18 | |
doc: | |
desc: NAVIGATE_BACK navigates a given page back within its navigation history. | |
The operation blocks the execution until the page gets loaded. If the history | |
is empty, the function returns FALSE. | |
params: | |
- name: page | |
type: | |
- HTMLPage | |
desc: Target page. | |
- name: entry | |
type: | |
- Int, optional | |
desc: Optional value indicating how many pages to skip. default 1. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. default is 5000. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if history exists and the operation succeeded, otherwise | |
false. | |
- token: INPUT_CLEAR | |
file_name: html/clear.go | |
line_number: 13 | |
doc: | |
desc: INPUT_CLEAR clears a value from an underlying input element. | |
params: | |
- name: source | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Event target. | |
- name: selector | |
type: | |
- String, options | |
desc: Selector. | |
returns: | |
- token: SELECT | |
file_name: html/select.go | |
line_number: 15 | |
doc: | |
desc: SELECT selects a value from an underlying select element. | |
params: | |
- name: source | |
type: | |
- Open | |
- GetElement | |
desc: Event target. | |
- name: valueOrSelector | |
type: | |
- String | |
- Array<String> | |
desc: Selector or a an array of strings as a value. | |
- name: value | |
type: | |
- Array<String | |
desc: Target value. optional. | |
returns: | |
name: | |
type: | |
- Array<String> | |
desc: Returns an array of selected values. | |
- token: WAIT_NAVIGATION | |
file_name: html/wait_navigation.go | |
line_number: 21 | |
doc: | |
desc: WAIT_NAVIGATION waits for a given page to navigate to a new url. Stops the | |
execution until the navigation ends or operation times out. | |
params: | |
- name: page | |
type: | |
- HTMLPage | |
desc: Target page. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. default 5000 ms. | |
returns: | |
- token: PDF | |
file_name: html/pdf.go | |
line_number: 42 | |
doc: | |
desc: PDF prints a PDF of the current page. | |
params: | |
- name: target | |
type: | |
- HTMLPage | |
- String | |
desc: Target page or url. | |
- name: "params (Object) - Optional, An object containing the following properties\ | |
\ : Landscape (Bool) - Paper orientation. Defaults to false. DisplayHeaderFooter\ | |
\ (Bool) - Display header and footer. Defaults to false. PrintBackground (Bool)\ | |
\ - Print background graphics. Defaults to false. Scale (Float64) - Scale\ | |
\ of the webpage rendering. Defaults to 1. PaperWidth (Float64) - Paper width\ | |
\ in inches. Defaults to 8.5 inches. PaperHeight (Float64) - Paper height\ | |
\ in inches. Defaults to 11 inches. MarginTop (Float64) - Top margin in inches.\ | |
\ Defaults to 1cm (~0.4 inches). MarginBottom (Float64) - Bottom margin in\ | |
\ inches. Defaults to 1cm (~0.4 inches). MarginLeft (Float64) - Left margin\ | |
\ in inches. Defaults to 1cm (~0.4 inches). MarginRight (Float64) - Right\ | |
\ margin in inches. Defaults to 1cm (~0.4 inches). PageRanges (String) - Paper\ | |
\ ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which\ | |
\ means print all pages. IgnoreInvalidPageRanges (Bool) - to silently ignore\ | |
\ invalid but successfully parsed page ranges, such as '3-2'. Defaults to\ | |
\ false. HeaderTemplate (String) - HTML template for the print header. Should\ | |
\ be valid HTML markup with following classes used to inject printing values\ | |
\ into them: - `date`: formatted print date - `title`: document title - `url`:\ | |
\ document location - `pageNumber`: current page number - `totalPages`: total\ | |
\ pages in the document For example, `<span class=title></span>` would generate\ | |
\ span containing the title. FooterTemplate (String) - HTML template for the\ | |
\ print footer. Should use the same format as the `headerTemplate`. PreferCSSPageSize" | |
type: | |
- Bool | |
desc: Whether or not to prefer page size as defined by css. defaults to false, | |
in which case the content will be scaled to fit the paper size. * | |
returns: | |
name: | |
type: | |
- Binary | |
desc: Returns a base64 encoded string in binary format. | |
- token: PAGINATION | |
file_name: html/pagination.go | |
line_number: 16 | |
doc: | |
desc: PAGINATION creates an iterator that goes through pages using CSS selector. | |
The iterator starts from the current page i.e. it does not change the page on | |
1st iteration. That allows you to keep scraping logic inside FOR loop. | |
params: | |
- name: doc | |
type: | |
- Open | |
desc: Target document. | |
- name: selector | |
type: | |
- String | |
desc: Css selector for a pagination on the page. | |
returns: | |
- token: STYLE_GET | |
file_name: html/style_get.go | |
line_number: 14 | |
doc: | |
desc: STYLE_GET gets single or more style attribute value(s) of a given element. | |
params: | |
- name: el | |
type: | |
- HTMLElement | |
desc: Target element. | |
- name: names | |
type: | |
- '...String' | |
desc: Style name(s). | |
returns: | |
name: | |
type: | |
- Object | |
desc: Key-value pairs of style values. | |
- token: SCROLL | |
file_name: html/scroll_xy.go | |
line_number: 16 | |
doc: | |
desc: SCROLL scrolls by given coordinates. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Html document. | |
- name: x | |
type: | |
- Int | |
- Float | |
desc: X coordinate. | |
- name: y | |
type: | |
- Int | |
- Float | |
desc: Y coordinate. | |
- name: options | |
type: | |
- ScrollOptions | |
desc: Scroll options. optional. | |
returns: | |
- token: ATTR_REMOVE | |
file_name: html/attr_remove.go | |
line_number: 14 | |
doc: | |
desc: ATTR_REMOVE removes single or more attribute(s) of a given element. | |
params: | |
- name: el | |
type: | |
- HTMLElement | |
desc: Target element. | |
- name: names | |
type: | |
- '...String' | |
desc: Attribute name(s). | |
returns: | |
- token: ATTR_SET | |
file_name: html/attr_set.go | |
line_number: 15 | |
doc: | |
desc: ATTR_SET sets or updates a single or more attribute(s) of a given element. | |
params: | |
- name: el | |
type: | |
- HTMLElement | |
desc: Target element. | |
- name: nameOrObj | |
type: | |
- String | |
- Object | |
desc: Attribute name or an object representing a key-value pair of attributes. | |
- name: value | |
type: | |
- String | |
desc: If a second parameter is a string value, this parameter represent an attribute | |
value. | |
returns: | |
- token: WAIT_STYLE | |
file_name: html/wait_style.go | |
line_number: 12 | |
doc: | |
desc: WAIT_STYLE | |
params: [] | |
returns: | |
- token: WAIT_NO_STYLE | |
file_name: html/wait_style.go | |
line_number: 17 | |
doc: | |
desc: WAIT_NO_STYLE | |
params: [] | |
returns: | |
- token: WAIT_ATTR_ALL | |
file_name: html/wait_attr_all.go | |
line_number: 17 | |
doc: | |
desc: WAIT_ATTR_ALL waits for an attribute to appear on all matched elements with | |
a given value. Stops the execution until the navigation ends or operation times | |
out. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Parent document. | |
- name: selector | |
type: | |
- String | |
desc: String of css selector. | |
- name: class | |
type: | |
- String | |
desc: String of target css class. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. | |
returns: | |
- token: WAIT_NO_ATTR_ALL | |
file_name: html/wait_attr_all.go | |
line_number: 27 | |
doc: | |
desc: WAIT_NO_ATTR_ALL waits for an attribute to disappear on all matched elements | |
by a given value. Stops the execution until the navigation ends or operation | |
times out. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Parent document. | |
- name: selector | |
type: | |
- String | |
desc: String of css selector. | |
- name: class | |
type: | |
- String | |
desc: String of target css class. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. | |
returns: | |
- token: COOKIE_DEL | |
file_name: html/cookie_del.go | |
line_number: 14 | |
doc: | |
desc: COOKIE_DEL gets a cookie from a given page by name. | |
params: | |
- name: page | |
type: | |
- HTMLPage | |
desc: Target page. | |
- name: cookie | |
type: | |
- '...HTTPCookie' | |
- String | |
desc: Cookie or cookie name to delete. | |
returns: | |
- token: HOVER | |
file_name: html/hover.go | |
line_number: 15 | |
doc: | |
desc: HOVER fetches an element with selector, scrolls it into view if needed, | |
and then uses page.mouse to hover over the center of the element. If there's | |
no element matching selector, the method returns an error. | |
params: | |
- name: docOrEl | |
type: | |
- HTMLDocument | |
- HTMLElement | |
desc: Target document or element. | |
- name: selector | |
type: | |
- String, options | |
desc: If document is passed, this param must represent an element selector. | |
returns: | |
- token: INNER_HTML | |
file_name: html/get_inner_html.go | |
line_number: 15 | |
doc: | |
desc: INNER_HTML returns inner HTML string of a given or matched by CSS selector | |
element | |
params: | |
- name: doc | |
type: | |
- Open | |
- GetElement | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String, optional | |
desc: String of css selector. | |
returns: | |
name: | |
type: | |
- String | |
desc: Inner html string if an element found, otherwise empty string. | |
- token: INNER_HTML_SET | |
file_name: html/set_inner_html.go | |
line_number: 15 | |
doc: | |
desc: INNER_HTML_SET sets inner HTML string to a given or matched by CSS selector | |
element | |
params: | |
- name: doc | |
type: | |
- Open | |
- GetElement | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String, optional | |
desc: String of css selector. | |
- name: innerHTML | |
type: | |
- String | |
desc: String of inner html. | |
returns: | |
- token: ELEMENTS_COUNT | |
file_name: html/elements_count.go | |
line_number: 14 | |
doc: | |
desc: ELEMENTS_COUNT returns a number of found HTML elements by a given CSS selector. | |
Returns an empty array if element not found. | |
params: | |
- name: docOrEl | |
type: | |
- HTMLDocument | |
- HTMLNode | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String | |
desc: Css selector. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A number of found html elements by a given css selector. | |
- token: NAVIGATE_FORWARD | |
file_name: html/navigate_forward.go | |
line_number: 18 | |
doc: | |
desc: NAVIGATE_FORWARD navigates a given page forward within its navigation history. | |
The operation blocks the execution until the page gets loaded. If the history | |
is empty, the function returns FALSE. | |
params: | |
- name: page | |
type: | |
- HTMLPage | |
desc: Target page. | |
- name: entry | |
type: | |
- Int, optional | |
desc: Optional value indicating how many pages to skip. default 1. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. default is 5000. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if history exists and the operation succeeded, otherwise | |
false. | |
- token: MOUSE | |
file_name: html/mouse_xy.go | |
line_number: 15 | |
doc: | |
desc: MOUSE moves mouse by given coordinates. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Html document. | |
- name: x | |
type: | |
- Int | |
- Float | |
desc: X coordinate. | |
- name: y | |
type: | |
- Int | |
- Float | |
desc: Y coordinate. | |
returns: | |
- token: SCREENSHOT | |
file_name: html/screenshot.go | |
line_number: 22 | |
doc: | |
desc: SCREENSHOT takes a screenshot of a given page. | |
params: | |
- name: target | |
type: | |
- HTMLPage | |
- String | |
desc: Target page or url. | |
- name: 'params (Object) - Optional, An object containing the following properties | |
: x (Float|Int) - Optional, X position of the viewport. x (Float|Int) - Optional,Y | |
position of the viewport. width (Float|Int) - Optional, Width of the viewport. | |
height (Float|Int) - Optional, Height of the viewport. format (String) - Optional, | |
Either "jpeg" or "png". quality' | |
type: | |
- Int | |
desc: Optional, quality, in [0, 100], only for jpeg format. | |
returns: | |
name: | |
type: | |
- Binary | |
desc: Returns a base64 encoded string in binary format. | |
- token: STYLE_REMOVE | |
file_name: html/style_remove.go | |
line_number: 14 | |
doc: | |
desc: STYLE_REMOVE removes single or more style attribute value(s) of a given | |
element. | |
params: | |
- name: el | |
type: | |
- HTMLElement | |
desc: Target element. | |
- name: names | |
type: | |
- '...String' | |
desc: Style name(s). | |
returns: | |
- token: WAIT_CLASS | |
file_name: html/wait_class.go | |
line_number: 20 | |
doc: | |
desc: WAIT_CLASS waits for a class to appear on a given element. Stops the execution | |
until the navigation ends or operation times out. | |
params: | |
- name: node | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Target node. | |
- name: selectorOrClass | |
type: | |
- String | |
desc: If document is passed, this param must represent an element selector. | |
otherwise target class. | |
- name: classOrTimeout | |
type: | |
- String | |
- Int, optional | |
desc: If document is passed, this param must represent target class name. otherwise | |
timeout. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: If document is passed, this param must represent timeout. otherwise not | |
passed. | |
returns: | |
- token: WAIT_NO_CLASS | |
file_name: html/wait_class.go | |
line_number: 33 | |
doc: | |
desc: WAIT_NO_CLASS waits for a class to disappear on a given element. Stops the | |
execution until the navigation ends or operation times out. | |
params: | |
- name: node | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Target node. | |
- name: selectorOrClass | |
type: | |
- String | |
desc: If document is passed, this param must represent an element selector. | |
otherwise target class. | |
- name: classOrTimeout | |
type: | |
- String | |
- Int, optional | |
desc: If document is passed, this param must represent target class name. otherwise | |
timeout. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: If document is passed, this param must represent timeout. otherwise not | |
passed. | |
returns: | |
- token: SCROLL_TOP | |
file_name: html/scroll_top.go | |
line_number: 13 | |
doc: | |
desc: SCROLL_TOP scrolls the document's window to its top. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Target document. | |
- name: options | |
type: | |
- ScrollOptions | |
desc: Scroll options. optional. | |
returns: | |
- token: INNER_TEXT | |
file_name: html/get_inner_text.go | |
line_number: 15 | |
doc: | |
desc: INNER_TEXT returns inner text string of a given or matched by CSS selector | |
element | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
- HTMLElement | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String, optional | |
desc: String of css selector. | |
returns: | |
name: | |
type: | |
- String | |
desc: Inner text if an element found, otherwise empty string. | |
- token: ATTR_GET | |
file_name: html/attr_get.go | |
line_number: 14 | |
doc: | |
desc: ATTR_GET gets single or more attribute(s) of a given element. | |
params: | |
- name: el | |
type: | |
- HTMLElement | |
desc: Target element. | |
- name: names | |
type: | |
- '...String' | |
desc: Attribute name(s). | |
returns: | |
name: | |
type: | |
- Object | |
desc: Key-value pairs of attribute values. | |
- token: FOCUS | |
file_name: html/focus.go | |
line_number: 13 | |
doc: | |
desc: FOCUS Sets focus on the element. | |
params: | |
- name: target | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Target node. | |
- name: selector | |
type: | |
- String, optional | |
desc: Optional css selector. | |
returns: | |
- token: INNER_HTML_ALL | |
file_name: html/get_inner_html_all.go | |
line_number: 15 | |
doc: | |
desc: INNER_HTML_ALL returns an array of inner HTML strings of matched elements. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
- HTMLElement | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String | |
desc: String of css selector. | |
returns: | |
name: | |
type: | |
- String | |
desc: An array of inner html strings if any element found, otherwise empty array. | |
- token: SCROLL_BOTTOM | |
file_name: html/scroll_bottom.go | |
line_number: 13 | |
doc: | |
desc: SCROLL_BOTTOM scrolls the document's window to its bottom. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Target document. | |
- name: options | |
type: | |
- ScrollOptions | |
desc: Scroll options. optional. | |
returns: | |
- token: COOKIE_SET | |
file_name: html/cookie_set.go | |
line_number: 13 | |
doc: | |
desc: COOKIE_SET sets cookies to a given page | |
params: | |
- name: page | |
type: | |
- HTMLPage | |
desc: Target page. | |
- name: cookie... | |
type: | |
- HTTPCookie | |
desc: Target cookies. | |
returns: | |
- token: WAIT_CLASS_ALL | |
file_name: html/wait_class_all.go | |
line_number: 17 | |
doc: | |
desc: WAIT_CLASS_ALL waits for a class to appear on all matched elements. Stops | |
the execution until the navigation ends or operation times out. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Parent document. | |
- name: selector | |
type: | |
- String | |
desc: String of css selector. | |
- name: class | |
type: | |
- String | |
desc: String of target css class. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. | |
returns: | |
- token: WAIT_NO_CLASS_ALL | |
file_name: html/wait_class_all.go | |
line_number: 27 | |
doc: | |
desc: WAIT_NO_CLASS_ALL waits for a class to disappear on all matched elements. | |
Stops the execution until the navigation ends or operation times out. | |
params: | |
- name: doc | |
type: | |
- HTMLDocument | |
desc: Parent document. | |
- name: selector | |
type: | |
- String | |
desc: String of css selector. | |
- name: class | |
type: | |
- String | |
desc: String of target css class. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. | |
returns: | |
- token: WAIT_STYLE_ALL | |
file_name: html/wait_style_all.go | |
line_number: 12 | |
doc: | |
desc: WAIT_STYLE_ALL | |
params: [] | |
returns: | |
- token: WAIT_NO_STYLE_ALL | |
file_name: html/wait_style_all.go | |
line_number: 17 | |
doc: | |
desc: WAIT_NO_STYLE_ALL | |
params: [] | |
returns: | |
- token: COOKIE_GET | |
file_name: html/cookie_get.go | |
line_number: 14 | |
doc: | |
desc: COOKIE_GET gets a cookie from a given page by name. | |
params: | |
- name: page | |
type: | |
- HTMLPage | |
desc: Target page. | |
- name: name | |
type: | |
- String | |
desc: Cookie or cookie name to delete. | |
returns: | |
- token: XPATH | |
file_name: html/xpath.go | |
line_number: 14 | |
doc: | |
desc: XPATH evaluates the XPath expression. | |
params: | |
- name: source | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Target html object. | |
- name: expression | |
type: | |
- String | |
desc: Xpath expression. | |
returns: | |
name: | |
type: | |
- Value | |
desc: Returns result of a given xpath expression. | |
- token: PARSE | |
file_name: html/parse.go | |
line_number: 26 | |
doc: | |
desc: PARSE loads an HTML page from a given string or byte array | |
params: | |
- name: 'params (Object) - Optional, an object containing the following properties | |
: driver (String) - Optional, driver name. keepCookies (Boolean) - Optional, | |
boolean value indicating whether to use cookies from previous sessions. i.e. | |
not to open a page in the Incognito mode. cookies (HTTPCookies) - Optional, | |
set of HTTP cookies. headers (HTTPHeaders) - Optional, HTTP headers. viewport' | |
type: | |
- Viewport | |
desc: Optional, viewport params. | |
returns: | |
name: | |
type: | |
- HTMLPage | |
desc: Returns parsed and loaded html page. | |
- token: INNER_TEXT_SET | |
file_name: html/set_inner_text.go | |
line_number: 15 | |
doc: | |
desc: INNER_TEXT_SET sets inner text string to a given or matched by CSS selector | |
element | |
params: | |
- name: doc | |
type: | |
- Open | |
- GetElement | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String, optional | |
desc: String of css selector. | |
- name: innerText | |
type: | |
- String | |
desc: String of inner text. | |
returns: | |
- token: ELEMENT | |
file_name: html/element.go | |
line_number: 16 | |
doc: | |
desc: ELEMENT finds an element by a given CSS selector. Returns NONE if element | |
not found. | |
params: | |
- name: docOrEl | |
type: | |
- HTMLDocument | |
- HTMLElement | |
desc: Parent document or element. | |
- name: selector | |
type: | |
- String | |
desc: Css selector. | |
returns: | |
name: | |
type: | |
- HTMLElement | |
- None | |
desc: Returns an htmlelement if found, otherwise none. | |
- token: CLICK | |
file_name: html/click.go | |
line_number: 15 | |
doc: | |
desc: CLICK dispatches click event on a given element | |
params: | |
- name: source | |
type: | |
- Open | |
- GetElement | |
desc: Event source. | |
- name: selectorOrCount | |
type: | |
- String | |
- Int, optional | |
desc: Optional selector or count of clicks. | |
- name: count | |
type: | |
- Int, optional | |
desc: Optional count of clicks. | |
returns: | |
- token: CLICK_ALL | |
file_name: html/click_all.go | |
line_number: 16 | |
doc: | |
desc: CLICK_ALL dispatches click event on all matched element | |
params: | |
- name: source | |
type: | |
- Open | |
desc: Open. | |
- name: selector | |
type: | |
- String | |
desc: Selector. | |
- name: count | |
type: | |
- Int, optional | |
desc: Optional count of clicks. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if matched at least one element. | |
- token: DOWNLOAD | |
file_name: html/download.go | |
line_number: 15 | |
doc: | |
desc: Download downloads a resource from the given GetURL. | |
params: | |
- name: GetURL | |
type: | |
- String | |
desc: Geturl to download. | |
returns: | |
name: | |
type: | |
- Binary | |
desc: Returns a base64 encoded string in binary format. | |
- token: INPUT | |
file_name: html/input.go | |
line_number: 16 | |
doc: | |
desc: INPUT types a value to an underlying input element. | |
params: | |
- name: source | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Event target. | |
- name: valueOrSelector | |
type: | |
- String | |
desc: Selector or a value. | |
- name: value | |
type: | |
- String | |
desc: Target value. | |
- name: delay | |
type: | |
- Int, optional | |
desc: Target value. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Returns true if an element was found. | |
- token: NAVIGATE | |
file_name: html/navigate.go | |
line_number: 17 | |
doc: | |
desc: NAVIGATE navigates a given page to a new resource. The operation blocks | |
the execution until the page gets loaded. Which means there is no need in WAIT_NAVIGATION | |
function. | |
params: | |
- name: page | |
type: | |
- HTMLPage | |
desc: Target page. | |
- name: url | |
type: | |
- String | |
desc: Target url to navigate. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. default is 5000. | |
returns: | |
- token: STYLE_SET | |
file_name: html/style_set.go | |
line_number: 15 | |
doc: | |
desc: STYLE_SET sets or updates a single or more style attribute value of a given | |
element. | |
params: | |
- name: el | |
type: | |
- HTMLElement | |
desc: Target element. | |
- name: nameOrObj | |
type: | |
- String | |
- Object | |
desc: Style name or an object representing a key-value pair of attributes. | |
- name: value | |
type: | |
- String | |
desc: If a second parameter is a string value, this parameter represent a style | |
value. | |
returns: | |
- token: WAIT_ATTR | |
file_name: html/wait_attr.go | |
line_number: 17 | |
doc: | |
desc: WAIT_ATTR waits until a target attribute's value appears | |
params: | |
- name: node | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Parent document. | |
- name: attrNameOrSelector | |
type: | |
- String | |
desc: String of an attr name or css selector. | |
- name: attrValueOrAttrName | |
type: | |
- String | |
- Any | |
desc: Attr value or name. | |
- name: attrValueOrTimeout | |
type: | |
- Any | |
- Int, optional | |
desc: Attr value or an optional timeout. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. | |
returns: | |
- token: WAIT_NO_ATTR | |
file_name: html/wait_attr.go | |
line_number: 27 | |
doc: | |
desc: WAIT_NO_ATTR waits until a target attribute's value disappears | |
params: | |
- name: node | |
type: | |
- HTMLPage | |
- HTMLDocument | |
- HTMLElement | |
desc: Parent document. | |
- name: attrNameOrSelector | |
type: | |
- String | |
desc: String of an attr name or css selector. | |
- name: attrValueOrAttrName | |
type: | |
- String | |
- Any | |
desc: Attr value or name. | |
- name: attrValueOrTimeout | |
type: | |
- Any | |
- Int, optional | |
desc: Attr value or an optional timeout. | |
- name: timeout | |
type: | |
- Int, optional | |
desc: Optional timeout. | |
returns: | |
- token: DOCUMENT | |
file_name: html/document.go | |
line_number: 32 | |
doc: | |
desc: DOCUMENT opens an HTML page by a given url. By default, loads a page by | |
http call - resulted page does not support any interactions. | |
params: | |
- name: 'params (Object) - Optional, An object containing the following properties | |
: driver (String) - Optional, driver name. timeout (Int) - Optional, timeout. | |
userAgent (String) - Optional, user agent. keepCookies (Boolean) - Optional, | |
boolean value indicating whether to use cookies from previous sessions. i.e. | |
not to open a page in the Incognito mode. cookies (HTTPCookies) - Optional, | |
set of HTTP cookies. headers (HTTPHeaders) - Optional, HTTP headers. viewport' | |
type: | |
- Viewport | |
desc: Optional, viewport params. | |
returns: | |
name: | |
type: | |
- HTMLPage | |
desc: Returns loaded html page. | |
- token: SCROLL_ELEMENT | |
file_name: html/scroll_element.go | |
line_number: 17 | |
doc: | |
desc: SCROLL_ELEMENT scrolls an element on. | |
params: | |
- name: docOrEl | |
type: | |
- HTMLDocument | |
- HTMLElement | |
desc: Target document or element. | |
- name: selector | |
type: | |
- String | |
desc: If document is passed, this param must represent an element selector. | |
- name: options | |
type: | |
- ScrollOptions | |
desc: Scroll options. optional. | |
returns: | |
arrays: | |
- token: FIRST | |
file_name: arrays/first.go | |
line_number: 13 | |
doc: | |
desc: First returns a first element from a given array. | |
params: | |
- name: arr | |
type: | |
- Array | |
desc: Target array. | |
returns: | |
name: | |
type: | |
- Value | |
desc: First element in a given array. | |
- token: REMOVE_VALUE | |
file_name: arrays/remove_value.go | |
line_number: 16 | |
doc: | |
desc: RemoveValue returns a new array with removed all occurrences of value in | |
a given array. Optionally with a limit to the number of removals. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Source array. | |
- name: value | |
type: | |
- Value | |
desc: Target value. | |
- name: limit | |
type: | |
- Int, optional | |
desc: A limit to the number of removals. | |
returns: | |
name: | |
type: | |
- Array | |
desc: A new array with removed all occurrences of value in a given array. | |
- token: INTERSECTION | |
file_name: arrays/intersection.go | |
line_number: 15 | |
doc: | |
desc: Intersection return the intersection of all arrays specified. The result | |
is an array of values that occur in all arguments. | |
params: | |
- name: arrays | |
type: | |
- Array, repeated | |
desc: An arbitrary number of arrays as multiple arguments (at least 2). | |
returns: | |
name: | |
type: | |
- Array | |
desc: A single array with only the elements, which exist in all provided arrays. | |
the element order is random. duplicates are removed. | |
- token: FLATTEN | |
file_name: arrays/flatten.go | |
line_number: 18 | |
doc: | |
desc: Flatten turn an array of arrays into a flat array. All array elements in | |
array will be expanded in the result array. Non-array elements are added as | |
they are. The function will recurse into sub-arrays up to the specified depth. | |
Duplicates will not be removed. | |
params: | |
- name: arr | |
type: | |
- Array | |
desc: Target array. | |
- name: depth | |
type: | |
- Int, optional | |
desc: Depth level. | |
returns: | |
name: | |
type: | |
- Array | |
desc: Flat array. | |
- token: SORTED_UNIQUE | |
file_name: arrays/sorted_unique.go | |
line_number: 15 | |
doc: | |
desc: SortedUnique sorts all elements in anyArray. The function will use the default | |
comparison order for FQL value types. Additionally, the values in the result | |
array will be made unique | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Target array. | |
returns: | |
name: | |
type: | |
- Array | |
desc: Sorted array. | |
- token: SHIFT | |
file_name: arrays/shift.go | |
line_number: 13 | |
doc: | |
desc: Shift returns a new array without the first element. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Target array. | |
returns: | |
name: | |
type: | |
- Array | |
desc: Copy of an array without the first element. | |
- token: UNSHIFT | |
file_name: arrays/unshift.go | |
line_number: 16 | |
doc: | |
desc: Unshift prepends value to a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Target array. | |
- name: value | |
type: | |
- Value | |
desc: Target value to prepend. | |
- name: unique | |
type: | |
- Boolean, optional | |
desc: Optional value indicating whether a value must be unique to be prepended. | |
default is false. | |
returns: | |
name: | |
type: | |
- Array | |
desc: New array with prepended value. | |
- token: POSITION | |
file_name: arrays/position.go | |
line_number: 14 | |
doc: | |
desc: Position returns a value indicating whether an element is contained in array. | |
Optionally returns its position. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: The source array. | |
- name: value | |
type: | |
- Value | |
desc: The target value. | |
- name: returnIndex | |
type: | |
- Boolean, optional | |
desc: Read which indicates whether to return item's position. | |
returns: | |
- token: POP | |
file_name: arrays/pop.go | |
line_number: 13 | |
doc: | |
desc: Pop returns a new array without last element. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Target array. | |
returns: | |
name: | |
type: | |
- Array | |
desc: Copy of an array without last element. | |
- token: PUSH | |
file_name: arrays/push.go | |
line_number: 15 | |
doc: | |
desc: Push create a new array with appended value. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Source array. | |
- name: value | |
type: | |
- Value | |
desc: Target value. | |
- name: unique | |
type: | |
- Boolean, optional | |
desc: Read indicating whether to do uniqueness check. | |
returns: | |
name: | |
type: | |
- Array | |
desc: A new array with appended value. | |
- token: SLICE | |
file_name: arrays/slice.go | |
line_number: 15 | |
doc: | |
desc: Slice returns a new sliced array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Source array. | |
- name: start | |
type: | |
- Int | |
desc: Start position of extraction. | |
- name: length | |
type: | |
- Int, optional | |
desc: Read indicating how many elements to extract. | |
returns: | |
name: | |
type: | |
- Array | |
desc: Sliced array. | |
- token: UNIQUE | |
file_name: arrays/unique.go | |
line_number: 13 | |
doc: | |
desc: Unique returns all unique elements from a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Target array. | |
returns: | |
name: | |
type: | |
- Array | |
desc: New array without duplicates. | |
- token: OUTERSECTION | |
file_name: arrays/outersection.go | |
line_number: 12 | |
doc: | |
desc: Outersection return the values that occur only once across all arrays specified. | |
params: | |
- name: arrays | |
type: | |
- Array, repeated | |
desc: An arbitrary number of arrays as multiple arguments (at least 2). | |
returns: | |
name: | |
type: | |
- Array | |
desc: A single array with only the elements that exist only once across all | |
provided arrays. the element order is random. | |
- token: SORTED | |
file_name: arrays/sorted.go | |
line_number: 14 | |
doc: | |
desc: Sorted sorts all elements in anyArray. The function will use the default | |
comparison order for FQL value types. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Target array. | |
returns: | |
name: | |
type: | |
- Array | |
desc: Sorted array. | |
- token: REMOVE_VALUES | |
file_name: arrays/remove_values.go | |
line_number: 14 | |
doc: | |
desc: RemoveValues returns a new array with removed all occurrences of values | |
in a given array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Source array. | |
- name: values | |
type: | |
- Array | |
desc: Target values. | |
returns: | |
name: | |
type: | |
- Array | |
desc: A new array with removed all occurrences of values in a given array. | |
- token: MINUS | |
file_name: arrays/minus.go | |
line_number: 14 | |
doc: | |
desc: Minus return the difference of all arrays specified. | |
params: | |
- name: arrays | |
type: | |
- Array, repeated | |
desc: An arbitrary number of arrays as multiple arguments (at least 2). | |
returns: | |
name: | |
type: | |
- Array | |
desc: An array of values that occur in the first array, but not in any of the | |
subsequent arrays. the order of the result array is undefined and should not | |
be relied on. duplicates will be removed. | |
- token: LAST | |
file_name: arrays/last.go | |
line_number: 13 | |
doc: | |
desc: Last returns the last element of an array. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: The target array. | |
returns: | |
name: | |
type: | |
- Value | |
desc: Last element of an array. | |
- token: REMOVE_NTH | |
file_name: arrays/remove_nth.go | |
line_number: 14 | |
doc: | |
desc: RemoveNth returns a new array without an element by a given position. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: Source array. | |
- name: position | |
type: | |
- Int | |
desc: Target element position. | |
returns: | |
name: | |
type: | |
- Array | |
desc: A new array without an element by a given position. | |
- token: NTH | |
file_name: arrays/nth.go | |
line_number: 16 | |
doc: | |
desc: Nth returns the element of an array at a given position. It is the same | |
as anyArray[position] for positive positions, but does not support negative | |
positions. | |
params: | |
- name: array | |
type: | |
- Array | |
desc: An array with elements of arbitrary type. | |
- name: index | |
type: | |
- Int | |
desc: Position of desired element in array, positions start at 0. | |
returns: | |
name: | |
type: | |
- Value | |
desc: The array element at the given position. if position is negative or beyond | |
the upper bound of the array, then none will be returned. | |
- token: APPEND | |
file_name: arrays/append.go | |
line_number: 15 | |
doc: | |
desc: Append appends a new item to an array and returns a new array with a given | |
element. If ``uniqueOnly`` is set to true, then will add the item only if it's | |
unique. | |
params: | |
- name: arr | |
type: | |
- Array | |
desc: Target array. | |
- name: item | |
type: | |
- Value | |
desc: Target value to add. | |
returns: | |
name: | |
type: | |
- Array | |
desc: New array. | |
- token: UNION | |
file_name: arrays/union.go | |
line_number: 13 | |
doc: | |
desc: Union returns the union of all passed arrays. | |
params: | |
- name: arrays | |
type: | |
- Array, repeated | |
desc: List of arrays to combine. | |
returns: | |
name: | |
type: | |
- Array | |
desc: All array elements combined in a single array, in any order. | |
datetime: | |
- token: DATE_DAYOFWEEK | |
file_name: datetime/dayofweek.go | |
line_number: 13 | |
doc: | |
desc: DateDayOfWeek returns number of the weekday from the date. Sunday is the | |
0th day of week. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: Return number of the weekday. | |
- token: DATE_YEAR | |
file_name: datetime/year.go | |
line_number: 13 | |
doc: | |
desc: DateYear returns the year extracted from the given date. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A year number. | |
- token: DATE_MILLISECOND | |
file_name: datetime/millisecond.go | |
line_number: 13 | |
doc: | |
desc: DateMillisecond returns the millisecond of date as a number. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A millisecond number. | |
- token: DATE_DIFF | |
file_name: datetime/diff.go | |
line_number: 16 | |
doc: | |
desc: DateDiff returns the difference between two dates in given time unit. | |
params: | |
- name: date1 | |
type: | |
- DateTime | |
desc: First datetime. | |
- name: date2 | |
type: | |
- DateTime | |
desc: Second datetime. | |
- name: unit | |
type: | |
- String | |
desc: Time unit to return the difference in. | |
- name: asFloat | |
type: | |
- Boolean, optional | |
desc: If true amount of unit will be as float. | |
returns: | |
name: | |
type: | |
- Int, Float | |
desc: Difference between date1 and date2. | |
- token: DATE_HOUR | |
file_name: datetime/hour.go | |
line_number: 13 | |
doc: | |
desc: DateHour returns the hour of date as a number. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A hour number. | |
- token: DATE_SECOND | |
file_name: datetime/second.go | |
line_number: 13 | |
doc: | |
desc: DateSecond returns the second of date as a number. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A second number. | |
- token: DateCompare | |
file_name: datetime/compare.go | |
line_number: 17 | |
doc: | |
desc: DateCompare check if two partial dates match. | |
params: | |
- name: date1, date2 | |
type: | |
- DateTime | |
desc: Comparable dates. | |
- name: unitRangeStart | |
type: | |
- String | |
desc: Unit to start from. | |
- name: unitRangeEnd | |
type: | |
- String, Optional | |
desc: Unit to end with. error will be returned if unitrangestart unit less that | |
unitrangeend. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: True if the dates match, else false. | |
- token: DATE_ADD | |
file_name: datetime/add_subtract.go | |
line_number: 30 | |
doc: | |
desc: DateAdd add amount given in unit to date. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source date. | |
- name: amount | |
type: | |
- Int | |
desc: Amount of units | |
- name: unit | |
type: | |
- String | |
desc: Unit. | |
returns: | |
name: | |
type: | |
- DateTime | |
desc: 'Calculated date. the following units are available: * y, year, year * | |
m, month, months * w, week, weeks * d, day, days * h, hour, hours * i, minute, | |
minutes * s, second, seconds * f, millisecond, milliseconds' | |
- token: DATE_SUBTRACT | |
file_name: datetime/add_subtract.go | |
line_number: 60 | |
doc: | |
desc: DateSubtract subtract amount given in unit to date. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source date. | |
- name: amount | |
type: | |
- Int | |
desc: Amount of units | |
- name: unit | |
type: | |
- String | |
desc: Unit. | |
returns: | |
name: | |
type: | |
- DateTime | |
desc: 'Calculated date. the following units are available: * y, year, year * | |
m, month, months * w, week, weeks * d, day, days * h, hour, hours * i, minute, | |
minutes * s, second, seconds * f, millisecond, milliseconds' | |
- token: DATE_FORMAT | |
file_name: datetime/format.go | |
line_number: 13 | |
doc: | |
desc: DateFormat format date according to the given format string. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime object. | |
returns: | |
name: | |
type: | |
- String | |
desc: Formatted date. | |
- token: DATE_MONTH | |
file_name: datetime/month.go | |
line_number: 13 | |
doc: | |
desc: DateMonth returns the month of date as a number. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A month number. | |
- token: DATE_MINUTE | |
file_name: datetime/minute.go | |
line_number: 13 | |
doc: | |
desc: DateMinute returns the minute of date as a number. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A minute number. | |
- token: DATE_DAYS_IN_MONTH | |
file_name: datetime/daysinmonth.go | |
line_number: 29 | |
doc: | |
desc: DateDaysInMonth returns the number of days in the month of date. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: Number of the days. | |
- token: DATE_DAY | |
file_name: datetime/day.go | |
line_number: 13 | |
doc: | |
desc: DateDay returns the day of date as a number. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A day number. | |
- token: DATE | |
file_name: datetime/date.go | |
line_number: 14 | |
doc: | |
desc: Date convert RFC3339 date time string to DateTime object. | |
params: | |
- name: timeString | |
type: | |
- String | |
desc: String in rfc3339 format. | |
returns: | |
name: | |
type: | |
- DateTime | |
desc: New datetime object derived from timestring. | |
- token: DATE_LEAPYEAR | |
file_name: datetime/leapyear.go | |
line_number: 13 | |
doc: | |
desc: DateLeapYear returns true if date is in a leap year else false. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Boolean | |
desc: Date is in a leap year. | |
- token: DATE_QUARTER | |
file_name: datetime/quarter.go | |
line_number: 14 | |
doc: | |
desc: DateQuarter returns which quarter date belongs to. | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A quarter number. | |
- token: DATE_DAYOFYEAR | |
file_name: datetime/dayofyear.go | |
line_number: 14 | |
doc: | |
desc: DateDayOfYear returns the day of year number of date. The return value range | |
from 1 to 365 (366 in a leap year). | |
params: | |
- name: date | |
type: | |
- DateTime | |
desc: Source datetime. | |
returns: | |
name: | |
type: | |
- Int | |
desc: A day of year number. | |
- token: NOW | |
file_name: datetime/now.go | |
line_number: 12 | |
doc: | |
desc: Now returns new DateTime object with Time equal to time.Now(). | |
params: [] | |
returns: | |
name: | |
type: | |
- DateTime | |
desc: New datetime object. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment