0.0.6 • Published 7 years ago

ow-client-lib v0.0.6

Weekly downloads
26
License
-
Repository
-
Last release
7 years ago

Open Weather Client Library

Install

npm i ow-client-lib --save

Setup

step 1: add OwClientLibModule to app NgModule, make sure you have provided openweathermap.org api key as APP_ID value

import { OwClientLibModule } from 'ow-client-lib';

@NgModule({
  imports: [
    OwClientLibModule // OwClientLibModule added
  ],
  bootstrap: [App],
  declarations: [App],
  providers: [
    { provide: 'APP_ID', useValue: '<API Key>' }, // this is api key of openweathermap.org
  ],
})
class MainModule {}

Use

import { OwClientLibService } from 'ow-client-lib';

@Component({...})
export class YourComponent implements OnInit {
  constructor(private owClientLibService: OwClientLibService) {}

  public ngOnInit(): void {
    this._owClientLibService.GetFiveDaysForecastByCityName('London', 'GB').subscribe(response => console.log(response));
  }
}
0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.2

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago