0.0.6 • Published 6 years ago

ow-client-lib v0.0.6

Weekly downloads
26
License
-
Repository
-
Last release
6 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

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.2

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago