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 @@ -4,7 +4,7 @@ export default {
key: "mastodon-bookmark-status",
name: "Bookmark Status",
description: "Privately bookmark a status. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#bookmark)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/mastodon/actions/boost-status/boost-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-boost-status",
name: "Boost Status",
description: "Reshare a status on your own profile. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#boost)",
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: "mastodon-delete-status",
name: "Delete Status",
description: "Delete one of your own statuses. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#delete)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/mastodon/actions/edit-status/edit-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-edit-status",
name: "Edit Status",
description: "Edit a given status to change its text or sensitivity. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#edit)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-favorite-status",
name: "Favorite Status",
description: "Add a status to your favourites list. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#favourite)",
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,30 @@
import mastodon from "../../mastodon.app.mjs";

export default {
key: "mastodon-get-accounts-following",
name: "Get Accounts Following",
description: "Get the accounts that the given account is following. [See the documentation](https://docs.joinmastodon.org/methods/accounts/#following)",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
mastodon,
max: {
propDefinition: [
mastodon,
"max",
],
},
},
async run({ $ }) {
const accounts = await this.mastodon.paginate(this.mastodon.getAccountsFollowing, {
$,
}, this.max);
$.export("$summary", `Successfully retrieved ${accounts.length} account(s) that the user is following`);
return accounts;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-mute-conversation",
name: "Mute Conversation",
description: "Do not receive notifications for the thread that this status is part of. Must be a thread in which you are a participant. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#mute)",
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 @@ -5,7 +5,7 @@ export default {
key: "mastodon-perform-search",
name: "Perform Search",
description: "Search for content in accounts, statuses or hashtags. [See the docs here](https://docs.joinmastodon.org/methods/search/#v2)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/mastodon/actions/pin-status/pin-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-pin-status",
name: "Pin Status to Profile",
description: "Feature one of your own public statuses at the top of your profile. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#pin)",
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 @@ -6,7 +6,7 @@ export default {
key: "mastodon-post-multiple-statuses",
name: "Post Multiple Statuses",
description: "Publish multiple statuses with the given parameters, the subsequent statuses will be posted as a reply of of the first status. [See the documentation](https://docs.joinmastodon.org/methods/statuses/#create)",
version: "0.0.3",
version: "0.0.4",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/mastodon/actions/post-status/post-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "mastodon-post-status",
name: "Post Status",
description: "Publish a status with the given parameters. [See the documentation](https://docs.joinmastodon.org/methods/statuses/#create)",
version: "0.0.4",
version: "0.0.5",
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: "mastodon-unbookmark-status",
name: "Undo Bookmark of a Status",
description: "Remove a status from your private bookmarks. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#unbookmark)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-unboost-status",
name: "Undo Boost of a Status",
description: "Undo a reshare of a status. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#unreblog)",
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: "mastodon-unfavorite-status",
name: "Undo Favorite of a Status",
description: "Remove a status from your favourites list.. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#unfavourite)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-unmute-conversation",
name: "Unmute a Conversation",
description: "Start receiving notifications again for the thread that this status is part of. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#unmute)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: true,
openWorldHint: true,
Expand Down
2 changes: 1 addition & 1 deletion components/mastodon/actions/unpin-status/unpin-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "mastodon-unpin-status",
name: "Unpin Status from Profile",
description: "Unfeature a status from the top of your profile. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#unpin)",
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: "mastodon-view-hashtag-timeline",
name: "View Hashtag Timeline",
description: "View public statuses containing the given hashtag. [See the docs here](https://docs.joinmastodon.org/methods/timelines/#tag)",
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: "mastodon-view-home-timeline",
name: "View Home Timeline",
description: "View statuses from followed users. [See the docs here](https://docs.joinmastodon.org/methods/timelines/#home)",
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: "mastodon-view-list-timeline",
name: "View List Timeline",
description: "View statuses in the given list timeline. [See the docs here](https://docs.joinmastodon.org/methods/timelines/#list)",
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: "mastodon-view-public-timeline",
name: "View Public Timeline",
description: "View public statuses. [See the docs here](https://docs.joinmastodon.org/methods/timelines/#public)",
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: "mastodon-view-single-status",
name: "View Single Status",
description: "Obtain information about a status. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#get)",
version: "0.0.2",
version: "0.0.3",
annotations: {
destructiveHint: false,
openWorldHint: true,
Expand Down
7 changes: 7 additions & 0 deletions components/mastodon/mastodon.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,13 @@ export default {
...args,
});
},
async getAccountsFollowing(args = {}) {
const { id } = await this.verifyAccountCredentials();
return this._makeRequest({
path: `${API_V1}/accounts/${id}/following`,
...args,
});
},
async paginate(resourceFn, args, max = DEFAULT_PAGE_SIZE, resourceType = null) {
const items = [];
let done = false;
Expand Down
4 changes: 2 additions & 2 deletions components/mastodon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/mastodon",
"version": "0.1.3",
"version": "0.2.0",
"description": "Pipedream Mastodon Components",
"main": "mastodon.app.mjs",
"keywords": [
Expand All @@ -13,7 +13,7 @@
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^1.6.8",
"@pipedream/platform": "^3.1.1",
"axios": "^1.12.0"
}
}
2 changes: 1 addition & 1 deletion components/mastodon/sources/new-bookmark/new-bookmark.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "mastodon-new-bookmark",
name: "New Status Bookmarked",
description: "Emit new event when the specified status is bookmarked. [See the docs here](https://docs.joinmastodon.org/methods/bookmarks/)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "mastodon-new-status-boosted",
name: "New Status Boosted",
description: "Emit new event when the specified status is boosted. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#reblogged_by)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "mastodon-new-status-favorited",
name: "New Status Favorited",
description: "Emit new event when the specified status is favorited. [See the docs here](https://docs.joinmastodon.org/methods/statuses/#favourited_by)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
props: {
Expand Down
2 changes: 1 addition & 1 deletion components/mastodon/sources/new-status/new-status.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "mastodon-new-status",
name: "New Status",
description: "Emit new event when a new status is posted to your Profile. [See the docs here](https://docs.joinmastodon.org/methods/accounts/#statuses)",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
hooks: {
Expand Down
25 changes: 10 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading