Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "hootsuite-create-media-upload-job",
name: "Create Media Upload Job",
description: "Creates a new Media Upload Job on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/createMedia)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "hootsuite-get-media-upload-status",
name: "Get Media Upload Status",
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)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import hootsuite from "../../hootsuite.app.mjs";

export default {
key: "hootsuite-list-social-profiles",
name: "List Social Profiles",
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)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
hootsuite,
},
/**
* Retrieves all social profiles for the authenticated Hootsuite account
* @param {object} params - The parameters object
* @param {object} params.props - The action props containing the hootsuite app
* @returns {Promise<Array>} An array of social profile objects from Hootsuite
*/
async run({ $ }) {
try {
const response = await $.apps.hootsuite.listSocialProfiles({
$,
});
$.export("$summary", `Successfully retrieved ${response?.data?.length} social profile${response?.data?.length === 1
? ""
: "s"}`);
return response;
} catch (error) {
console.error("API call to Hootsuite failed:", error.response?.data || error.message);
const errorMessage = error.response?.data?.errors?.[0]?.message || error.message || "Unknown error";
throw new Error(`Failed to retrieve social profiles. Error: ${errorMessage}`);
}
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
key: "hootsuite-schedule-message",
name: "Schedule Message",
description: "Schedules a message on your Hootsuite account. [See the documentation](https://apidocs.hootsuite.com/docs/api/index.html#operation/scheduleMessage)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
3 changes: 2 additions & 1 deletion components/hootsuite/hootsuite.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ export default {
...opts,
});
},
listSocialProfiles() {
listSocialProfiles(opts = {}) {
return this._makeRequest({
path: "/socialProfiles",
...opts,
});
},
getMediaUploadStatus({
Expand Down
2 changes: 1 addition & 1 deletion components/hootsuite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/hootsuite",
"version": "0.2.1",
"version": "0.3.0",
"description": "Pipedream Hootsuite Components",
"main": "hootsuite.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import constants from "../common/constants.mjs";

export default {
name: "New Post Created",
version: "0.0.2",
version: "0.0.3",
key: "hootsuite-new-post-created",
description: "Emit new event on each new created post. [See docs here](https://platform.hootsuite.com/docs/api/index.html#operation/retrieveMessages).",
type: "source",
Expand Down
Loading