Python
Python
Installation
pip install DangWire
Usage
from DangWire import DangWire
client = DangWire(api_key="YOUR_API_KEY")
# List workflows
workflows = client.workflows.list()
# Create a workflow
workflow = client.workflows.create(
name="Lead Capture",
platform="make",
trigger={"type": "webhook"},
actions=[
{"app": "google_sheets", "action": "add_row"},
{"app": "slack", "action": "send_message"},
]
)
# Check build status
build = client.builds.get(workflow.build_id)
print(build.status)JavaScript
JavaScript
Installation
npm install DangWire
Usage
import DangWire from "DangWire";
const client = new DangWire({ apiKey: "YOUR_API_KEY" });
// List workflows
const workflows = await client.workflows.list();
// Create a workflow
const workflow = await client.workflows.create({
name: "Lead Capture",
platform: "make",
trigger: { type: "webhook" },
actions: [
{ app: "google_sheets", action: "add_row" },
{ app: "slack", action: "send_message" },
],
});
// Check build status
const build = await client.builds.get(workflow.build_id);
console.log(build.status);cURL
Shell
Installation
No installation required
Usage
# List workflows
curl -H "X-API-Key: YOUR_API_KEY" \
https://api.dangwire.com/v1/workflows
# Create a workflow
curl -X POST https://api.dangwire.com/v1/workflows \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Lead Capture",
"platform": "make",
"trigger": {"type": "webhook"},
"actions": [
{"app": "google_sheets", "action": "add_row"},
{"app": "slack", "action": "send_message"}
]
}'
# Check build status
curl -H "X-API-Key: YOUR_API_KEY" \
https://api.dangwire.com/v1/builds/{build_id}