Skip to content

Commit b51211a

Browse files
committed
microsoft_onedrive component
1 parent b0adee7 commit b51211a

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import onedrive from "../../microsoft_onedrive.app.mjs";
2+
3+
export default {
4+
key: "microsoft_onedrive-get-file-by-id",
5+
name: "Get File by ID",
6+
description: "Retrieves a file by ID. [See the documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
onedrive,
11+
fileId: {
12+
propDefinition: [
13+
onedrive,
14+
"fileId",
15+
],
16+
description: "The file to retrieve. You can either search for the file here, provide a custom *File ID*.",
17+
},
18+
},
19+
async run({ $ }) {
20+
const response = await this.onedrive.client().api(`/me/drive/items/${this.fileId}`)
21+
.get();
22+
$.export("$summary", `Successfully retreived file with ID: ${this.fileId}`);
23+
return response;
24+
},
25+
};

components/microsoft_onedrive/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/microsoft_onedrive",
3-
"version": "1.5.2",
3+
"version": "1.6.0",
44
"description": "Pipedream Microsoft OneDrive components",
55
"main": "microsoft_onedrive.app.js",
66
"homepage": "https://pipedream.com/apps/microsoft-onedrive",
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@microsoft/microsoft-graph-client": "^3.0.1",
13-
"@pipedream/platform": "^1.1.0",
13+
"@pipedream/platform": "^3.0.3",
1414
"bottleneck": "^2.19.5",
1515
"file-type": "^18.7.0",
1616
"isomorphic-fetch": "^3.0.0",

0 commit comments

Comments
 (0)