Cannot get same-day flights from the Amadeus On-demand Flight Status endpoints from airports with earlier timezones - amadeus

I'm having a hard time understanding how the scheduledDepartureDate input parameter for the Amadeus On-demand Flight Status endpoint works.
When I try to use the current date, it returns an error saying Query parameter 'scheduledDepartureDate' should not be past date. However, this prevents me from getting data for flights that have not yet taken off yet.
This seems to be pegged to UTC date, instead of airport date, perhaps? Because I can get data on flights in later timezones (like Asia) that are "same day" relative to the airports timezone. But I get the validation rule when trying to "same day" flights on the earlier timezones (like Hawaii).
Ultimately, I'd like to find a way to get accurate flight status all the way until a flight lands, regardless of the timezone.

Related

Openweather api differnce hourly and now

I am trying to get the local hourly forecast however the weather at 0 hours is very different to weather now for the same location. Please see below the url and result
https://api.openweathermap.org/data/2.5/onecall?lat=51.5736&lon=0.03287&exclude=daily,minutely,current,alerts&units=metric&appid={mykey}
First hour (ie now)
{"lat":51.5736,"lon":0.0329,"timezone":"Europe/London","timezone_offset":0,"hourly":
{"dt":1675846800,"temp":2.31,"feels_like":2.31,"pressure":1037,"humidity":83,"dew_point":-0.24,"uvi":0.36,"clouds":81,"visibility":10000,"wind_speed":1.32,"wind_deg":186,"wind_gust":2.49,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"pop":0},
https://api.openweathermap.org/data/2.5/weather?lat=51.5736&lon=0.03287&units=metric&appid={mykey}
{"coord":{"lon":0.0329,"lat":51.5736},"weather":[{"id":741,"main":"Fog","description":"fog","icon":"50d"}],"base":"stations","main":{"temp":2.14,"feels_like":2.14,"temp_min":-3.07,"temp_max":6.78,"pressure":1037,"humidity":88},"visibility":150,"wind":{"speed":1.03,"deg":0},"clouds":{"all":100},"dt":1675849786,"sys":{"type":1,"id":1414,"country":"GB","sunrise":1675841260,"sunset":1675875628},"timezone":0,"id":2633658,"name":"Woodford","cod":200}
As you can see there's a big difference in the weather (is visibility). The weather now seems correct, the hourly seems wrong compared to what it is actually like here now. Am I doing something wrong?

OpenWeatherMap Get data for today

I am trying to create something similar to what the weather apps have which show a graph of the temperatures from today.
I am currently using the onecall endpoint which returns the current weather along with forecasts for the next 48 hours but this doesn't cover my case of showing earlier data from the day.
Am I miss using this endpoint or is there a way to show the data for the current day (both historical from earlier and forecast for later)? Or do I need to use the historical data endpoints?

flight-offers-search and flight-cheapest-date-search - limit by number of connections and layover duration

I am testing flight-offers-search and flight-cheapest-date-search
Are there parameters available to limit by number of connections and layover duration, didn't see it in the doc.
Also, is there a functionality to fetch future prices for given period ex: get average price for 2 week trips in the next month, 3 months, 1 year?
Thank you.
Regarding your first point: In the Flight Offers Search API: As of today, the API doesn't offer a parameter to control the time of the layover you will have to check the response and do it on your side. For the number of connections, you can filter direct and non-direct flights using the parameter nonStop. Then, if you want to limit the number of stops you have to do it by filtering the response (by looking at the number of segments inside the itineraries).
Flight Cheapest Date Search has a similar parameter to control the direct and non-direct offers: nonStop.
Regarding your second point: not directly, for this, you can do it by:
Use the Flight Offers Search and do multiples searches and make an average of the prices you find
Use the Flight Cheapest Date Search to do the same (keep in mind that this API uses a pre-computed cache and has a limited number of origin-destination)

youtube analytics api, specifying two dimensions

I'm trying to get a report from the YouTube Analytics API.
I need this report specifying the country and the dates for an specific video.
This code works:
dimensions=country&metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained
sort=-estimatedMinutesWatched&filters=video==VIDEO_ID
If I specify just the country or day dimension, it works.
If I specify day and country dimensions, it throws a 400 error Bad request "The query is not supported. Check the documentation at https://developers.google.com/youtube/analytics/v1/available_reports for a list of supported queries."
This doesn't work:
dimensions=country,day&
metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained
sort=-estimatedMinutesWatched&filters=video==VIDEO_ID
Is there another way to get the data in the format I'm looking for, since seems this query is not supported by the API?
This is not allowed. Check the docs:
https://developers.google.com/youtube/analytics/v1/channel_reports
So you could either
query country dimension and filter by day
or
query day dimension and filter by country

Renting, Booking and Schema.org

Is there any way to express the idea of time (as in day or weeks) for a booking or a rental using Schema.org or/and GoodRelation?
It could be the combination of a product and an offer, as described in this question, but it doesn't really express the idea of the same product being available at different times.
First, use the new version of schema.org (0.99) with the itemtype http://schema.org/Offer. Make clear that you have a rental offer using the property
- businessFunction with http://purl.org/goodrelations/v1#LeaseOut as the value.
The validity of the offer is specified using the properties validFrom and validThrough (i.e. the period of time during which one can accept your offer).
For multiple alternative rental periods, create multiple offer entities.
The availability period and the minimum / maximum duration of a stay is specified using
eligibleDuration: The duration for which the given offer is valid.
availabilityStarts: The beginning of the availability of the rental object.
availabilityEnds: The end of the availability of the rental object
The UN/CEFACT unit code for days is DAY, for months it is MON.
The billing increment etc. is modeled using http://schema.org/UnitPriceSpecification.
If you need detailed patterns, please contact me via http://www.heppresearch.com/contact. We built the new e-commerce module for schema.org.