You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-29 22:27:42 +02:00
214 lines
6.4 KiB
Plaintext
Vendored
214 lines
6.4 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 3
|
|
description: Get list of files and other functions to work with Google Drive in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Google Drive]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Get list of files
|
|
Gets the list of files
|
|
|
|
|
|
|
|
`Function GetFilesList(Val Token, Val NameContains = "", Val Directory = "") Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Token | --token | String | ✔ | Token |
|
|
| NameContains | --querry | String | ✖ | Filter by name |
|
|
| Directory | --catalog | String | ✖ | Filter by parent directory ID |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Array of file mappings
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "ya29.a0ATi6K2vCKZGdsROD6p4-PsRwj0R0IJCCgFNKVTrqZmarMewY0YTQB537qkfJ660fM22IAhP9gcaBIfx5DKhOVduDiMzGSG_R5TPqzjZkS0nkthqIOxp27om7j...";
|
|
Directory = "root";
|
|
NameContains = "data";
|
|
|
|
Result = OPI_GoogleDrive.GetFilesList(Token, NameContains, Directory);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint gdrive GetFilesList \
|
|
--token "***" \
|
|
--querry "data" \
|
|
--catalog "root"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint gdrive GetFilesList ^
|
|
--token "***" ^
|
|
--querry "data" ^
|
|
--catalog "root"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
[
|
|
{
|
|
"parents": [
|
|
"0AN2vrbrhqfJrUk9PVA"
|
|
],
|
|
"lastModifyingUser": {
|
|
"displayName": "Антон Титовец",
|
|
"kind": "drive#user",
|
|
"me": true,
|
|
"permissionId": "07468399490707249352",
|
|
"emailAddress": "bayselonarrend@gmail.com",
|
|
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64"
|
|
},
|
|
"owners": [
|
|
{
|
|
"displayName": "Антон Титовец",
|
|
"kind": "drive#user",
|
|
"me": true,
|
|
"permissionId": "07468399490707249352",
|
|
"emailAddress": "bayselonarrend@gmail.com",
|
|
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64"
|
|
}
|
|
],
|
|
"permissions": [
|
|
{
|
|
"kind": "drive#permission",
|
|
"id": "07468399490707249352",
|
|
"type": "user",
|
|
"emailAddress": "bayselonarrend@gmail.com",
|
|
"role": "owner",
|
|
"displayName": "Антон Титовец",
|
|
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64",
|
|
"deleted": false,
|
|
"pendingOwner": false
|
|
}
|
|
],
|
|
"spaces": [
|
|
"drive"
|
|
],
|
|
"capabilities": {
|
|
"canAcceptOwnership": false,
|
|
"canAddChildren": false,
|
|
"canAddMyDriveParent": false,
|
|
"canChangeCopyRequiresWriterPermission": true,
|
|
"canChangeItemDownloadRestriction": true,
|
|
"canChangeSecurityUpdateEnabled": false,
|
|
"canChangeViewersCanCopyContent": true,
|
|
"canComment": true,
|
|
"canCopy": true,
|
|
"canDelete": true,
|
|
"canDisableInheritedPermissions": false,
|
|
"canDownload": true,
|
|
"canEdit": true,
|
|
"canEnableInheritedPermissions": true,
|
|
"canListChildren": false,
|
|
"canModifyContent": true,
|
|
"canModifyContentRestriction": true,
|
|
"canModifyEditorContentRestriction": true,
|
|
"canModifyOwnerContentRestriction": true,
|
|
"canModifyLabels": false,
|
|
"canMoveChildrenWithinDrive": false,
|
|
"canMoveItemIntoTeamDrive": true,
|
|
"canMoveItemOutOfDrive": true,
|
|
"canMoveItemWithinDrive": true,
|
|
"canReadLabels": false,
|
|
"canReadRevisions": true,
|
|
"canRemoveChildren": false,
|
|
"canRemoveContentRestriction": false,
|
|
"canRemoveMyDriveParent": true,
|
|
"canRename": true,
|
|
"canShare": true,
|
|
"canTrash": true,
|
|
"canUntrash": true
|
|
},
|
|
"permissionIds": [
|
|
"07468399490707249352"
|
|
],
|
|
"linkShareMetadata": {
|
|
"securityUpdateEligible": false,
|
|
"securityUpdateEnabled": true
|
|
},
|
|
"downloadRestrictions": {
|
|
"itemDownloadRestriction": {
|
|
"restrictedForReaders": false,
|
|
"restrictedForWriters": false
|
|
},
|
|
"effectiveDownloadRestrictionWithContext": {
|
|
"restrictedForReaders": false,
|
|
"restrictedForWriters": false
|
|
}
|
|
},
|
|
"kind": "drive#file",
|
|
"id": "1NKMmj4SJh3WUw74nhLuMofW7dfpUR520",
|
|
"name": "data.json",
|
|
"mimeType": "application/json",
|
|
"starred": false,
|
|
"trashed": false,
|
|
"explicitlyTrashed": false,
|
|
"version": "19507",
|
|
"webContentLink": "https://drive.google.com/uc?id=1NKMmj4SJh3WUw74nhLuMofW7dfpUR520&export=download",
|
|
"webViewLink": "https://drive.google.com/file/d/1NKMmj4SJh3WUw74nhLuMofW7dfpUR520/view?usp=drivesdk",
|
|
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/json",
|
|
"hasThumbnail": false,
|
|
"thumbnailVersion": "0",
|
|
"viewedByMe": true,
|
|
"viewedByMeTime": "2025-10-30T06:48:30.457Z",
|
|
"createdTime": "2024-02-29T19:22:49.616Z",
|
|
"modifiedTime": "2025-10-30T06:48:30.457Z",
|
|
"modifiedByMeTime": "2025-10-30T06:48:30.457Z",
|
|
"modifiedByMe": true,
|
|
"shared": false,
|
|
"ownedByMe": true,
|
|
"viewersCanCopyContent": true,
|
|
"copyRequiresWriterPermission": false,
|
|
"writersCanShare": true,
|
|
"originalFilename": "data.json",
|
|
"fullFileExtension": "json",
|
|
"fileExtension": "json",
|
|
"md5Checksum": "04021478b44e69f35fa00a9a3db91324",
|
|
"sha1Checksum": "004c0457085c9599106787e9bea0e102e127baac",
|
|
"sha256Checksum": "861f01ed1bc08ce37290e653aa3fce739b54981fb4364459f77eb722c64ef782",
|
|
"size": "20748",
|
|
"quotaBytesUsed": "20748",
|
|
"headRevisionId": "0B92vrbrhqfJrQlVWc05hOThYaXVwVEtMTFYyWHg1UzJ4MENrPQ",
|
|
"isAppAuthorized": false,
|
|
"inheritedPermissionsDisabled": false
|
|
},
|
|
{
|
|
"parents": [
|
|
"0AN2vrbrhqfJrUk9PVA"
|
|
],
|
|
"lastModifyingUser": {
|
|
"displayName": "Антон Титовец",
|
|
"kind": "drive#user",
|
|
"me": true,
|
|
"permissionId": "07468399490707249352",
|
|
"emailAddress": "bayselonarrend@gmail.com",
|
|
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64"
|
|
},
|
|
"owners": [
|
|
{
|
|
"displayName": "Антон Титовец",
|
|
"kind": "drive#user",
|
|
"me": true,
|
|
"permissionId": "07468399490707249352",
|
|
"emailAddress": "bayselonarrend@gmail.com",
|
|
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYttNv2CZ-cTTuE90Zmht_PwnGc0YnjM1IUllXsTVORfZFVPU=s64"
|
|
}
|
|
],
|
|
"permissions": [
|
|
...
|
|
```
|