Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mxrch
GitHub Repository: mxrch/GHunt
Path: blob/master/ghunt/knowledge/drive.py
252 views
1
default_file_capabilities = [
2
'can_block_owner',
3
'can_copy',
4
'can_download',
5
'can_print',
6
'can_read',
7
'can_remove_my_drive_parent'
8
]
9
10
default_folder_capabilities = [
11
'can_block_owner',
12
'can_download',
13
'can_list_children',
14
'can_print',
15
'can_read',
16
'can_remove_my_drive_parent'
17
]
18
19
request_fields = [
20
'copyRequiresWriterPermission',
21
'sourceAppId',
22
'authorizedAppIds',
23
'linkShareMetadata',
24
'teamDriveId',
25
'primaryDomainName',
26
'approvalMetadata',
27
'md5Checksum',
28
'resourceKey',
29
'quotaBytesUsed',
30
'hasChildFolders',
31
'fullFileExtension',
32
'isAppAuthorized',
33
'iconLink',
34
'trashingUser',
35
'title',
36
'recency',
37
'detectors',
38
'exportLinks',
39
'modifiedDate',
40
'copyable',
41
'description',
42
'mimeType',
43
'passivelySubscribed',
44
'videoMediaMetadata',
45
'headRevisionId',
46
'customerId',
47
'fileExtension',
48
'originalFilename',
49
'parents',
50
'imageMediaMetadata',
51
'recencyReason',
52
'folderColorRgb',
53
'createdDate',
54
'labels',
55
'abuseNoticeReason',
56
'webViewLink',
57
'driveId',
58
'ownedByMe',
59
'flaggedForAbuse',
60
'lastModifyingUser',
61
'thumbnailLink',
62
'capabilities',
63
'sharedWithMeDate',
64
'primarySyncParentId',
65
'sharingUser',
66
'version',
67
'permissionsSummary',
68
'actionItems',
69
'labelInfo',
70
'explicitlyTrashed',
71
'shared',
72
'subscribed',
73
'ancestorHasAugmentedPermissions',
74
'writersCanShare',
75
'permissions',
76
'alternateLink',
77
'hasLegacyBlobComments',
78
'id',
79
'userPermission',
80
'hasThumbnail',
81
'lastViewedByMeDate',
82
'fileSize',
83
'kind',
84
'thumbnailVersion',
85
'spaces',
86
'organizationDisplayName',
87
'abuseIsAppealable',
88
'trashedDate',
89
'folderFeatures',
90
'webContentLink',
91
'contentRestrictions',
92
'shortcutDetails',
93
'folderColor',
94
'hasAugmentedPermissions'
95
]
96
97
mime_types = {
98
"application/vnd.google-apps.audio": "Audio 🎧",
99
"application/vnd.google-apps.document": "Google Docs 📝",
100
"application/vnd.google-apps.drive-sdk": "3rd party shortcut ↪️",
101
"application/vnd.google-apps.drawing": "Google Drawing ✏️",
102
"application/vnd.google-apps.file": "Google Drive file 📄",
103
"application/vnd.google-apps.folder": "Google Drive folder 🗂️",
104
"application/vnd.google-apps.form": "Google Forms 👨‍🏫",
105
"application/vnd.google-apps.fusiontable": "Google Fusion Tables 🌶️",
106
"application/vnd.google-apps.jam": "Google Jamboard 🖍️",
107
"application/vnd.google-apps.map": "Google My Maps 📍",
108
"application/vnd.google-apps.photo": "Photo 📷",
109
"application/vnd.google-apps.presentation": "Google Slides ❇️",
110
"application/vnd.google-apps.script": "Google Apps Scripts 📜",
111
"application/vnd.google-apps.shortcut": "Shortcut ↩️",
112
"application/vnd.google-apps.site": "Google Sites 🌐",
113
"application/vnd.google-apps.spreadsheet": "Google Sheets 📟",
114
"application/vnd.google-apps.unknown": "Unknown ❔",
115
"application/vnd.google-apps.video": "Video 📼",
116
"application/pdf": "PDF Document 📕",
117
"application/msword": "Microsoft Word document 📝",
118
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "OpenXML Word document 📝",
119
"application/vnd.ms-powerpoint.presentation.macroEnabled.12": "Microsoft Powerpoint with macros ❇️",
120
"application/vnd.ms-excel": "Microsoft Excel spreadsheet 📟",
121
"image/jpeg": "JPEG Image 🖼️",
122
"audio/mpeg": "MPEG Audio 🎧",
123
"video/mpeg": "MPEG Video 📼",
124
"application/zip": "ZIP Archive 🗃️",
125
"text/plain": "Plain Text 📃",
126
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "OpenXML Spreadsheet document ❇️",
127
"application/vnd.android.package-archive": "Android Package 📱",
128
"application/vnd.google-apps.kix": "Google Apps 🈸"
129
}
130