Skip to content

Repository files navigation

PipedreamClient

pipedream_client is a Ruby gem that provides a convenient interface for interacting with the Pipedream API, including authentication, workflow management, and app integration.

Features

  • OAuth2 and Basic authentication support
  • Manage workflows and connections
  • Interact with Pipedream APIs

Installation

Add this line to your application's Gemfile:

gem "pipedream_client"

And then execute:

bundle install

Or install it yourself as:

gem install pipedream_client

Usage

Configuration

First, 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)

Workflow Management

# 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}"

API Operations

# 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.fetch

Refer to the code in lib/pipedream_client/ for more details and advanced usage.

Contributing

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.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the PipedreamClient project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

A Ruby Gem for the Pipedream API.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages