@@ 15-26 (lines=12) @@ | ||
12 | /** |
|
13 | * {@inheritdoc} |
|
14 | */ |
|
15 | public function fetchForecastByCityName($cityName, $countryCode = '') |
|
16 | { |
|
17 | if (empty($countryCode)) { |
|
18 | $queryPart = '/forecast?q=' . $cityName; |
|
19 | } else { |
|
20 | $queryPart = '/forecast?q=' . $cityName . ',' . $countryCode; |
|
21 | } |
|
22 | ||
23 | $queryPart = $queryPart . $this->getParams(); |
|
24 | ||
25 | return $this->getResult(self::BASE_URL, $queryPart); |
|
26 | } |
|
27 | ||
28 | /** |
|
29 | * {@inheritdoc} |
@@ 15-26 (lines=12) @@ | ||
12 | /** |
|
13 | * {@inheritdoc} |
|
14 | */ |
|
15 | public function fetchWeatherDataByCityName($cityName, $countryCode = '') |
|
16 | { |
|
17 | if (empty($countryCode)) { |
|
18 | $queryPart = '/weather?q=' . $cityName; |
|
19 | } else { |
|
20 | $queryPart = '/weather?q=' . $cityName . ',' . $countryCode; |
|
21 | } |
|
22 | ||
23 | $queryPart = $queryPart . $this->getParams(); |
|
24 | ||
25 | return $this->getResult(self::BASE_URL, $queryPart); |
|
26 | } |
|
27 | ||
28 | /** |
|
29 | * {@inheritdoc} |
|
@@ 51-62 (lines=12) @@ | ||
48 | /** |
|
49 | * {@inheritdoc} |
|
50 | */ |
|
51 | public function fetchWeatherDataByZipCode($zipCode, $countryCode = '') |
|
52 | { |
|
53 | if (empty($countryCode)) { |
|
54 | $queryPart = '/weather?zip=' . $zipCode; |
|
55 | } else { |
|
56 | $queryPart = '/weather?zip=' . $zipCode . ',' . $countryCode; |
|
57 | } |
|
58 | ||
59 | $queryPart = $queryPart . $this->getParams(); |
|
60 | ||
61 | return $this->getResult(self::BASE_URL, $queryPart); |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * {@inheritdoc} |