@pipedream/hootsuite 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/actions/create-media-upload-job/create-media-upload-job.mjs +6 -1
- package/actions/get-media-upload-status/get-media-upload-status.mjs +6 -1
- package/actions/list-social-profiles/list-social-profiles.mjs +38 -0
- package/actions/schedule-message/schedule-message.mjs +6 -1
- package/hootsuite.app.mjs +2 -1
- package/package.json +2 -2
- package/sources/new-post-created/new-post-created.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Overview
|
|
2
2
|
|
|
3
|
-
The Hootsuite API offers a variety of endpoints to automate social media management tasks such as scheduling posts, managing social content, and analyzing social media performance. By leveraging Pipedream, you can create serverless workflows to interact with the Hootsuite API; you can schedule posts at optimal times, aggregate metrics for reporting, or even respond to social media activity in real-time. Pipedream's platform allows the seamless integration of the Hootsuite API with
|
|
3
|
+
The Hootsuite API offers a variety of endpoints to automate social media management tasks such as scheduling posts, managing social content, and analyzing social media performance. By leveraging Pipedream, you can create serverless workflows to interact with the Hootsuite API; you can schedule posts at optimal times, aggregate metrics for reporting, or even respond to social media activity in real-time. Pipedream's platform allows the seamless integration of the Hootsuite API with 3,000+ other apps to streamline social media workflows, monitor brand presence, and engage with audiences effectively.
|
|
4
4
|
|
|
5
5
|
# Example Use Cases
|
|
6
6
|
|
|
@@ -5,7 +5,12 @@ export default {
|
|
|
5
5
|
key: "hootsuite-create-media-upload-job",
|
|
6
6
|
name: "Create Media Upload Job",
|
|
7
7
|
description: "Creates a new Media Upload Job on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/createMedia)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.3",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: false,
|
|
13
|
+
},
|
|
9
14
|
type: "action",
|
|
10
15
|
props: {
|
|
11
16
|
hootsuite,
|
|
@@ -4,7 +4,12 @@ export default {
|
|
|
4
4
|
key: "hootsuite-get-media-upload-status",
|
|
5
5
|
name: "Get Media Upload Status",
|
|
6
6
|
description: "Gets the status of a Media Upload Job on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/getMedia)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.3",
|
|
8
|
+
annotations: {
|
|
9
|
+
destructiveHint: false,
|
|
10
|
+
openWorldHint: true,
|
|
11
|
+
readOnlyHint: true,
|
|
12
|
+
},
|
|
8
13
|
type: "action",
|
|
9
14
|
props: {
|
|
10
15
|
hootsuite,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import hootsuite from "../../hootsuite.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "hootsuite-list-social-profiles",
|
|
5
|
+
name: "List Social Profiles",
|
|
6
|
+
description: "Retrieves a list of social profiles for the authenticated Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/getSocialProfiles)",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
hootsuite,
|
|
16
|
+
},
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves all social profiles for the authenticated Hootsuite account
|
|
19
|
+
* @param {object} params - The parameters object
|
|
20
|
+
* @param {object} params.props - The action props containing the hootsuite app
|
|
21
|
+
* @returns {Promise<Array>} An array of social profile objects from Hootsuite
|
|
22
|
+
*/
|
|
23
|
+
async run({ $ }) {
|
|
24
|
+
try {
|
|
25
|
+
const response = await $.apps.hootsuite.listSocialProfiles({
|
|
26
|
+
$,
|
|
27
|
+
});
|
|
28
|
+
$.export("$summary", `Successfully retrieved ${response?.data?.length} social profile${response?.data?.length === 1
|
|
29
|
+
? ""
|
|
30
|
+
: "s"}`);
|
|
31
|
+
return response;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("API call to Hootsuite failed:", error.response?.data || error.message);
|
|
34
|
+
const errorMessage = error.response?.data?.errors?.[0]?.message || error.message || "Unknown error";
|
|
35
|
+
throw new Error(`Failed to retrieve social profiles. Error: ${errorMessage}`);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -13,7 +13,12 @@ export default {
|
|
|
13
13
|
key: "hootsuite-schedule-message",
|
|
14
14
|
name: "Schedule Message",
|
|
15
15
|
description: "Schedules a message on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage)",
|
|
16
|
-
version: "0.0.
|
|
16
|
+
version: "0.0.3",
|
|
17
|
+
annotations: {
|
|
18
|
+
destructiveHint: false,
|
|
19
|
+
openWorldHint: true,
|
|
20
|
+
readOnlyHint: false,
|
|
21
|
+
},
|
|
17
22
|
type: "action",
|
|
18
23
|
props: {
|
|
19
24
|
hootsuite,
|
package/hootsuite.app.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/hootsuite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Pipedream Hootsuite Components",
|
|
5
5
|
"main": "hootsuite.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@pipedream/platform": "^3.1.
|
|
16
|
+
"@pipedream/platform": "^3.1.1",
|
|
17
17
|
"dayjs": "^1.11.7"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -5,7 +5,7 @@ import constants from "../common/constants.mjs";
|
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
name: "New Post Created",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.3",
|
|
9
9
|
key: "hootsuite-new-post-created",
|
|
10
10
|
description: "Emit new event on each new created post. [See docs here](https://platform.hootsuite.com/docs/api/index.html#operation/retrieveMessages).",
|
|
11
11
|
type: "source",
|