Skip to content

Commit 100e581

Browse files
authored
Motion new action (#14289)
* Adding new action * Package version bump * pnpm
1 parent 49771c3 commit 100e581

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import motion from "../../motion.app.mjs";
2+
3+
export default {
4+
key: "motion-get-schedules",
5+
name: "Retrieve Schedules",
6+
version: "0.0.1",
7+
description: "Get a list of schedules for your user. [See the documentation](https://docs.usemotion.com/docs/motion-rest-api/f9fec7bb61c6f-get-schedules)",
8+
type: "action",
9+
props: {
10+
motion,
11+
},
12+
methods: {
13+
getSchedules($) {
14+
return this.motion._makeRequest({
15+
$,
16+
path: "schedules",
17+
});
18+
},
19+
},
20+
async run({ $ }) {
21+
const response = await this.getSchedules($);
22+
$.export("$summary", `Successfully fetched ${response?.length} schedules`);
23+
return response;
24+
},
25+
};

components/motion/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/motion",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "Pipedream Motion Components",
55
"main": "motion.app.mjs",
66
"keywords": [
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^1.5.1"
16+
"@pipedream/platform": "^3.0.3"
1717
}
1818
}

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)