weather
A generated module for Weather functions
Installation
dagger install github.com/kpenfound/dag/weather@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0Entrypoint
Return Type
Weather ! Example
dagger -m github.com/kpenfound/dag/weather@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
func (m *MyModule) Example() *dagger.Weather {
return dag.
Weather()
}@function
def example() -> dagger.Weather:
return (
dag.weather()
)@func()
example(): Weather {
return dag
.weather()
}Types
Weather 🔗
city() 🔗
Returns the current weather in a city
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | Name of a city |
Example
dagger -m github.com/kpenfound/dag/weather@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
city --name stringfunc (m *MyModule) Example(ctx context.Context, name string) string {
return dag.
Weather().
City(ctx, name)
}@function
async def example(name: str) -> str:
return await (
dag.weather()
.city(name)
)@func()
async example(name: string): Promise<string> {
return dag
.weather()
.city(name)
}coordinates() 🔗
Returns the current weather at the given coordinates
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| latitude | String ! | - | latitude of a location |
| longitude | String ! | - | longitude of a location |
Example
dagger -m github.com/kpenfound/dag/weather@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
coordinates --latitude string --longitude stringfunc (m *MyModule) Example(ctx context.Context, latitude string, longitude string) string {
return dag.
Weather().
Coordinates(ctx, latitude, longitude)
}@function
async def example(latitude: str, longitude: str) -> str:
return await (
dag.weather()
.coordinates(latitude, longitude)
)@func()
async example(latitude: string, longitude: string): Promise<string> {
return dag
.weather()
.coordinates(latitude, longitude)
}