Created
December 7, 2017 11:39
-
-
Save nderkach/5ef87a3cda785173bdbc8fae38113cd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Siesta | |
| let baseURL = "https://jwt-api-siesta.herokuapp.com" | |
| let AwesomeAPI = _AwesomeAPI() | |
| class _AwesomeAPI { | |
| // MARK: - Configuration | |
| private let service = Service( | |
| baseURL: baseURL, | |
| standardTransformers: [.text, .image] | |
| ) | |
| fileprivate init() { | |
| // –––––– Global configuration –––––– | |
| #if DEBUG | |
| LogCategory.enabled = [.network] | |
| #endif | |
| } | |
| // MARK: - Resource Accessors | |
| func ping() -> Resource { | |
| return service.resource("/ping") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment