OpenWeatherApi
No long description provided.
Installation
dagger install github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688
Entrypoint
Return Type
OpenWeatherApi !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
apiKey | Secret ! | - | The apiKey to use for the OpenWeatherMap API |
unit | String ! | "C" | The unit to use (C, F, or K) |
lang | String ! | "en" | The 2-letter ISO code for the language to use (en, es, etc.) |
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string
func (m *myModule) example(apiKey *Secret, unit string, lang string) *OpenWeatherApi {
return dag.
OpenWeatherApi(apiKey, unit, lang)
}
@function
def example(api_key: dagger.Secret, unit: str, lang: str) -> dag.OpenWeatherApi:
return (
dag.open_weather_api(api_key, unit, lang)
)
@func()
example(apiKey: Secret, unit: string, lang: string): OpenWeatherApi {
return dag
.openWeatherApi(apiKey, unit, lang)
}
Types
OpenWeatherApi 🔗
apiKey() 🔗
The apiKey to use for the OpenWeatherMap API
Return Type
Secret !
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string api-key
func (m *myModule) example(apiKey *Secret, unit string, lang string) *Secret {
return dag.
OpenWeatherApi(apiKey, unit, lang).
ApiKey()
}
@function
def example(api_key: dagger.Secret, unit: str, lang: str) -> dagger.Secret:
return (
dag.open_weather_api(api_key, unit, lang)
.api_key()
)
@func()
example(apiKey: Secret, unit: string, lang: string): Secret {
return dag
.openWeatherApi(apiKey, unit, lang)
.apiKey()
}
unit() 🔗
The unit to use (C, F, or K)
Return Type
String !
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string unit
func (m *myModule) example(ctx context.Context, apiKey *Secret, unit string, lang string) string {
return dag.
OpenWeatherApi(apiKey, unit, lang).
Unit(ctx)
}
@function
async def example(api_key: dagger.Secret, unit: str, lang: str) -> str:
return await (
dag.open_weather_api(api_key, unit, lang)
.unit()
)
@func()
async example(apiKey: Secret, unit: string, lang: string): Promise<string> {
return dag
.openWeatherApi(apiKey, unit, lang)
.unit()
}
lang() 🔗
The 2-letter ISO code for the language to use (en, es, etc.)
Return Type
String !
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string lang
func (m *myModule) example(ctx context.Context, apiKey *Secret, unit string, lang string) string {
return dag.
OpenWeatherApi(apiKey, unit, lang).
Lang(ctx)
}
@function
async def example(api_key: dagger.Secret, unit: str, lang: str) -> str:
return await (
dag.open_weather_api(api_key, unit, lang)
.lang()
)
@func()
async example(apiKey: Secret, unit: string, lang: string): Promise<string> {
return dag
.openWeatherApi(apiKey, unit, lang)
.lang()
}
result() 🔗
The weather data returned by the API call
Return Type
Weather !
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string result
func (m *myModule) example(apiKey *Secret, unit string, lang string) *OpenWeatherApiWeather {
return dag.
OpenWeatherApi(apiKey, unit, lang).
Result()
}
@function
def example(api_key: dagger.Secret, unit: str, lang: str) -> dag.OpenWeatherApiWeather:
return (
dag.open_weather_api(api_key, unit, lang)
.result()
)
@func()
example(apiKey: Secret, unit: string, lang: string): OpenWeatherApiWeather {
return dag
.openWeatherApi(apiKey, unit, lang)
.result()
}
asJson() 🔗
returns the weather data as a JSON string
Return Type
Scalar !
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string as-json
func (m *myModule) example(apiKey *Secret, unit string, lang string) {
return dag.
OpenWeatherApi(apiKey, unit, lang).
AsJson()
}
@function
def example(api_key: dagger.Secret, unit: str, lang: str) -> :
return (
dag.open_weather_api(api_key, unit, lang)
.as_json()
)
@func()
example(apiKey: Secret, unit: string, lang: string): {
return dag
.openWeatherApi(apiKey, unit, lang)
.asJson()
}
useCoordinates() 🔗
retrieves the current weather for the given latitude and longitude
Return Type
OpenWeatherApi !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
lat | String ! | - | The latitude |
lon | String ! | - | The longitude |
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string use-coordinates --lat string --lon string
func (m *myModule) example(apiKey *Secret, unit string, lang string, lat string, lon string) *OpenWeatherApi {
return dag.
OpenWeatherApi(apiKey, unit, lang).
UseCoordinates(lat, lon)
}
@function
def example(api_key: dagger.Secret, unit: str, lang: str, lat: str, lon: str) -> dag.OpenWeatherApi:
return (
dag.open_weather_api(api_key, unit, lang)
.use_coordinates(lat, lon)
)
@func()
example(apiKey: Secret, unit: string, lang: string, lat: string, lon: string): OpenWeatherApi {
return dag
.openWeatherApi(apiKey, unit, lang)
.useCoordinates(lat, lon)
}
useLocation() 🔗
retrieves the current weather for the given location name
Return Type
OpenWeatherApi !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | String ! | - | The name of the location (e,g "London,UK", "New York,US", "Tokyo,JP", "Sydney,AU") |
Example
dagger -m github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688 call \
--api-key env:MYSECRET --unit string --lang string use-location --name string
func (m *myModule) example(apiKey *Secret, unit string, lang string, name string) *OpenWeatherApi {
return dag.
OpenWeatherApi(apiKey, unit, lang).
UseLocation(name)
}
@function
def example(api_key: dagger.Secret, unit: str, lang: str, name: str) -> dag.OpenWeatherApi:
return (
dag.open_weather_api(api_key, unit, lang)
.use_location(name)
)
@func()
example(apiKey: Secret, unit: string, lang: string, name: string): OpenWeatherApi {
return dag
.openWeatherApi(apiKey, unit, lang)
.useLocation(name)
}
Weather 🔗
temp() 🔗
The temperature in the requested unit
Return Type
String !
Example
Function OpenWeatherApiWeather.temp is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.temp is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.temp is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.temp is not accessible from the OpenWeatherApi module
unit() 🔗
The unit of the temperature (C, F, or K)
Return Type
String !
Example
Function OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi module
description() 🔗
The description of the weather (e.g. “clear sky”, “light rain”, etc.)
Return Type
String !
Example
Function OpenWeatherApiWeather.description is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.description is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.description is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.description is not accessible from the OpenWeatherApi module
feelsLike() 🔗
The “feels like” temperature in the requested unit
Return Type
String !
Example
Function OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi module
summary() 🔗
The summary of the weather (e.g. “London, clear sky, 20°C (🌤️)”)
Return Type
String !
Example
Function OpenWeatherApiWeather.summary is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.summary is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.summary is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.summary is not accessible from the OpenWeatherApi module
icon() 🔗
The icon to use for the weather (e.g. “🌤️”)
Return Type
String !
Example
Function OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi module
Function OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi module