joao_pessoa_info

command
v0.0.0-...-ed71bf1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

README

João Pessoa Info Workflow

Este é um exemplo de workflow que obtém a hora atual e a temperatura em João Pessoa, Brasil.

Funcionalidades

  • Obtém a hora atual usando a WorldTime API
  • Obtém a temperatura atual usando a OpenWeather API
  • Formata uma mensagem amigável com as informações

Pré-requisitos

  1. Go 1.x instalado
  2. Uma API key do OpenWeather (obtenha em https://openweathermap.org/api)

Como usar

  1. Configure sua API key do OpenWeather:
export OPENWEATHER_API_KEY=sua_api_key_aqui
  1. Execute o exemplo:
go run main.go

Estrutura do Workflow

O workflow consiste em três steps:

  1. get-time: Obtém a hora atual
  2. get-weather: Obtém a temperatura atual
  3. format-message: Formata os dados em uma mensagem amigável

Exemplo de Saída

Hello from João Pessoa! Current time is 14:30 and temperature is 28°C

Configuração

Você pode modificar o workflow editando o arquivo workflow.json. Algumas opções que você pode personalizar:

  • Template da mensagem
  • Configurações de retry
  • Parâmetros das APIs

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL