Skip to content

Commit

Permalink
add changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mugan86 committed Dec 28, 2018
1 parent 6a40f30 commit 558b034
Show file tree
Hide file tree
Showing 44 changed files with 215 additions and 666 deletions.
27 changes: 0 additions & 27 deletions check.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/check.d.ts

This file was deleted.

19 changes: 0 additions & 19 deletions dist/check.js

This file was deleted.

3 changes: 3 additions & 0 deletions dist/lib/classes/interfaces/api.interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export interface Weather {
description: string;
icon: string;
}
/**
* @ignore
*/
export interface Main {
temp: number;
pressure: number;
Expand Down
2 changes: 1 addition & 1 deletion dist/lib/classes/interfaces/city.interface.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Location } from './location.interface';
/**
* One city interface definition
* @ignore
*/
export interface City {
name: string;
Expand Down
3 changes: 3 additions & 0 deletions dist/lib/classes/interfaces/location.interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Location coordinates interface with lon and lat properties
*/
export interface Location {
/**
* @ignore
*/
lat: number;
lon: number;
}
6 changes: 6 additions & 0 deletions dist/lib/classes/services/cities.service.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/**
* Manage cities info
*/
export declare class CitiesService {
/**
* Take cities list from constants
*/
list: import("../../../../../../../../../../Volumes/DATA/Udemy/Proyects/NPM Course/nodets/training-node-ts-openweather-api/lib/classes/interfaces/list.interface").ListData;
/**
* Take available cities list
Expand Down
6 changes: 6 additions & 0 deletions dist/lib/classes/services/cities.service.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cities_list_1 = require("./../../constants/cities-list");
/**
* Manage cities info
*/
class CitiesService {
constructor() {
/**
* Take cities list from constants
*/
this.list = cities_list_1.CITIES_LIST;
}
/**
Expand Down
15 changes: 15 additions & 0 deletions dist/lib/classes/services/weather/current.service.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
import { Location } from './../../interfaces/location.interface';
/**
* Current Weather serve service
*/
export declare class CurrentService {
/**
* @ignore
*/
private apiKey;
/**
* @ignore
*/
private unitMetric;
/**
* @ignore
*/
private language;
/**
* @ignore
*/
constructor(apiKey: string, unitMetric?: string, lang?: string);
/**
* Take current weather of select city and country.
Expand Down
6 changes: 6 additions & 0 deletions dist/lib/classes/services/weather/current.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
const config_service_1 = require("./../api/config.service");
const environments_1 = require("../../../constants/environments");
const axios_1 = __importDefault(require("axios"));
/**
* Current Weather serve service
*/
class CurrentService {
/**
* @ignore
*/
constructor(apiKey, unitMetric = 'm', lang = 'en') {
this.apiKey = apiKey;
this.unitMetric = config_service_1.ConfigService.setUnitMetric(unitMetric);
Expand Down
3 changes: 3 additions & 0 deletions dist/lib/classes/services/weather/forecast.service.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/**
* @ignore
*/
declare class Forecast {
}
3 changes: 3 additions & 0 deletions dist/lib/classes/services/weather/forecast.service.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"use strict";
/**
* @ignore
*/
class Forecast {
}
4 changes: 4 additions & 0 deletions dist/lib/constants/cities-list.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
import { ListData } from './../classes/interfaces/list.interface';
/**
* No data
* @ignore
*/
export declare const CITIES_LIST: ListData;
4 changes: 4 additions & 0 deletions dist/lib/constants/cities-list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* No data
* @ignore
*/
exports.CITIES_LIST = {
"list": [
{
Expand Down
3 changes: 3 additions & 0 deletions dist/lib/constants/environments.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/**
* Default API URL
*/
export declare const API_URL = "https://api.openweathermap.org/data/2.5/";
3 changes: 3 additions & 0 deletions dist/lib/constants/environments.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Default API URL
*/
exports.API_URL = 'https://api.openweathermap.org/data/2.5/';
3 changes: 3 additions & 0 deletions dist/lib/constants/languages.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/**
* List with available languages
*/
export declare const AVAILABLE_LANGS: string[];
3 changes: 3 additions & 0 deletions dist/lib/constants/languages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* List with available languages
*/
exports.AVAILABLE_LANGS = [
'en', 'es', 'ca', 'it', 'fr'
];
27 changes: 23 additions & 4 deletions documentation/classes/CitiesService.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ <h3>File</h3>
<code>lib/classes/services/cities.service.ts</code>
</p>

<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Manage cities info</p>

</p>



Expand Down Expand Up @@ -147,10 +154,16 @@ <h3 id="inputs">
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="3" class="link-to-prism">lib/classes/services/cities.service.ts:3</a></div>
<div class="io-line">Defined in <a href="" data-line="9" class="link-to-prism">lib/classes/services/cities.service.ts:9</a></div>
</td>
</tr>

<tr>
<td class="col-md-4">
<div class="io-description"><p>Take cities list from constants</p>
</div>
</td>
</tr>

</tbody>
</table>
Expand Down Expand Up @@ -183,7 +196,7 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="8" class="link-to-prism">lib/classes/services/cities.service.ts:8</a></div>
<div class="io-line">Defined in <a href="" data-line="14" class="link-to-prism">lib/classes/services/cities.service.ts:14</a></div>
</td>
</tr>

Expand Down Expand Up @@ -263,7 +276,7 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="18" class="link-to-prism">lib/classes/services/cities.service.ts:18</a></div>
<div class="io-line">Defined in <a href="" data-line="24" class="link-to-prism">lib/classes/services/cities.service.ts:24</a></div>
</td>
</tr>

Expand Down Expand Up @@ -303,7 +316,7 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="31" class="link-to-prism">lib/classes/services/cities.service.ts:31</a></div>
<div class="io-line">Defined in <a href="" data-line="37" class="link-to-prism">lib/classes/services/cities.service.ts:37</a></div>
</td>
</tr>

Expand Down Expand Up @@ -369,7 +382,13 @@ <h3 id="methods">

<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { CITIES_LIST } from &#x27;./../../constants/cities-list&#x27;;
/**
* Manage cities info
*/
export class CitiesService {
/**
* Take cities list from constants
*/
list &#x3D; CITIES_LIST;
/**
* Take available cities list
Expand Down

0 comments on commit 558b034

Please sign in to comment.