Members
Methods
-
<static> search(names, callback, settings)
-
Check existence of each name from the list on specified resources or search for each string on specified resources. Result of checking/searching will be passed into callback as object. Each field of the object is a name that was checked/searched. Value of result's field is object that is returned by searchName function.
null
will be passed into callback when no name is specified to check/search.Parameters:
Name Type Argument Description names
Array | String The list of names or a name that should be checked/searched. callback
function Function that should be called to process operation's result. settings
Object <optional>
Operation settings. See searchName for details. -
<static> searchName(name, callback, settings)
-
Check existence of name or search for given string on specified resources. Result of checking/searching will be passed into callback as object. Each field of the object is name of resource that was checked/searched. Value of result's field is object with the following fields (name - type - description):
name
-String
- resource namedescription
-String
- resource descriptionurl
-String
- URL of resourcequery
-String
- name/string that was checked/searchedresult
-Array
- result that was received from resource; each item in the array is object that represents data about found elementerror
-Object | String
- error that was got while checking resource; this field is present only when there was an error
null
will be passed into callback when the name is not given or resources with specified names are not found.Parameters:
Name Type Argument Description name
String The name that should be checked/searched. callback
function Function that should be called to process operation's result. settings
Object <optional>
Operation settings. The following settings are supported (name - type - description): progressCallback
-Function
- function that should be called after getting result from each resource; object with the following fields will be passed into callback:name
-String
- name that was checked/searchedresource
-String
- resource that was checkedresult
-Object
- result of checking/searching (see above)number
-Integer
- index number of checking/searchingtotal
-Integer
- total number of checks/searcheserror
-Object | String
- error that was got while checking/searching resource; this field is present only when there was an error
resource
-Array | String
- specifies filter for available resources by name; list of names of resources or name of resource (case-insensitive) that should be checked/searchedresourceTag
-Array | String
- specifies filter for available resources by tag; list of tags or tag (case-insensitive) that should be used to select resources; resources that have one or all specified tags (depending oncheckAllTags
setting) will be included checked/searchedcheckAllTags
-Boolean
- specifies (whentrue
) that a resource should be checked/searched only when it has all tags set byresourceTag
settingsearch
-Boolean
- whether search should be made instead of check; it is used only whensearch
setting for a resource is not specified (see below)settings
-Object
- settings for resources usage; fields are resource identifiers, values are objects representing settings for the corresponding resources; value of_general
field can be used to specify settings that should be applied to all resources
resource
) and filter by tag (resourceTag
) can be used separately or together. If no filter is specified, all resources will be checked/searched.