Join Károly Nyisztor for an in-depth discussion in this video The OpenWeatherMap API, part of Swift 4: Protocol-Oriented Programming.
- So, we have a protocol, the type that represents the weather data, and the custom error type. It's time to create a concrete conforming controller type. We're going to rely on the Open Weather Map API, here at Open Weather Map dot org. Let's navigate to the API page. For our app, we're only interested in the current weather data. Let's see its documentation. I am going to use the simplest API, which returns weather data by city name.
The syntax is simple. We must provide the city name as a creative parameter. Additionally, we can provide the temperature you need, and we also have to provide an APIP. The app ID can be set up easily after creating an account. So, please go ahead and get that set up, and we'll pick up in the next video.
- Comparing object-oriented programming with protocol-oriented programming
- Methods and class-bound protocols
- Adopting a protocol
- Declaring asynchronous behavior
- Preparing and implementing fallback logic
- Implementing an app using protocol-oriented programming
Skill Level Intermediate
1. Protocol-Oriented Programming
4. Implement the Weather App Using POP
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.