mirror of
https://github.com/jphong1111/awesome-ios-developer.git
synced 2025-07-14 09:48:55 +07:00
Update README.md
This commit is contained in:
@ -188,7 +188,7 @@ then make a instance of router.swift file in your code
|
|||||||
private let router = Router<YourAPI>()
|
private let router = Router<YourAPI>()
|
||||||
```
|
```
|
||||||
|
|
||||||
for **YourAPI part**, simple create a new enum with cases about specific api URL
|
for **YourAPI part**, simply create a new **enum** with cases about specific api URL
|
||||||
> It will make your router more dynamic!
|
> It will make your router more dynamic!
|
||||||
> Don't forget extension to EndPointType!
|
> Don't forget extension to EndPointType!
|
||||||
|
|
||||||
@ -206,7 +206,7 @@ extension YourAPI: EndPointType {
|
|||||||
return "\(country).json"
|
return "\(country).json"
|
||||||
case .second(let time):
|
case .second(let time):
|
||||||
return "\(time).json"
|
return "\(time).json"
|
||||||
case .raceResults(let name):
|
case .third(let name):
|
||||||
return "\(name).json"
|
return "\(name).json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user