Skip to content

Commit adfe540

Browse files
committed
Added actions
1 parent eb3fc32 commit adfe540

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

components/habitica/actions/get-challenge/get-challenge.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import app from "../../habitica.app.mjs";
33
export default {
44
key: "habitica-get-challenge",
55
name: "Get Challenge",
6-
description: "Description for get-challenge. [See the documentation](https://habitica.com/apidoc/#api-Challenge-GetChallenge)",
6+
description: "Get data for the challenge with the specified ID. [See the documentation](https://habitica.com/apidoc/#api-Challenge-GetChallenge)",
77
version: "0.0.1",
88
type: "action",
99
props: {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default {
2+
GROUP_TYPES: [
3+
"party",
4+
"guilds",
5+
"privateGuilds",
6+
"publicGuilds",
7+
"tavern",
8+
],
9+
};

components/habitica/habitica.app.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { axios } from "@pipedream/platform";
2+
import constants from "./common/constants.mjs";
23

34
export default {
45
type: "app",
@@ -7,7 +8,7 @@ export default {
78
group: {
89
type: "string",
910
label: "Group",
10-
description: "ID of the groups to which the challenge belongs",
11+
description: "ID of the group to which the challenge belongs",
1112
async options({ type }) {
1213
const response = await this.getGroups({
1314
type,
@@ -52,13 +53,14 @@ export default {
5253
prize: {
5354
type: "string",
5455
label: "Prize",
55-
description: "Number of gems offered as a prize to challenge winne",
56+
description: "Number of gems offered as a prize to challenge winner",
5657
optional: true,
5758
},
5859
type: {
5960
type: "string",
6061
label: "Type",
6162
description: "Type of the group",
63+
options: constants.GROUP_TYPES,
6264
},
6365
challengeId: {
6466
type: "string",

0 commit comments

Comments
 (0)