|
3 | 3 | namespace Netgen\Bundle\OpenWeatherMapBundle\API\OpenWeatherMap\Weather; |
4 | 4 |
|
5 | 5 | /** |
6 | | - * Interface WeatherInterface |
7 | | - * @package Netgen\Bundle\OpenWeatherMapBundle\API\OpenWeather\Weather |
| 6 | + * Interface WeatherInterface. |
8 | 7 | */ |
9 | 8 | interface WeatherInterface |
10 | 9 | { |
11 | 10 | /** |
12 | | - * Base URL for weather |
| 11 | + * Base URL for weather. |
13 | 12 | */ |
14 | 13 | const BASE_URL = 'http://api.openweathermap.org/data/2.5'; |
15 | 14 |
|
16 | 15 | /** |
17 | | - * Call current weather data for one location by city name |
| 16 | + * Call current weather data for one location by city name. |
18 | 17 | * |
19 | 18 | * @param string $cityName |
20 | 19 | * @param string $countryCode |
21 | 20 | * |
22 | | - * @return string |
23 | | - * |
24 | 21 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotAuthorizedException |
25 | 22 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotFoundException |
| 23 | + * |
| 24 | + * @return string |
26 | 25 | */ |
27 | 26 | public function fetchWeatherDataByCityName($cityName, $countryCode = ''); |
28 | 27 |
|
29 | 28 | /** |
30 | | - * Call current weather data for one location by city id |
| 29 | + * Call current weather data for one location by city id. |
31 | 30 | * |
32 | 31 | * @param int $cityId |
33 | 32 | * |
34 | | - * @return string |
35 | | - * |
36 | 33 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotAuthorizedException |
37 | 34 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotFoundException |
| 35 | + * |
| 36 | + * @return string |
38 | 37 | */ |
39 | 38 | public function fetchWeatherDataByCityId($cityId); |
40 | 39 |
|
41 | 40 | /** |
42 | | - * Call current weather data for one location by geographic coordinates |
| 41 | + * Call current weather data for one location by geographic coordinates. |
43 | 42 | * |
44 | 43 | * @param float $latitude |
45 | 44 | * @param float $longitude |
46 | 45 | * |
47 | | - * @return string |
48 | | - * |
49 | 46 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotAuthorizedException |
50 | 47 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotFoundException |
| 48 | + * |
| 49 | + * @return string |
51 | 50 | */ |
52 | 51 | public function fetchWeatherDataByGeographicCoordinates($latitude, $longitude); |
53 | 52 |
|
54 | | - |
55 | 53 | /** |
56 | | - * Call current weather data for one location by zip code |
| 54 | + * Call current weather data for one location by zip code. |
57 | 55 | * |
58 | 56 | * @param int $zipCode |
59 | 57 | * @param string $countryCode |
60 | 58 | * |
61 | | - * @return string |
62 | | - * |
63 | 59 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotAuthorizedException |
64 | 60 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotFoundException |
| 61 | + * |
| 62 | + * @return string |
65 | 63 | */ |
66 | 64 | public function fetchWeatherDataByZipCode($zipCode, $countryCode = ''); |
67 | 65 |
|
68 | 66 | /** |
69 | | - * Call current weather data for several cities within a rectangle zone |
| 67 | + * Call current weather data for several cities within a rectangle zone. |
70 | 68 | * |
71 | 69 | * @param array $boundingBox Longitude-left,latitude-bottom,longitude-right,latitude-top, map zoom |
72 | 70 | * @param string $cluster |
73 | 71 | * |
74 | | - * @return string |
75 | | - * |
76 | 72 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotAuthorizedException |
77 | 73 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotFoundException |
| 74 | + * |
| 75 | + * @return string |
78 | 76 | */ |
79 | 77 | public function fetchWeatherDataForCitiesWithinRectangleZone(array $boundingBox, $cluster = 'yes'); |
80 | 78 |
|
81 | 79 | /** |
82 | | - * Call current weather data for several cities in cycle |
| 80 | + * Call current weather data for several cities in cycle. |
83 | 81 | * |
84 | 82 | * @param string $latitude |
85 | 83 | * @param string $longitude |
86 | 84 | * @param string $cluster |
87 | 85 | * @param int $numberOfCities |
88 | 86 | * |
89 | | - * @return string |
90 | | - * |
91 | 87 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotAuthorizedException |
92 | 88 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotFoundException |
| 89 | + * |
| 90 | + * @return string |
93 | 91 | */ |
94 | 92 | public function fetchWeatherDataForCitiesInCycle($latitude, $longitude, $cluster = 'yes', $numberOfCities = 10); |
95 | 93 |
|
96 | 94 | /** |
97 | | - * Call current weather data for several cities by city IDs |
| 95 | + * Call current weather data for several cities by city IDs. |
98 | 96 | * |
99 | 97 | * @param array $cities |
100 | 98 | * |
101 | | - * @return string |
102 | | - * |
103 | 99 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotAuthorizedException |
104 | 100 | * @throws \Netgen\Bundle\OpenWeatherMapBundle\Exception\NotFoundException |
| 101 | + * |
| 102 | + * @return string |
105 | 103 | */ |
106 | 104 | public function fetchWeatherDataForSeveralCityIds(array $cities); |
107 | 105 | } |
0 commit comments