Files
iAs/tools/query_weatcher.yaml
T

22 lines
591 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: get_weather
desc: 查询指定城市实时天气
params:
- name: city
type: string
required: true
description: 城市名称
env:
- WEATHER_API_KEY
steps:
- url: https://api.weather.com/current?q=${param:city}&key=${env:WEATHER_API_KEY}
method: GET
var:
- name: city_name
extract: location.name
- name: temp
extract: current.temp_c
- name: condition
extract: current.condition.text
result: |
${step0:city_name} 当前温度 ${step0:temp}°C${step0:condition}