
Announcements
Hi there,
I have a custom connector from wunderground API working fine but I don't know how I can read the values into powerapps.
This is the swanger code:
swagger: '2.0'
info:
title: CurrentWeather
description: ''
version: '1.0'
host: api.weather.com
basePath: /v2
schemes:
- https
consumes: []
produces: []
paths:
/pws/observations/current:
get:
responses:
default:
description: default
schema: {}
summary: Run
description: Run
operationId: Run
parameters:
- name: stationId
in: query
required: false
type: string
- name: format
in: query
required: false
type: string
- name: units
in: query
required: false
type: string
- name: apiKey
in: query
required: false
type: string
definitions: {}
parameters: {}
responses: {}
securityDefinitions:
Clave de API:
type: apiKey
in: query
name: apiKey
security:
- Clave de API: []
tags: []
This is an example of the body outputs:
{
"observations": [
{
"stationID": "XXXX",
"obsTimeUtc": "2023-03-15T19:19:37Z",
"obsTimeLocal": "2023-03-15 20:19:37",
"neighborhood": "XXXXX",
"softwareType": "EasyWeatherV1.6.5",
"country": "ES",
"solarRadiation": 0,
"lon": -5.5,
"realtimeFrequency": null,
"epoch": 1678907977,
"lat": 39.0,
"uv": 0,
"winddir": 74,
"humidity": 47,
"qcStatus": -1,
"metric": {
"temp": 19,
"heatIndex": 19,
"dewpt": 7,
"windChill": 19,
"windSpeed": 2,
"windGust": 2,
"pressure": 1012.73,
"precipRate": 0,
"precipTotal": 2.79,
"elev": 79
}
}
]
}
The question is that I don't how to use in powerapps this is the basic call:
CurrentWeather.Run(
{stationId:PWSStation;
format:"json";
units:"m";
apiKey:PWSKey}
)
but I tried others, for example:
CurrentWeather.Run(
{stationId:PWSStation;
format:"json";
units:"m";
apiKey:PWSKey}
).observations.metric.temp
Where is my error?
Thank you.
I solved it!!
Only I need a gallery with this code:
Table(
CurrentWeather.Run(
{stationId:PWSStation;
format:"json";
units:"m";
apiKey:PWSKey}
).observations)
And the items inside need to have the same schema like the body ouputs. example:
ThisItem.Value.stationID
ThisItem.Value.metric.temp
....
I hope help.
Regards.