Detect whether a name is registered or present on some resource, or make search for string on specified resources.
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.
nullwill be passed into callback when no name is specified to check/search.Parameters:
Name Type Argument Description namesArray | String The list of names or a name that should be checked/searched. callbackfunction Function that should be called to process operation's result. settingsObject <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
nullwill be passed into callback when the name is not given or resources with specified names are not found.Parameters:
Name Type Argument Description nameString The name that should be checked/searched. callbackfunction Function that should be called to process operation's result. settingsObject <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 satisfy to specified tags (depending oncheckAllTagssetting) will be checked/searched; see checkResourceTags for detailscheckAllTags-Boolean- whether all tags specified inresourceTagshould be used to select resources; see checkResourceTags for detailssearch-Boolean- whether search should be made instead of check; it is used only whensearchsetting 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_generalfield 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.