You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +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.a0AQQ_BDTEToh-GItDaON1RKItxn8oyyucs96C7wzRz-nN6Qcr3d7C5ogtN18HBpUDAewZxDbcc3jAtrj2aIO0zuU4KLYSMRkyFoLt8ZuczyuBGNtxdl-3opaY1...";
|
|
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": "17996",
|
|
"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-14T09:31:19.875Z",
|
|
"createdTime": "2024-02-29T19:22:49.616Z",
|
|
"modifiedTime": "2025-10-14T09:31:19.875Z",
|
|
"modifiedByMeTime": "2025-10-14T09:31:19.875Z",
|
|
"modifiedByMe": true,
|
|
"shared": false,
|
|
"ownedByMe": true,
|
|
"viewersCanCopyContent": true,
|
|
"copyRequiresWriterPermission": false,
|
|
"writersCanShare": true,
|
|
"originalFilename": "data.json",
|
|
"fullFileExtension": "json",
|
|
"fileExtension": "json",
|
|
"md5Checksum": "f0e96b3e25711f0dc4fb1f16967349f3",
|
|
"sha1Checksum": "eb873d10584f87255e042968a530cd16a928a74d",
|
|
"sha256Checksum": "dedf35705a0e46d38e0a64081bd79f11c0fd110bcb042dd87adad391676d70a0",
|
|
"size": "20129",
|
|
"quotaBytesUsed": "20129",
|
|
"headRevisionId": "0B92vrbrhqfJrMGJ6VUhRN01MTUpqRUEvanBmYzZxVXJIMlhFPQ",
|
|
"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": [
|
|
...
|
|
```
|