You can watch this episode by subscribing to Cocoacasts Plus.
Building Type-Safe APIs in Swift
Defining Properties
1 | Eliminating Stringly Typed Code 06:31 |
---|---|
2 | Creating Events 08:21 |
3 | Defining Properties 06:22 |
We still use string literals to define the properties of an event. That is something I would like to change in this episode. The Journey
enum defines the list of events the API supports. We take a similar approach for the properties of an event.
Instant and Unlimited Access
to 500+ Cocoacasts Tutorials
Monthly
$19 / month
Pay Once a Month
30 Day Money Back Guarantee
Yearly
$8.25 / month (billed annually)
Pay Once a Year and Save $129
30 Day Money Back
Guarantee