Skip to content

Instantly share code, notes, and snippets.

@romyilano
Created April 9, 2019 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romyilano/e26f77ecaba49a9ac9430f9cc86e7cd5 to your computer and use it in GitHub Desktop.
Save romyilano/e26f77ecaba49a9ac9430f9cc86e7cd5 to your computer and use it in GitHub Desktop.
// brushing up on url components
//
class CryptoApi {
static let host = "min-api.cryptocompare.com"
static let allCoinsPath = "/data/all/coinlist"
var allCoinsUrl: URL? = {
var urlComponents = URLComponents()
urlComponents.scheme = "https"
urlComponents.host = CryptoApi.host
urlComponents.path = CryptoApi.allCoinsPath
return urlComponents.url
}()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment