Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Blazor WebAssembly by Example, 2e

You're reading from   Blazor WebAssembly by Example, 2e Use practical projects to start building web apps with .NET 7, Blazor WebAssembly, and C#

Arrow left icon
Product type Paperback
Published in Feb 2023
Publisher Packt
ISBN-13 9781803241852
Length 438 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Toi B. Wright Toi B. Wright
Author Profile Icon Toi B. Wright
Toi B. Wright
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Introduction to Blazor WebAssembly 2. Building Your First Blazor WebAssembly Application FREE CHAPTER 3. Debugging and Deploying a Blazor WebAssembly App 4. Building a Modal Dialog Using Templated Components 5. Building a Local Storage Service Using JavaScript Interoperability (JS Interop) 6. Building a Weather App as a Progressive Web App (PWA) 7. Building a Shopping Cart Using Application State 8. Building a Kanban Board Using Events 9. Uploading and Reading an Excel File 10. Using Azure Active Directory to Secure a Blazor WebAssembly Application 11. Building a Task Manager Using ASP.NET Web API 12. Building an Expense Tracker Using the EditForm Component 13. Other Books You May Enjoy
14. Index

Using the OpenWeather One Call API

The data source for the project in this chapter is a free API provided by OpenWeather. It is called the OpenWeather One Call API (https://openweathermap.org/api/one-call-api). This API can return current, forecast, and historical weather data. We will be using it to access the local forecast for the next 5 days. This is the format of an API call using the OpenWeather One Call API:

https://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}&appid={API key}

These are the parameters for the OpenWeather One Call API:

  • lat: Latitude. This parameter is required.
  • lon: Longitude. This parameter is required.
  • appid: API key. This parameter is required. After you create an account, you can manage your API keys from the API keys tab.
  • units: Units of measurement. This is set as Standard, Metric, or Imperial.
  • exclude: Excluded data. This is used to simplify data that is returned. Since we will only be using the daily forecast, we will exclude current...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image