From 6cb4108f4babe43d4650ae8422c4e24a001d43e1 Mon Sep 17 00:00:00 2001 From: Karen Date: Sat, 6 Mar 2021 01:20:36 +0100 Subject: [PATCH 1/3] Create index file --- API_Projects/WeatherJS/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 API_Projects/WeatherJS/index.html diff --git a/API_Projects/WeatherJS/index.html b/API_Projects/WeatherJS/index.html new file mode 100644 index 0000000..69763a7 --- /dev/null +++ b/API_Projects/WeatherJS/index.html @@ -0,0 +1,11 @@ + + + + + + Document + + + + + \ No newline at end of file From 29bda680edca183a6651df3c23d2f8db4b5507b9 Mon Sep 17 00:00:00 2001 From: Karen Date: Tue, 9 Mar 2021 14:19:31 +0100 Subject: [PATCH 2/3] Create html UI --- API_Projects/WeatherJS/app.js | 0 API_Projects/WeatherJS/index.html | 65 ++++++++++++++++++++++++++++++- API_Projects/WeatherJS/storage.js | 0 API_Projects/WeatherJS/ui.js | 0 API_Projects/WeatherJS/weather.js | 0 5 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 API_Projects/WeatherJS/app.js create mode 100644 API_Projects/WeatherJS/storage.js create mode 100644 API_Projects/WeatherJS/ui.js create mode 100644 API_Projects/WeatherJS/weather.js diff --git a/API_Projects/WeatherJS/app.js b/API_Projects/WeatherJS/app.js new file mode 100644 index 0000000..e69de29 diff --git a/API_Projects/WeatherJS/index.html b/API_Projects/WeatherJS/index.html index 69763a7..df4a336 100644 --- a/API_Projects/WeatherJS/index.html +++ b/API_Projects/WeatherJS/index.html @@ -3,9 +3,72 @@ - Document + + Weather JS +
+
+
+

+

+

+ +
    +
  • +
  • +
  • +
  • +
+
+ +
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/API_Projects/WeatherJS/storage.js b/API_Projects/WeatherJS/storage.js new file mode 100644 index 0000000..e69de29 diff --git a/API_Projects/WeatherJS/ui.js b/API_Projects/WeatherJS/ui.js new file mode 100644 index 0000000..e69de29 diff --git a/API_Projects/WeatherJS/weather.js b/API_Projects/WeatherJS/weather.js new file mode 100644 index 0000000..e69de29 From 02349c567e10531c3e6fca441e1ccf220ee2b946 Mon Sep 17 00:00:00 2001 From: Karen Date: Tue, 9 Mar 2021 22:19:06 +0100 Subject: [PATCH 3/3] Added Fetch --- API_Projects/WeatherJS/weather.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/API_Projects/WeatherJS/weather.js b/API_Projects/WeatherJS/weather.js index e69de29..43c73df 100644 --- a/API_Projects/WeatherJS/weather.js +++ b/API_Projects/WeatherJS/weather.js @@ -0,0 +1,12 @@ +class Weather { + constructor(city, state) { + this.apiKey = 'PTBU6Qvi3OpYi0NysIzHoromExQphhfl'; + this.city = city; + this.state = state; + } + + //Fetch weather from API + async getWeather() { + const response = await fetch(`https://data.climacell.co/v4/locations?apikey=API_KEY`); + } +} \ No newline at end of file