ResponseDefinitions.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2023 Kate Döen <kate.doeen@nextcloud.com>
  5. *
  6. * @author Kate Döen <kate.doeen@nextcloud.com>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCA\WeatherStatus;
  25. /**
  26. * https://api.met.no/doc/ForecastJSON compact format according to https://docs.api.met.no/doc/locationforecast/datamodel
  27. * @psalm-type WeatherStatusForecast = array{
  28. * time: string,
  29. * data: array{
  30. * instant: array{
  31. * details: array{
  32. * air_pressure_at_sea_level: numeric,
  33. * air_temperature: numeric,
  34. * cloud_area_fraction: numeric,
  35. * relative_humidity: numeric,
  36. * wind_from_direction: numeric,
  37. * wind_speed: numeric,
  38. * },
  39. * },
  40. * next_12_hours: array{
  41. * summary: array{
  42. * symbol_code: string,
  43. * },
  44. * details: array{
  45. * precipitation_amount?: numeric,
  46. * },
  47. * },
  48. * next_1_hours: array{
  49. * summary: array{
  50. * symbol_code: string,
  51. * },
  52. * details: array{
  53. * precipitation_amount?: numeric,
  54. * },
  55. * },
  56. * next_6_hours: array{
  57. * summary: array{
  58. * symbol_code: string,
  59. * },
  60. * details: array{
  61. * precipitation_amount?: numeric,
  62. * },
  63. * },
  64. * },
  65. * }
  66. *
  67. * @psalm-type WeatherStatusSuccess = array{
  68. * success: bool,
  69. * }
  70. *
  71. * @psalm-type WeatherStatusMode = array{
  72. * mode: int,
  73. * }
  74. * @psalm-type WeatherStatusLocation = array{
  75. * lat?: string,
  76. * lon?: string,
  77. * address?: ?string,
  78. * }
  79. *
  80. * @psalm-type WeatherStatusLocationWithSuccess = WeatherStatusLocation&WeatherStatusSuccess
  81. *
  82. * @psalm-type WeatherStatusLocationWithMode = WeatherStatusLocation&WeatherStatusMode
  83. */
  84. class ResponseDefinitions {
  85. }