diff --git a/components/loomio/README.md b/components/loomio/README.md new file mode 100644 index 0000000000000..e0cd57bb0a43a --- /dev/null +++ b/components/loomio/README.md @@ -0,0 +1,56 @@ +# Loomio API Integrations + +### Integrate Loomio and thousands of applications with Pipedream. Free for developers. + +--- + +Pipedream is a serverless integration and compute platform. We provide a free, hosted platform that makes it easy to connect apps and develop, execute and maintain event-driven workflows. + +**Key Features**: + +- Serverless - No server or cloud resources to manage +- [Free](#pricing) - No fees for individual developers (see [limits](https://docs.pipedream.com/limits/)) + + + +```bash +pd deploy # prompts you to select a component and pass required options +``` + +## Workflows + +Workflows are a sequence of linear [steps](https://docs.pipedream.com/workflows/steps) - just Node.js code - triggered by an event (via event source, HTTP endpoint, or timer). Workflows make it easy to transform data and integrate with 300+ APIs from various apps and services. + +- Trigger your workflow on event (e.g. [HTTP requests](https://docs.pipedream.com/workflows/steps/triggers/#http) or a [schedule](https://docs.pipedream.com/workflows/steps/triggers/#cron-scheduler)). +- Add steps to run [Node.js code](https://docs.pipedream.com/workflows/steps/code/) (using virtually any npm package) and [pre-built actions](https://docs.pipedream.com/workflows/steps/actions/). +- Steps are executed in the order they appear in your workflow. +- Data is shared between steps via [step exports](https://docs.pipedream.com/workflows/steps/#step-exports). + +Workflow code is [public by default](https://docs.pipedream.com/public-workflows/) so the community can discover and [copy them](https://docs.pipedream.com/workflows/copy/). Your workflow execution and event data is private. + +You can copy [this example workflow](https://pipedream.com/@tod/use-http-requests-to-trigger-a-workflow-p_6lCy5y/readme) to get started, or review some [community-developed workflows](https://pipedream.com/explore) to see what others are building. + +For a deeper introduction to Pipedream and event sources, see the [root `README` in this repo](/README.md), the [component API](/COMPONENT-API.md), or the [docs](https://docs.pipedream.com/apps/loomio/). + +## Other Popular API Integrations + +- [Airtable](https://github.com/PipedreamHQ/pipedream/tree/master/components/airtable) ([deploy](https://pipedream.com/sources/new?app=airtable)) +- [AWS](https://github.com/PipedreamHQ/pipedream/tree/master/components/aws) ([deploy](https://pipedream.com/sources/new?app=aws)) +- [Dropbox](https://github.com/PipedreamHQ/pipedream/tree/master/components/dropbox) ([deploy](https://pipedream.com/sources/new?app=dropbox)) +- [Github](https://github.com/PipedreamHQ/pipedream/tree/master/components/github) ([deploy](https://pipedream.com/sources/new?app=github)) +- [Google Calendar](https://github.com/PipedreamHQ/pipedream/tree/master/components/google-calendar) ([deploy](https://pipedream.com/sources/new?app=google-calendar)) +- [Google Drive](https://github.com/PipedreamHQ/pipedream/tree/master/components/google-drive) ([deploy](https://pipedream.com/sources/new?app=google-drive)) +- [RSS](https://github.com/PipedreamHQ/pipedream/tree/master/components/rss) ([deploy](https://pipedream.com/sources/new?app=rss)) +- [Twitter](https://github.com/PipedreamHQ/pipedream/tree/master/components/twitter) ([deploy](https://pipedream.com/sources/new?app=twitter)) + +## Pricing + +Pipedream is currently free, subject to the [limits noted below](https://docs.pipedream.com/limits/). Paid tiers for higher volumes are coming soon. + +If you exceed any of these limits, please [reach out](https://docs.pipedream.com/support/). + +## Found a Bug? Have a Feature to suggest? + +Before adding an issue, please search the [existing issues](https://github.com/PipedreamHQ/pipedream/issues) or [reach out to our team](https://docs.pipedream.com/support/) to see if a similar request already exists. + +If an issue exists, please [add a reaction](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-conversations-on-github) or comment on your specific use case. diff --git a/components/loomio/loomio.app.mjs b/components/loomio/loomio.app.mjs index b935df7c2c2cd..7615f7f8ac917 100644 --- a/components/loomio/loomio.app.mjs +++ b/components/loomio/loomio.app.mjs @@ -1,11 +1,40 @@ +import { axios } from "@pipedream/platform"; + +export const DEFAULT_BASE_URL = "https://www.loomio.org"; + export default { + name: "loomio", + version: "0.0.1", type: "app", - app: "loomio", - propDefinitions: {}, + props: { + base_url: { + label: 'Base URL', + type: "string", + description: "Base url for loomio", + 'default': DEFAULT_BASE_URL, + }, + api_key: { type: "string", secret: true, label: 'API Key' }, + group_id: { + label: 'Group ID', + type: "integer", + async options({ $ }) { + return (await this.getMemberships($)).map(group => ({value: group.id, label: group.full_name})); + }, + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + getGroupId() { + return this.group_id; + }, + getApiKey() { + return this.api_key; + }, + getBaseUrl() { + return (this.base_url || DEFAULT_BASE_URL) + '/api/b1'; + }, + async getMemberships($) { + const res = await axios($, { url: this.getBaseUrl() + "/memberships?api_key=" + this.api_key }); + return res.groups; }, }, }; diff --git a/components/loomio/package.json b/components/loomio/package.json new file mode 100644 index 0000000000000..4b91f796c4cb0 --- /dev/null +++ b/components/loomio/package.json @@ -0,0 +1,16 @@ +{ + "name": "@pipedream/loomio", + "version": "0.0.1", + "description": "Pipedream Loomio Components", + "main": "loomio.app.mjs", + "keywords": [ + "pipedream", + "loomio" + ], + "homepage": "https://pipedream.com/apps/loomio", + "author": "Pipedream (https://pipedream.com/)", + "license": "MIT", + "publishConfig": { + "access": "public" + } +}