public function SmartlingApi::getList in TMGMT Translator Smartling 8
Lists recently uploaded files. Returns a maximum of 500 files.
Parameters
string $locale: If not specified, the Smartling Files API will return a listing of the original files matching the specified criteria. When the locale is not specified, completedStringCount will be "0".
array $params: (optional) An associative array of additional options, with the following elements:
- 'uriMask': Returns only files with a URI containing a given string. Case is ignored and % is a wildcard. For example, the value .js%n will match strings.json and STRINGS.JSON but not json.strings.
- 'fileTypes': Identifiers: android, ios, gettext, html, javaProperties, yaml, xliff, xml, json, docx, pptx, xlsx, idml, qt, resx, plaintext, cvs. File types are combined using the logical "OR".
- 'lastUploadedAfter': Returns all files uploaded after the specified date.
- 'lastUploadedBefore': Returns all files uploaded before the specified date.
- 'offset': For result set returns, the offset is a number indicating the distance from the beginning of the list; for example, for a result set of "50" files, you can set the offset at 10 to return files 10 - 50.
- 'limit': For result set returns, limits the number of files returned; for example, for a result set of 50 files, a limit of "10" would return files 0 - 10.
- 'conditions': An array of the following conditions: haveAtLeastOneUnapproved, haveAtLeastOneApproved, haveAtLeastOneTranslated, haveAllTranslated, haveAllApproved, haveAllUnapproved. Conditions are combined using the logical "OR".
- 'orderBy': Sets the name of the parameter to order results by: fileUri, stringCount, wordCount, approvedStringCount, completedStringCount, lastUploaded and fileType. You can specify ascending or descending with each parameter by adding "_asc" or "_desc"; for example, "fileUri_desc". If you do not specify ascending or descending, the default is ascending.
Return value
array List of files objects.
Throws
\Drupal\tmgmt_smartling\Smartling\SmartlingApiException
See also
http://docs.smartling.com/pages/API/FileAPI/List/
File
- src/
Smartling/ SmartlingApi.php, line 315
Class
Namespace
Drupal\tmgmt_smartling\SmartlingCode
public function getList($locale = '', $params = []) {
$params['locale'] = $locale;
return $this
->sendRequest('file/list', $params, 'GET');
}