$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "calculations": [
< {
< "type": "ohms-law",
< "voltage": 12,
< "current": 0.5,
< "label": "12 V at 0.5 A"
< },
< {
< "type": "resistor-color-code",
< "bands": [
< "yellow",
< "violet",
< "red",
< "gold"
< ],
< "label": "Decode a 4-band resistor"
< },
< {
< "type": "resistor-color-code",
< "resistance": "4.7k",
< "bandCount": 5,
< "label": "Encode 4.7 kohm to 5 bands"
< },
< {
< "type": "led-resistor",
< "supplyVoltage": 5,
< "ledForwardVoltage": 2,
< "ledCurrentMa": 20,
< "numberOfLeds": 1,
< "label": "Series resistor for a red LED"
< },
< {
< "type": "voltage-divider",
< "vin": 9,
< "r1": "10k",
< "r2": "4.7k",
< "label": "9 V divider"
< },
< {
< "type": "component-network",
< "componentType": "resistor",
< "connection": "parallel",
< "values": [
< "10k",
< "10k"
< ],
< "label": "Two 10 kohm in parallel"
< },
< {
< "type": "rc-filter",
< "resistance": "10k",
< "capacitance": "100n",
< "label": "RC low-pass cutoff"
< },
< {
< "type": "reactance",
< "frequency": "1k",
< "inductance": "10m",
< "capacitance": "100n",
< "label": "Reactance and LC resonance"
< },
< {
< "type": "energy-cost",
< "power": 60,
< "hours": 720,
< "energyRate": 0.15,
< "currency": "USD",
< "label": "60 W load for a month"
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/acts/mangudai~electronics-calculator/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'