{"id":18614968,"url":"https://github.com/andrewjbateman/ionic-angular-weatherapi","last_synced_at":"2025-04-11T00:31:01.901Z","repository":{"id":39481150,"uuid":"195105605","full_name":"AndrewJBateman/ionic-angular-weatherapi","owner":"AndrewJBateman","description":":clipboard: App to display weather data from a weather API using the Ionic 5 framework.","archived":false,"fork":false,"pushed_at":"2023-02-03T04:55:40.000Z","size":9300,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T06:51:13.353Z","etag":null,"topics":["angular","angular15","forms","ionic","ionic6","scss-styles","tutorial-code","weather-api","weather-data","weatherstack-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewJBateman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-03T18:12:28.000Z","updated_at":"2023-03-03T11:53:42.000Z","dependencies_parsed_at":"2023-02-18T03:31:22.121Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/ionic-angular-weatherapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-weatherapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-weatherapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-weatherapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fionic-angular-weatherapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/ionic-angular-weatherapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322234,"owners_count":21084333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular15","forms","ionic","ionic6","scss-styles","tutorial-code","weather-api","weather-data","weatherstack-api"],"created_at":"2024-11-07T03:27:39.434Z","updated_at":"2025-04-11T00:30:56.888Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","readme":"# Ionic Angular WeatherApi\n\n* App to display weather data from the [Weatherstack weather API](https://weatherstack.com/documentation) using the [Ionic framework](https://ionicframework.com/docs).\n* Some changes were made to the code so it would work in the latest Angular version.\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/ionic-angular-weatherapi?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/ionic-angular-weatherapi?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/ionic-angular-weatherapi?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/ionic-angular-weatherapi?style=plastic)\n\n## Table of contents\n\n* [Ionic Angular WeatherApi](#ionic-angular-weatherapi)\n  * [Table of contents](#table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-do list](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* The [Weatherstack weather API](https://weatherstack.com/documentation) is a fully managed weather API platform that provides extensive APIs\n  that supply the following data:\n\n* Real-time weather\n* Up to 14 day weather forecast\n* Historical weather inforamtion\n* Astronomy\n* Time zone\n* Geolocation data\n\n## :camera: Screenshots\n\n![Ionic page](./img/weather.png)\n\n## :signal_strength: Technologies\n\n* [Ionic v6](https://ionicframework.com/)\n* [Angular v15](https://angular.io/)\n* [Ionic/angular v6](https://www.npmjs.com/package/@ionic/angular)\n* [Ionic storage-angular v3](https://www.npmjs.com/package/@ionic/storage-angular)\n* [Weatherstack weather API](https://weatherstack.com/documentation)\n\n## :floppy_disk: Setup\n\n* `npm i` to install dependencies\n* Get yourself an API key from [weatherstack.com](https://weatherstack.com/) and add to `weather.service.ts` line 4\n* To start the server on _localhost://8100_ type: 'ionic serve'\n\n## :computer: Code Examples\n\n* Extract from `weather.service.ts` that gets data from the API.\n\n```typescript\nexport class WeatherService {\n\n  constructor(private httpClient: HttpClient) {}\n\n  getWeatherFromApi(city: string) {\n    return this.httpClient.get(`http://api.weatherstack.com/current?access_key=${apiKey}\u0026query=${city}`);\n  }\n}\n```\n\n* Extract from `list.page.ts` function to get API weather data.\n\n```typescript\ngetWeather() {\n  this.ionicStorage.get('city').then( city =\u003e {\n    if (city === null) {\n      this.weatherService.getWeatherFromApi('madrid').subscribe( weather =\u003e {\n        this.weather = weather;\n        console.log(weather);\n      });\n    } else {\n      this.weatherService.getWeatherFromApi(city).subscribe( weather =\u003e {\n        this.weather = weather;\n        console.log(weather);\n      });\n    }\n\n  }).catch(err =\u003e {\n    console.log(err);\n  });\n}\n```\n\n## :cool: Features\n\n* Searches for weather data in any city of the world\n* Ionic storage module used\n\n## :clipboard: Status \u0026 To-do list\n\n* Status: Working.\n* To-do: Add to menu options - list of cities searched for etc. Convert to use Angular async pipe\n\n## :clap: Inspiration\n\n* [Aldo Caamal: Simple Weather App ( Ionic 4 / Angular 7 / Apixu API )](https://www.youtube.com/watch?v=P6RDIjF66dw\u0026t=137s).\n\n## :file_folder: License\n\n* This project is licensed under the terms of the MIT license.\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fionic-angular-weatherapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fionic-angular-weatherapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fionic-angular-weatherapi/lists"}