OpenWeatherApi
No long description provided.
Installation
dagger install github.com/pjmagee/dagger-openweatherapi@1217a87218b3b11e867954cbebc1332fcdf4f688Entrypoint
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 stringfunc (m *MyModule) Example(apiKey *dagger.Secret, unit string, lang string) *dagger.OpenWeatherApi {
return dag.
OpenWeatherApi(apiKey, unit, lang)
}@function
def example(api_key: dagger.Secret, unit: str, lang: str) -> dagger.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-keyfunc (m *MyModule) Example(apiKey *dagger.Secret, unit string, lang string) *dagger.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 unitfunc (m *MyModule) Example(ctx context.Context, apiKey *dagger.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 langfunc (m *MyModule) Example(ctx context.Context, apiKey *dagger.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 resultfunc (m *MyModule) Example(apiKey *dagger.Secret, unit string, lang string) *dagger.OpenWeatherApiWeather {
return dag.
OpenWeatherApi(apiKey, unit, lang).
Result()
}@function
def example(api_key: dagger.Secret, unit: str, lang: str) -> dagger.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-jsonfunc (m *MyModule) Example(apiKey *dagger.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 stringfunc (m *MyModule) Example(apiKey *dagger.Secret, unit string, lang string, lat string, lon string) *dagger.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) -> dagger.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 stringfunc (m *MyModule) Example(apiKey *dagger.Secret, unit string, lang string, name string) *dagger.OpenWeatherApi {
return dag.
OpenWeatherApi(apiKey, unit, lang).
UseLocation(name)
}@function
def example(api_key: dagger.Secret, unit: str, lang: str, name: str) -> dagger.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 moduleFunction OpenWeatherApiWeather.temp is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.temp is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.temp is not accessible from the OpenWeatherApi moduleunit() 🔗
The unit of the temperature (C, F, or K)
Return Type
String ! Example
Function OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.unit is not accessible from the OpenWeatherApi moduledescription() 🔗
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 moduleFunction OpenWeatherApiWeather.description is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.description is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.description is not accessible from the OpenWeatherApi modulefeelsLike() 🔗
The “feels like” temperature in the requested unit
Return Type
String ! Example
Function OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.feelsLike is not accessible from the OpenWeatherApi modulesummary() 🔗
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 moduleFunction OpenWeatherApiWeather.summary is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.summary is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.summary is not accessible from the OpenWeatherApi moduleicon() 🔗
The icon to use for the weather (e.g. “🌤️”)
Return Type
String ! Example
Function OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi moduleFunction OpenWeatherApiWeather.icon is not accessible from the OpenWeatherApi module