pipedream_client is a Ruby gem that provides a convenient interface for interacting with the Pipedream API, including authentication, workflow management, and app integration.
- OAuth2 and Basic authentication support
- Manage workflows and connections
- Interact with Pipedream APIs
Add this line to your application's Gemfile:
gem "pipedream_client"And then execute:
bundle installOr install it yourself as:
gem install pipedream_clientFirst, configure the client with your Pipedream API settings:
require "pipedream_client"
# Configure the client
config = PipedreamClient::Config.new(
api_base_url: "https://api.pipedream.com",
client_id: "YOUR_CLIENT_ID",
client_secret: "YOUR_CLIENT_SECRET"
)
PipedreamClient.configure(config)# Create a workflow client for triggering workflows
workflow = PipedreamClient::Workflow.new(
url: "https://your-workflow-endpoint.com",
auth_strategy: :oauth # or :basic
)
# Trigger a workflow with payload
response = workflow.trigger({ message: "Hello World", data: { key: "value" } })
puts response.success? ? "Success!" : "Failed: #{response.error}"# List available apps
apps_response = PipedreamClient::API::ListApps.fetch(q: "Slack")
puts apps_response.data if apps_response.success?
# Create connection link
PipedreamClient::API::CreateConnectionLink.project_id = "your_project_id"
connection_response = PipedreamClient::API::CreateConnectionLink.fetch({
redirect_uri: "https://your-app.com/callback"
})
# Delete account
PipedreamClient::API::DeleteAccount.fetchRefer to the code in lib/pipedream_client/ for more details and advanced usage.
Bug reports and pull requests are welcome on GitHub at https://github.com/nandhasuhendra/pipedream_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the PipedreamClient project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.