ResponseDefinitions.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\WeatherStatus;
  8. /**
  9. * https://api.met.no/doc/ForecastJSON compact format according to https://docs.api.met.no/doc/locationforecast/datamodel
  10. * @psalm-type WeatherStatusForecast = array{
  11. * time: string,
  12. * data: array{
  13. * instant: array{
  14. * details: array{
  15. * air_pressure_at_sea_level: numeric,
  16. * air_temperature: numeric,
  17. * cloud_area_fraction: numeric,
  18. * relative_humidity: numeric,
  19. * wind_from_direction: numeric,
  20. * wind_speed: numeric,
  21. * },
  22. * },
  23. * next_12_hours: array{
  24. * summary: array{
  25. * symbol_code: string,
  26. * },
  27. * details: array{
  28. * precipitation_amount?: numeric,
  29. * },
  30. * },
  31. * next_1_hours: array{
  32. * summary: array{
  33. * symbol_code: string,
  34. * },
  35. * details: array{
  36. * precipitation_amount?: numeric,
  37. * },
  38. * },
  39. * next_6_hours: array{
  40. * summary: array{
  41. * symbol_code: string,
  42. * },
  43. * details: array{
  44. * precipitation_amount?: numeric,
  45. * },
  46. * },
  47. * },
  48. * }
  49. *
  50. * @psalm-type WeatherStatusSuccess = array{
  51. * success: bool,
  52. * }
  53. *
  54. * @psalm-type WeatherStatusMode = array{
  55. * mode: int,
  56. * }
  57. * @psalm-type WeatherStatusLocation = array{
  58. * lat?: string,
  59. * lon?: string,
  60. * address?: ?string,
  61. * }
  62. *
  63. * @psalm-type WeatherStatusLocationWithSuccess = WeatherStatusLocation&WeatherStatusSuccess
  64. *
  65. * @psalm-type WeatherStatusLocationWithMode = WeatherStatusLocation&WeatherStatusMode
  66. */
  67. class ResponseDefinitions {
  68. }